StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuRHICfRawHit.cxx
1 #include "StMuRHICfRawHit.h"
2 
3 ClassImp(StMuRHICfRawHit)
4 
6 {
7  clear();
8 }
9 
10 StMuRHICfRawHit::~StMuRHICfRawHit()
11 {
12 }
13 
14 void StMuRHICfRawHit::clear()
15 {
16  mRHICfRunNumber = 0;
17  mRHICfEventNumber = 0;
18  mRunType = 999;
19  mBunchNumber = 0;
20  mRHICfTrigger = 0;
21  mRunTime[0] = 0;
22  mRunTime[1] = 0;
23  mRunTRGM = 0;
24 
25 
26  memset(mPlateADC, 0, sizeof(mPlateADC));
27  memset(mPlateADCDelay, 0, sizeof(mPlateADCDelay));
28  memset(mGSOSmallADC, 0, sizeof(mGSOSmallADC));
29  memset(mGSOLargeADC, 0, sizeof(mGSOLargeADC));
30  memset(mTDC, 0, sizeof(mTDC));
31  memset(mCAD0, 0, sizeof(mCAD0));
32  memset(mGPI0, 0, sizeof(mGPI0));
33  memset(mGPI1, 0, sizeof(mGPI1));
34 }
35 
36 void StMuRHICfRawHit::setRHICfRunNumber(UInt_t run){mRHICfRunNumber = run;}
37 void StMuRHICfRawHit::setRHICfEventNumber(UInt_t event){mRHICfEventNumber = event;}
38 void StMuRHICfRawHit::setRunType(UInt_t type){mRunType = type;}
39 void StMuRHICfRawHit::setBunchNumber(UInt_t bunch){mBunchNumber = bunch;}
40 void StMuRHICfRawHit::setTriggerNumber(UInt_t trigger){mRHICfTrigger = trigger;}
41 void StMuRHICfRawHit::setRunTime(Int_t idx, UInt_t time){mRunTime[idx] = time;}
42 void StMuRHICfRawHit::setRunTRGM(UInt_t trgm){mRunTRGM = trgm;}
43 
44 void StMuRHICfRawHit::setPlateADC(Int_t tower, Int_t plate, Int_t range, Int_t adc) {mPlateADC[tower][plate][range] = adc;}
45 void StMuRHICfRawHit::setPlateADCDelay(Int_t tower, Int_t plate, Int_t range, Int_t adc) {mPlateADCDelay[tower][plate][range] = adc;}
46 void StMuRHICfRawHit::setGSOBarADC(Int_t tower, Int_t layer, Int_t xy, Int_t bar, Int_t adc)
47 {
48  if(tower==0){mGSOSmallADC[layer][xy][bar] = adc;}
49  if(tower==1){mGSOLargeADC[layer][xy][bar] = adc;}
50 }
51 
52 void StMuRHICfRawHit::setTDC(Int_t idx, UInt_t val){mTDC[idx] = val;}
53 void StMuRHICfRawHit::setCAD0(Int_t idx, UInt_t val){mCAD0[idx] = val;}
54 void StMuRHICfRawHit::setGPI0(Int_t idx, UInt_t val){mGPI0[idx] = val;}
55 void StMuRHICfRawHit::setGPI1(Int_t idx, UInt_t val){mGPI1[idx] = val;}
56 
57 UInt_t StMuRHICfRawHit::getRHICfRunNumber(){return mRHICfRunNumber;}
58 UInt_t StMuRHICfRawHit::getRHICfEventNumber(){return mRHICfEventNumber;}
59 UInt_t StMuRHICfRawHit::getRunType(){return mRunType;}
60 UInt_t StMuRHICfRawHit::getBunchNumber(){return mBunchNumber;}
61 UInt_t StMuRHICfRawHit::getTriggerNumber(){return mRHICfTrigger;}
62 UInt_t StMuRHICfRawHit::getRunTime(Int_t idx){return mRunTime[idx];}
63 UInt_t StMuRHICfRawHit::getRunTRGM(){return mRunTRGM;}
64 
65 UShort_t StMuRHICfRawHit::getPlateADC(Int_t tower, Int_t plate, Int_t range) {return mPlateADC[tower][plate][range];}
66 UShort_t StMuRHICfRawHit::getPlateADCDelay(Int_t tower, Int_t plate, Int_t range) {return mPlateADCDelay[tower][plate][range];}
67 UShort_t StMuRHICfRawHit::getGSOBarADC(Int_t tower, Int_t layer, Int_t xy, Int_t bar)
68 {
69  if(tower==0){return mGSOSmallADC[layer][xy][bar];}
70  if(tower==1){return mGSOLargeADC[layer][xy][bar];}
71  return 0;
72 }
73 
74 UInt_t StMuRHICfRawHit::getTDC(Int_t idx){return mTDC[idx];}
75 UInt_t StMuRHICfRawHit::getCAD0(Int_t idx){return mCAD0[idx];}
76 UInt_t StMuRHICfRawHit::getGPI0(Int_t idx){return mGPI0[idx];}
77 UInt_t StMuRHICfRawHit::getGPI1(Int_t idx){return mGPI1[idx];}