StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRHICfRawHit.cxx
1 #include "StRHICfRawHit.h"
2 
3 ClassImp(StRHICfRawHit)
4 
6 {
7  clear();
8 }
9 
10 StRHICfRawHit::~StRHICfRawHit()
11 {
12 }
13 
14 void StRHICfRawHit::clear()
15 {
16  memset(mPlateADC, 0, sizeof(mPlateADC));
17  memset(mPlateADCDelay, 0, sizeof(mPlateADCDelay));
18  memset(mGSOSmallADC, 0, sizeof(mGSOSmallADC));
19  memset(mGSOLargeADC, 0, sizeof(mGSOLargeADC));
20  memset(mTDC, 0, sizeof(mTDC));
21  memset(mCAD0, 0, sizeof(mCAD0));
22  memset(mGPI0, 0, sizeof(mGPI0));
23  memset(mGPI1, 0, sizeof(mGPI1));
24 }
25 
26 void StRHICfRawHit::setPlateADC(Int_t tower, Int_t plate, Int_t range, Int_t adc) {mPlateADC[tower][plate][range] = adc;}
27 void StRHICfRawHit::setPlateADCDelay(Int_t tower, Int_t plate, Int_t range, Int_t adc) {mPlateADCDelay[tower][plate][range] = adc;}
28 void StRHICfRawHit::setGSOBarADC(Int_t tower, Int_t layer, Int_t xy, Int_t bar, Int_t adc)
29 {
30  if(tower==0){mGSOSmallADC[layer][xy][bar] = adc;}
31  if(tower==1){mGSOLargeADC[layer][xy][bar] = adc;}
32 }
33 
34 void StRHICfRawHit::setTDC(Int_t idx, UInt_t val){mTDC[idx] = val;}
35 void StRHICfRawHit::setCAD0(Int_t idx, UInt_t val){mCAD0[idx] = val;}
36 void StRHICfRawHit::setGPI0(Int_t idx, UInt_t val){mGPI0[idx] = val;}
37 void StRHICfRawHit::setGPI1(Int_t idx, UInt_t val){mGPI1[idx] = val;}
38 
39 UShort_t StRHICfRawHit::getPlateADC(Int_t tower, Int_t plate, Int_t range) {return mPlateADC[tower][plate][range];}
40 UShort_t StRHICfRawHit::getPlateADCDelay(Int_t tower, Int_t plate, Int_t range) {return mPlateADCDelay[tower][plate][range];}
41 UShort_t StRHICfRawHit::getGSOBarADC(Int_t tower, Int_t layer, Int_t xy, Int_t bar)
42 {
43  if(tower==0){return mGSOSmallADC[layer][xy][bar];}
44  if(tower==1){return mGSOLargeADC[layer][xy][bar];}
45  return 0;
46 }
47 
48 UInt_t StRHICfRawHit::getTDC(Int_t idx)
49 {
50  if(idx<kRHICfNtdc){return mTDC[idx];}
51  return 0;
52 }
53 
54 UInt_t StRHICfRawHit::getCAD0(Int_t idx)
55 {
56  if(idx<kRHICfNcad0){return mCAD0[idx];}
57  return 0;
58 }
59 
60 UInt_t StRHICfRawHit::getGPI0(Int_t idx)
61 {
62  if(idx<kRHICfNgpi0){return mGPI0[idx];}
63  return 0;
64 }
65 
66 UInt_t StRHICfRawHit::getGPI1(Int_t idx)
67 {
68  if(idx<kRHICfNgpi1){return mGPI1[idx];}
69  return 0;
70 }
71 
72