StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TPCV2P0.Banks.hh
1 /***************************************************************************
2  * $Id: TPCV2P0.Banks.hh,v 1.3 1999/07/22 17:56:27 levine Exp $
3  * Author: M.W. Schulz, Jeff Landgraf and M.J. LeVine
4  ***************************************************************************
5  * Description: Record Formats for Version 2.0
6  *
7  *
8  * change log
9  * 02-Jun-99 MJL changed HyperSector[12] to HyperSector[24]
10  * 12-Jul-99 MJL add TPCMZCLD
11  *
12  ***************************************************************************
13  * $Log: TPCV2P0.Banks.hh,v $
14  * Revision 1.3 1999/07/22 17:56:27 levine
15  * add TPCMZCLD (mezz cluster pointer bank) description
16  *
17  * Revision 1.2 1999/07/02 04:43:23 levine
18  * Many changes -
19  * navigates to head of TPCP bank independent of position.
20  * move declarations out of loops where they were upsetting some compilers
21  * suppress output from class libraries with run-time switch EventReader.verbose
22  * added TPCV2P0_CPP_SR::getAsicParams()
23  *
24  *
25  **************************************************************************/
26 
27 #ifndef RECFORMATS_HH
28 #define RECFORMATS_HH
29 
30 
31 #define classname(x) x ## V2P0 //embed version number in bank name
32 
33 #include <sys/types.h>
34 #include "StDaqLib/GENERIC/RecHeaderFormats.hh"
35 
36 /* Used for variable length array declarations to get pointer type correct */
37 #define VARLENGTH 1
38 
39 // default swap
40 struct classname(Bank_TPCP): public Bank
41 {
42  Pointer HyperSector[24]; // Hypersectors 1->sectors 1,2
43  // 3->sectors 3,4
44  // etc... upto 23->sectors 23,24
45 };
46 
47 // default swap
48 struct classname(Bank_TPCSECP) : public Bank
49 {
50  Pointer RcvBoard[12]; // [0-5] are odd sector, rcv 1...6
51  // [6-11] are even sector, rcv 1...6
52 };
53 
54 // override swap
55 struct classname(Bank_TPCRBP) : public Bank
56 {
57  Pointer Mz[3]; // [0]=mz a, [1]=mz b, [2]=mz c
58  char FiberHeader[64];
59 
60  int swap();
61 };
62 
63 // Default swap
64 struct classname(Bank_TPCMZP) : public Bank
65 {
70  Pointer TPCCPPR;
71  Pointer TPCADCR;
72  Pointer TPCMZCLD;
78 };
79 
80 // TPCADCD - currently no compressed data. This structure
81 // only works with uncompressed data.
82 //
83 // override swap
84 struct classname(Bank_TPCADCD) : public Bank // zero suppressed data
85 {
86  char ADC[VARLENGTH];
87  int swap();
88 };
89 
90 // override swap
91 struct classname(Bank_TPCADCR) : public Bank // Mezzanine ADC Raw
92 {
93  char ADC[VARLENGTH];
94  int swap();
95 };
96 
97 struct Coordinates
98 {
99  u_char pad_row; // 0xff signifies invalid
100  u_char pad;
101 };
102 
103 // override swap
104 struct classname(Bank_TPCPADK) : public Bank
105 {
106  INT32 bpADC;
107  INT32 bpCPP;
108  INT32 bpPED;
109  INT32 bpRMS;
110  INT32 bpCFG;
111  INT32 bpGAIN;
112  Coordinates index[384];
113 
114  int swap();
115 };
116 
117 struct ADCX_entry
118 {
119  INT32 pad_row;
120  INT32 TPCADCD_offset; // offset to padrow in TPCADCD
121  INT32 TPCSEQD_offset; // offset to padrow in TPCSEQD
122 };
123 
124 // default swap
125 struct classname(Bank_TPCADCX) : public Bank // Mezzanine Index Bank
126 {
127  ADCX_entry entry[VARLENGTH]; // up to 4 repeats
128 };
129 
130 
131 struct CPPR_entry
132 {
133  INT16 start_time_bin;
134  INT16 stop_time_bin;
135 };
136 
137 // override swap
138 struct classname(Bank_TPCCPPR) : public Bank
139 {
140  ASIC_params asic_params;
141  CPPR_entry entry[12288];
142 
143  int swap();
144 };
145 
146 
147 // override swap
148 struct classname(Bank_TPCSEQD) : public Bank
149 {
150  INT16 sequence[VARLENGTH];
151 
152  int swap();
153 };
154 
155 // override swap
156 struct classname(Bank_TPCCFGR) : public Bank
157 {
158  char FEE_id[384];
159 
160  int swap();
161 };
162 
163 struct BADR_entry
164 {
165  u_char row;
166  u_char pad;
167 };
168 
169 // override swap
170 struct classname(Bank_TPCBADR) : public Bank
171 {
172  BADR_entry badChannel[VARLENGTH];
173  int swap();
174 };
175 
176 struct classname(Bank_TPCPEDR) : public Bank
177 {
178  INT32 NumEvents;
179  char pedestal[196608]; // 348 pads/mez * 512 timebins
180 
181  int swap();
182 };
183 
184 struct classname(Bank_TPCRMSR) : public Bank
185 {
186  INT32 NumEvents;
187  char pedRMSt16[196608]; // pedRMS * 16
188 
189  int swap();
190 };
191 
192 struct GAINR_entry
193 {
194  INT16 t0t16; // t0 * 16
195  char t0_RMSt16; // t0_RMS * 16
196  char rel_gaint64; // rel gain ~n 1 * 64
197 };
198 
199 struct classname(Bank_TPCGAINR) : public Bank
200 {
201  INT32 NumEvents;
202  INT32 MeanGain;
203  GAINR_entry Gain[384];
204 
205  int swap();
206 };
207 
208 // override swap
209 struct classname(Bank_TPCMZCLD) : public Bank
210 {
211  INT32 NumRows;
212  INT32 stuff[10]; // placeholder for actual bank contents
213  int swap();
214 };
215 
216 #endif
217 
218 
219