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