17 #include "StMtdTriggerDetector.h"
18 #include "StTriggerData.h"
20 static const char rcsid[] =
"$Id: StMtdTriggerDetector.cxx,v 2.1 2007/07/02 20:21:55 ullrich Exp $";
26 memset(mADC,0,
sizeof(mADC));
27 memset(mTDC,0,
sizeof(mTDC));
30 StMtdTriggerDetector::StMtdTriggerDetector(
const StTriggerData& tt)
32 for(
int i=0; i<mMaxMtdCounter; i++){
33 mADC[west][i] = tt.mtdAdc(west,i);
34 mADC[east][i] = tt.mtdAdc(east,i);
35 mTDC[west][i] = tt.mtdTdc(west,i);
36 mTDC[east][i] = tt.mtdTdc(east,i);
40 StMtdTriggerDetector::~StMtdTriggerDetector() {}
43 StMtdTriggerDetector::numberOfMtdCounters()
const {
return mMaxMtdCounter;}
46 StMtdTriggerDetector::adc(StBeamDirection eastwest,
unsigned int i)
const
48 if (i < mMaxMtdCounter)
49 return mADC[eastwest][i];
55 StMtdTriggerDetector::tdc(StBeamDirection eastwest,
unsigned int i)
const
57 if (i < mMaxMtdCounter)
58 return mTDC[eastwest][i];
64 StMtdTriggerDetector::setAdc(StBeamDirection eastwest,
unsigned int i,
unsigned short v)
66 if (i < mMaxMtdCounter )
67 mADC[eastwest][i] = v;
71 StMtdTriggerDetector::setTdc(StBeamDirection eastwest,
unsigned int i,
unsigned short v)
73 if (i < mMaxMtdCounter )
74 mTDC[eastwest][i] = v;