StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FTPV1P0.hh
1 /***************************************************************************
2  * $Id: FTPV1P0.hh,v 1.1 2000/01/18 18:01:20 levine Exp $
3  * Authors: M.J.LeVine, J.Klay, H.Huemmler
4  ***************************************************************************
5  * Description: Declarations For FTPC version 1.0
6  *
7  *
8  * change log
9  *
10  ***************************************************************************
11  * $Log: FTPV1P0.hh,v $
12  * Revision 1.1 2000/01/18 18:01:20 levine
13  * Hummler's implementaiton of FTPC reader. Note that method
14  *
15  * FTPV1P0_ZS_SR::getFeeSequences(int Fee, int Pin, int *nSeq,
16  * Sequence **SeqData)
17  *
18  * causes exit() since the required #include file has not yet been
19  * (correctly) implemented.
20  *
21  *
22  **************************************************************************/
23 
24 #ifndef FTPCV1P0_HH
25 #define FTPCV1P0_HH
26 
27 #include "StDaqLib/GENERIC/EventReader.hh"
28 #include "StDaqLib/GENERIC/RecHeaderFormats.hh"
29 #include "FTPV1P0.Banks.hh"
30 //#include "MemMan.hh"
31 #include "FTPV1P0_Reader.hh"
32 
33 class FTPV1P0_Reader;
34 class FTPV1P0_PADK_SR;
35 
36 // The sector reader virtual classes
38 {
39 public:
40  int getPadList(int PadRow, unsigned char **padList);
41  int getSequences(int PadRow, int Pad, int *nSeq, Sequence **SeqData);
42  int getSpacePts(int PadRow, int *nSpacePts, SpacePt **SpacePts);
43  int MemUsed();
44 
45  FTPV1P0_ZS_SR(int s, FTPV1P0_Reader *det);
46  int initialize();
47  int getFeeSequences(int Fee, int Pin, int *nSeq, Sequence **SeqData);
48 
49  ~FTPV1P0_ZS_SR();
50 
51 private:
52  classname(Bank_FTPADCD) *adcd_p;
53  classname(Bank_FTPADCX) *adcx_p;
54  classname(Bank_FTPSEQD) *seqd_p;
55 
56  int sector;
57  struct Pad Pad_array[FTP_PADROWS][FTP_MAXPADS];
58  struct PadRow Row_array[FTP_PADROWS];
59  u_char padlist[FTP_PADROWS][FTP_MAXPADS];
60 
61  FTPV1P0_Reader *detector;
62  FTPV1P0_PADK_SR *padkr;
63 
64 };
65 
66 // Reads Raw ADC values
68 {
69 public:
70  int getPadList(int PadRow, unsigned char **padList);
71  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
72  int MemUsed();
73 
74  FTPV1P0_ADCR_SR(int sector, FTPV1P0_Reader *);
75  int initialize();
76  ~FTPV1P0_ADCR_SR();
77 
78 private:
79  int sector;
80  FTPV1P0_Reader *detector;
81  FTPV1P0_PADK_SR *padkr;
82  u_char padlist[FTP_PADROWS][FTP_MAXPADS];
83 
84  classname(Bank_FTPADCR) *bank;
85 };
86 
87 // Reads the Pedestal values
89 {
90 public:
91  int getPadList(int PadRow, unsigned char **padList);
92  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
93  int getNumberOfEvents();
94 
95  int MemUsed();
96 
97  FTPV1P0_PEDR_SR(int sector, FTPV1P0_Reader *);
98  int initialize();
99  ~FTPV1P0_PEDR_SR();
100 
101 private:
102  int sector;
103  int numEvents;
104  FTPV1P0_Reader *detector;
105  FTPV1P0_PADK_SR *padkr;
106  u_char padlist[FTP_PADROWS][FTP_MAXPADS];
107 
108  classname(Bank_FTPPEDR) *bank;
109 };
110 
111 // The RMS pedestal values
113 {
114 public:
115  int getPadList(int PadRow, unsigned char **padList);
116  int getSequences(int PadRow, int Pad, int *nArray, u_char **Array);
117  int getNumberOfEvents();
118 
119  int MemUsed();
120 
121  FTPV1P0_PRMS_SR(int sector, FTPV1P0_Reader *);
122  int initialize();
123  ~FTPV1P0_PRMS_SR();
124 
125 private:
126  int sector;
127  int numEvents;
128  FTPV1P0_Reader *detector;
129  FTPV1P0_PADK_SR *padkr;
130  u_char padlist[FTP_PADROWS][FTP_MAXPADS];
131 
132  classname(Bank_FTPRMSR) *bank;
133 };
134 
135 // The gain reader
136 class FTPV1P0_G_SR : public GainReader
137 {
138 public:
139  int getGain(int PadRow, int Pad, struct Gain **gain);
140  int getMeanGain();
141  int getNumberOfEvents();
142 
143  int MemUsed();
144 
145  FTPV1P0_G_SR(int sector, FTPV1P0_Reader *);
146  int initialize();
147  ~FTPV1P0_G_SR();
148 };
149 
150 // Reads Cluster Pointer Pairs from the ASIC
151 class FTPV1P0_CPP_SR : public CPPReader
152 {
153 public:
154  int getClusters(int PadRow, int Pad, int *nClusters,
155  struct ASIC_Cluster **clusters);
156  int getAsicParams(ASIC_params *){return FALSE;};
157 
158  int MemUsed();
159 
160  FTPV1P0_CPP_SR(int sector, FTPV1P0_Reader *);
161  int initialize();
162  ~FTPV1P0_CPP_SR();
163 
164 private:
165  int sector;
166  FTPV1P0_Reader *detector;
167  FTPV1P0_PADK_SR *padkr;
168  classname(Bank_FTPCPPR) *bank;
169 };
170 
171 // Reads the bad channels
173 {
174 public:
175  int IsBad(int PadRow, int Pad);
176 
177  int MemUsed();
178 
179  FTPV1P0_BC_SR(int sector, FTPV1P0_Reader *);
180  int initialize();
181  ~FTPV1P0_BC_SR();
182 };
183 
184 // Read the front end electronics configuration
186 {
187 public:
188  int FEE_id(int PadRow, int Pad) = 0;
189  // returns FEE_id
190 
191  int MemUsed();
192 
193  FTPV1P0_CR_SR(int sector, FTPV1P0_Reader *);
194  int initialize();
195  ~FTPV1P0_CR_SR();
196 };
197 
199 {
200  short offset;
201 };
202 
204 {
205 public:
206  FTPV1P0_PADK_SR(int sector, FTPV1P0_Reader *);
207  int initialize();
208 
209  void place(short padrow, short pad, FTPPADK_entry *);
210  void get(short padrow, short pad, FTPPADK_entry *);
211 
212  int getADCBytes() { return 512; };
213  int getCPPBytes() { return 128; };
214  int getPEDBytes() { return 512; };
215  int getRMSBytes() { return 512; };
216  int getCFGBytes() { return 1; };
217  int getGAINBytes() { return 4; };
218 
219 private:
220  int sector;
221  FTPV1P0_Reader *detector;
222 
223  short packed_address[FTP_PADROWS][FTP_MAXPADS];
224 
225  short pack(short offset);
226  void unpack(FTPPADK_entry *, short paddress);
227 };
228 
229 #endif
230 
231 
232 
233 
234 
Definition: FTPV1P0.hh:198