StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFpdCollection.h
1 
5 /***************************************************************************
6  *
7  * $Id: StFpdCollection.h,v 2.5 2002/09/25 14:04:17 akio Exp $
8  *
9  * Author: Akio Ogawa, Jan 2002
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StFpdCollection.h,v $
17  * Revision 2.5 2002/09/25 14:04:17 akio
18  * Bug fix in the service functions, no change in data
19  *
20  * Revision 2.4 2002/02/22 22:56:48 jeromel
21  * Doxygen basic documentation in all header files. None of this is required
22  * for QM production.
23  *
24  * Revision 2.3 2002/01/17 18:38:11 ullrich
25  * Several new methods added. Bug fixed.
26  *
27  * Revision 2.2 2002/01/09 15:37:55 ullrich
28  * AdcSum functions and scaler infos added.
29  *
30  * Revision 2.1 2002/01/03 20:57:36 ullrich
31  * Initial Revision.
32  *
33  **************************************************************************/
34 #ifndef StFpdCollection_hh
35 #define StFpdCollection_hh
36 #include "StObject.h"
37 
38 class StFpdCollection : public StObject {
39 public:
41  virtual ~StFpdCollection();
42  // StFpdCollection(const StFpdCollection&); use default
43  // StFpdCollection& operator=(const StFpdCollection&); use default
44 
45  unsigned int numberOfADC() const;
46  unsigned int numberOfTDC() const;
47  unsigned int numberOfRegisters() const;
48  unsigned int numberOfPedestal() const;
49  unsigned int numberOfPMTpEEMC() const;
50  unsigned int numberOfPMTPbg() const;
51  unsigned int numberOfPMTSmdX() const;
52  unsigned int numberOfPMTSmdY() const;
53  unsigned int numberOfScalers() const;
54 
55  unsigned short* adc();
56  const unsigned short* adc() const;
57  unsigned short* tdc();
58  const unsigned short* tdc() const;
59  unsigned short registers(unsigned int) const;
60  unsigned short* pedestal();
61  const unsigned short* pedestal() const;
62  unsigned int scaler(unsigned int) const;
63 
64  unsigned short north(unsigned int) const;
65  unsigned short south(unsigned int) const;
66  unsigned short top(unsigned int) const;
67  unsigned short bottom(unsigned int) const;
68  unsigned short smdx(unsigned int) const;
69  unsigned short smdy(unsigned int) const;
70  unsigned short pres1(unsigned int) const;
71  unsigned short pres2(unsigned int) const;
72  unsigned short southVeto() const;
73 
74  unsigned int sumAdcNorth() const;
75  unsigned int sumAdcSouth() const;
76  unsigned int sumAdcTop() const;
77  unsigned int sumAdcBottom() const;
78  unsigned int sumAdcPreShower1() const;
79  unsigned int sumAdcPreShower2() const;
80  unsigned int sumAdcSmdX() const;
81  unsigned int sumAdcSmdY() const;
82 
83  void setAdc(unsigned int, unsigned short);
84  void setTdc(unsigned int, unsigned short);
85  void setRegister(unsigned int, unsigned short);
86  void setPedestal(unsigned int, unsigned short);
87  void setScaler(unsigned int, unsigned int);
88 
89  unsigned int token() const;
90  void setToken(unsigned int);
91 
92  void dump();
93 
94 protected:
95  enum {mMaxAdc = 256,
96  mMaxTdc = 8,
97  mMaxRegisters = 3,
98  mMaxPedestal = 256,
99  mMaxPMTpEEMC = 12,
100  mMaxPMTPbg = 16,
101  mMaxPMTSmdX = 60,
102  mMaxPMTSmdY = 100,
103  mMaxScalers = 128};
104 
105  UShort_t mAdc[mMaxAdc];
106  UShort_t mTdc[mMaxTdc];
107  UShort_t mReg[mMaxRegisters];
108  UShort_t mPed[mMaxPedestal];
109  UInt_t mScl[mMaxScalers];
110  UShort_t mToken;
111 
112  ClassDef(StFpdCollection,2)
113 };
114 
115 inline unsigned int
116 StFpdCollection::numberOfADC() const {return mMaxAdc;}
117 
118 inline unsigned int
119 StFpdCollection::numberOfTDC() const {return mMaxTdc;}
120 
121 inline unsigned int
122 StFpdCollection::numberOfRegisters() const {return mMaxRegisters;}
123 
124 inline unsigned int
125 StFpdCollection::numberOfPedestal() const {return mMaxPedestal;}
126 
127 inline unsigned int
128 StFpdCollection::numberOfPMTpEEMC() const {return mMaxPMTpEEMC;}
129 
130 inline unsigned int
131 StFpdCollection::numberOfPMTPbg() const {return mMaxPMTPbg;}
132 
133 inline unsigned int
134 StFpdCollection::numberOfPMTSmdX() const {return mMaxPMTSmdX;}
135 
136 inline unsigned int
137 StFpdCollection::numberOfPMTSmdY() const {return mMaxPMTSmdY;}
138 
139 inline unsigned int
140 StFpdCollection::numberOfScalers() const {return mMaxScalers;}
141 
142 inline unsigned int
143 StFpdCollection::token() const {return mToken;}
144 
145 #endif