StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TPCV1P0.hh
1 /***************************************************************************
2  * $Id: TPCV1P0.hh,v 1.4 1999/07/22 17:54:49 levine Exp $
3  * Author: M.J. LeVine
4  ***************************************************************************
5  * Description: Declarations For TPC version 1.0
6  *
7  *
8  * change log
9  * 25-Jun-99 MJL remove #include "MemMan.hh"
10  *
11  ***************************************************************************
12  * $Log: TPCV1P0.hh,v $
13  * Revision 1.4 1999/07/22 17:54:49 levine
14  * include function prototype for getSpacePts()
15  *
16  * Revision 1.3 1999/07/04 01:43:24 levine
17  * minor changes to make solaris CC compiler happy
18  *
19  * Revision 1.2 1999/07/02 04:43:23 levine
20  * Many changes -
21  * navigates to head of TPCP bank independent of position.
22  * move declarations out of loops where they were upsetting some compilers
23  * suppress output from class libraries with run-time switch EventReader.verbose
24  * added TPCV2P0_CPP_SR::getAsicParams()
25  *
26  *
27  **************************************************************************/
28 
29 #ifndef TPCV1P0_HH
30 #define TPCV1P0_HH
31 
32 #include "StDaqLib/GENERIC/EventReader.hh"
33 #include "StDaqLib/GENERIC/RecHeaderFormats.hh"
34 #include "TPCV1P0.Banks.hh"
35 //#include "MemMan.hh"
36 #include "TPCV1P0_Reader.hh"
37 
38 class TPCV1P0_Reader;
39 class TPCV1P0_PADK_SR;
40 
41 // The sector reader virtual classes
42 
43 // Zero-suppressed reader
45 {
46 public:
47  int getPadList(int PadRow, unsigned char **padList);
48  int getSequences(int PadRow, int Pad, int *nSeq, Sequence **SeqData);
49  int getSpacePts(int PadRow, int *nSpacePts, SpacePt **SpacePts);
50  int MemUsed();
51 
52  TPCV1P0_ZS_SR(int sector, TPCV1P0_Reader *);
53  int initialize();
54  int getFeeSequences(int Fee, int Pin, int *nSeq, Sequence **SeqData);
55 
56  ~TPCV1P0_ZS_SR();
57 
58 private:
59  classname(Bank_TPCADCD) *adcd_p[6][3];
60  classname(Bank_TPCADCX) *adcx_p[6][3];
61  classname(Bank_TPCSEQD) *seqd_p[6][3];
62 
63  int sector;
64  struct Pad Pad_array[TPC_PADROWS][TPC_MAXPADS];
65  struct PadRow Row_array[TPC_PADROWS];
66  u_char padlist[TPC_PADROWS][TPC_MAXPADS];
67 
68  TPCV1P0_Reader *detector;
69  TPCV1P0_PADK_SR *padkr;
70 
71 };
72 
73 // Reads Raw ADC values
75 {
76 public:
77  int getPadList(int PadRow, unsigned char **padList);
78  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
79  int MemUsed();
80 
81  TPCV1P0_ADCR_SR(int sector, TPCV1P0_Reader *);
82  int initialize();
83  ~TPCV1P0_ADCR_SR();
84 
85 private:
86  int sector;
87  TPCV1P0_Reader *detector;
88  TPCV1P0_PADK_SR *padkr;
89  u_char padlist[TPC_PADROWS][TPC_MAXPADS];
90 
91  classname(Bank_TPCADCR) *banks[6][3];
92 };
93 
94 // Reads the Pedestal values
96 {
97 private:
98  int sector;
99  TPCV1P0_Reader *detector;
100  TPCV1P0_PADK_SR *padkr;
101  classname(Bank_TPCPEDR) *banks[6][3];
102  u_char padlist[TPC_PADROWS][TPC_MAXPADS];
103  int numEvents;
104 
105 public:
106  int getPadList(int PadRow, unsigned char **padList);
107  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
108  int getNumberOfEvents();
109 
110  int MemUsed();
111 
112  TPCV1P0_PEDR_SR(int sector, TPCV1P0_Reader *);
113  int initialize();
114  ~TPCV1P0_PEDR_SR();
115 };
116 
117 // The RMS pedestal values
119 {
120 private:
121  int sector;
122  TPCV1P0_Reader *detector;
123  TPCV1P0_PADK_SR *padkr;
124  classname(Bank_TPCRMSR) *banks[6][3];
125  u_char padlist[TPC_PADROWS][TPC_MAXPADS];
126  int numEvents;
127 
128 
129 public:
130  int getPadList(int PadRow, unsigned char **padList);
131  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
132  int getNumberOfEvents();
133 
134  int MemUsed();
135 
136  TPCV1P0_PRMS_SR(int sector, TPCV1P0_Reader *);
137  int initialize();
138  ~TPCV1P0_PRMS_SR();
139 };
140 
141 // The gain reader
142 
143 class TPCV1P0_G_SR : public GainReader
144 {
145 private:
146  int sector;
147  TPCV1P0_Reader *detector;
148 
149 
150 public:
151  int getGain(int PadRow, int Pad, struct Gain **gain);
152  int getMeanGain();
153  int getNumberOfEvents();
154 
155  int MemUsed();
156 
157  TPCV1P0_G_SR(int sector, TPCV1P0_Reader *);
158  int initialize();
159  ~TPCV1P0_G_SR();
160 };
161 
162 // Reads Cluster Pointer Pairs from the ASIC
163 class TPCV1P0_CPP_SR : public CPPReader
164 {
165 public:
166  int getClusters(int PadRow, int Pad, int *nClusters,
167  struct ASIC_Cluster **clusters);
168 
169  int getAsicParams(ASIC_params *){return FALSE;};
170  int MemUsed();
171 
172  TPCV1P0_CPP_SR(int sector, TPCV1P0_Reader *);
173  int initialize();
174  ~TPCV1P0_CPP_SR();
175 
176 private:
177  int sector;
178  TPCV1P0_Reader *detector;
179  TPCV1P0_PADK_SR *padkr;
180  classname(Bank_TPCCPPR) *banks[6][3];
181 };
182 
183 // Reads the bad channels
185 {
186 private:
187  int sector;
188 
189 public:
190  int IsBad(int PadRow, int Pad);
191 
192  int MemUsed();
193 
194  TPCV1P0_BC_SR(int sector, TPCV1P0_Reader *);
195  int initialize();
196  ~TPCV1P0_BC_SR();
197 };
198 
199 // Read the front end electronics configuration
201 {
202 private:
203  int sector;
204  TPCV1P0_Reader *detector;
205 
206 public:
207  int FEE_id(int PadRow, int Pad) = 0;
208  // returns FEE_id
209 
210  int MemUsed();
211 
212  TPCV1P0_CR_SR(int sector, TPCV1P0_Reader *);
213  int initialize();
214  ~TPCV1P0_CR_SR();
215 };
216 
218 {
219  short offset;
220  short mz; // mz and rb are counted up from 1
221  short rb;
222 };
223 
225 {
226 public:
227  TPCV1P0_PADK_SR(int sector, TPCV1P0_Reader *);
228  int initialize();
229 
230  void place(short padrow, short pad, PADK_entry *);
231  void get(short padrow, short pad, PADK_entry *);
232 
233  int getADCBytes() { return 512; };
234  int getCPPBytes() { return 128; };
235  int getPEDBytes() { return 512; };
236  int getRMSBytes() { return 512; };
237  int getCFGBytes() { return 1; };
238  int getGAINBytes() { return 4; };
239 
240 private:
241  int sector;
242  TPCV1P0_Reader *detector;
243 
244  short packed_address[TPC_PADROWS][TPC_MAXPADS];
245 
246  short pack(short rcb, short mz, short offset);
247  void unpack(PADK_entry *, short paddress);
248 };
249 
250 #endif
251 
252 
253 
254 
255 
Definition: rb.hh:21
Definition: TPCV1P0.hh:217