StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
FTPV1P0.Banks.hh
1 /***************************************************************************
2  * $Id: FTPV1P0.Banks.hh,v 1.2 2001/06/24 22:27:25 jcs Exp $
3  * Author: M.J. LeVine, J.Klay, H.Huemmler
4  ***************************************************************************
5  * Description: Record Formats for Version 1.0
6  *
7  *
8  * change log
9  *
10  ***************************************************************************
11  * $Log: FTPV1P0.Banks.hh,v $
12  * Revision 1.2 2001/06/24 22:27:25 jcs
13  * cleanup comments
14  *
15  * Revision 1.1 2000/01/18 18:01:20 levine
16  * Hummler's implementaiton of FTPC reader. Note that method
17  *
18  * FTPV1P0_ZS_SR::getFeeSequences(int Fee, int Pin, int *nSeq,
19  * Sequence **SeqData)
20  *
21  * causes exit() since the required #include file has not yet been
22  * (correctly) implemented.
23  *
24  *
25  *
26  **************************************************************************/
27 
28 #ifndef RECFORMATS_HH
29 #define RECFORMATS_HH
30 
31 
32 #define classname(x) x ## V1P0 //embed version number in bank name
33 
34 #include <sys/types.h>
35 #include "StDaqLib/GENERIC/RecHeaderFormats.hh"
36 
37 /* Used for variable length array declarations to get pointer type correct */
38 #define VARLENGTH 1
39 
40 // default swap
41 struct classname(Bank_FTPP): public Bank
42 {
43 
44  Pointer Chamber[2]; // Two FTP chambers
45 };
46 
47 // default swap
48 struct classname(Bank_FTPCHAP) : public Bank
49 {
50  Pointer RcvBoard[10]; // 10 rcvboards per chamber
51 
52 };
53 
54 // override swap
55 struct classname(Bank_FTPRBP) : public Bank
56 {
57  Pointer Sector[3]; // 3 sectors per rcvboard
58  char FiberHeader[64];
59 
60  int swap();
61 };
62 
63 // default swap
64 struct classname(Bank_FTPAZIP) : public Bank
65 {
66  Pointer Mz[3]; // [0]=mz a, [1]=mz b, [2]=mz c
67 
68 };
69 
70 // Default swap
71 struct classname(Bank_FTPMZP) : public Bank
72 {
73  Pointer FTPADCD;
74  Pointer FTPSEQD;
75  Pointer FTPADCX;
77  Pointer FTPCPPR;
78  Pointer FTPADCR;
79  Pointer FTPMZCLD;
81  Pointer FTPPEDR;
82  Pointer FTPRMSR;
85 };
86 
87 // FTPADCD - currently no compressed data. This structure
88 // only works with uncompressed data.
89 //
90 // override swap
91 struct classname(Bank_FTPADCD) : public Bank // zero suppressed data
92 {
93  char ADC[VARLENGTH];
94  int swap();
95 };
96 
97 // override swap
98 struct classname(Bank_FTPADCR) : public Bank // Mezzanine ADC Raw
99 {
100  char ADC[VARLENGTH];
101  int swap();
102 };
103 
105 {
106  u_char pad_row; // 0xff signifies invalid
107  u_char pad;
108 };
109 
110 // override swap
111 struct classname(Bank_FTPPADK) : public Bank
112 {
113  INT32 bpADC;
114  INT32 bpCPP;
115  INT32 bpPED;
116  INT32 bpRMS;
117  INT32 bpCFG;
118  INT32 bpGAIN;
119  Coordinates index[320];
120 
121  int swap();
122 };
123 
125 {
126  INT32 pad_row;
127  INT32 FTPADCD_offset; // offset to padrow in FTPADCD
128  INT32 FTPSEQD_offset; // offset to padrow in FTPSEQD
129 };
130 
131 // default swap
132 struct classname(Bank_FTPADCX) : public Bank // Mezzanine Index Bank
133 {
134  FTPADCX_entry entry[VARLENGTH];
135 };
136 
137 // Already defined in StDaqLib/GENERIC/RecHeaderFormats.hh
138 // struct ASIC_params
139 // these params used to emulate ASIC behavior in the reader
140 // {
141 // unsigned char thresh_lo;
142 // unsigned char thresh_hi;
143 // unsigned char n_seq_lo;
144 // unsigned char n_seq_hi;
145 // };
146 
147 struct CPPR_entry
148 {
149  INT16 start_time_bin;
150  INT16 stop_time_bin;
151 };
152 
153 // override swap
154 struct classname(Bank_FTPCPPR) : public Bank
155 {
156  ASIC_params asic_params;
157  CPPR_entry entry[10240];
158 
159  int swap();
160 };
161 
162 // override swap
163 struct classname(Bank_FTPSEQD) : public Bank
164 {
165  INT16 sequence[VARLENGTH];
166 
167  int swap();
168 };
169 
170 // override swap
171 struct classname(Bank_FTPCFGR) : public Bank
172 {
173  char FEE_id[320];
174 
175  int swap();
176 };
177 
179 {
180  u_char row;
181  u_char pad;
182 };
183 
184 // override swap
185 struct classname(Bank_FTPBADR) : public Bank
186 {
187  BADR_entry badChannel[VARLENGTH];
188  int swap();
189 };
190 
191 struct classname(Bank_FTPPEDR) : public Bank
192 {
193  INT32 NumEvents;
194  char pedestal[163840]; // 320 pads/mez * 512 timebins
195 
196  int swap();
197 };
198 
199 struct classname(Bank_FTPRMSR) : public Bank
200 {
201  INT32 NumEvents;
202  char pedRMSt16[163840]; // pedRMS * 16
203 
204  int swap();
205 };
206 
208 {
209  INT16 t0t16; // t0 * 16
210  char t0_RMSt16; // t0_RMS * 16
211  char rel_gaint64; // rel gain ~n 1 * 64
212 };
213 
214 struct classname(Bank_FTPGAINR) : public Bank
215 {
216  INT32 NumEvents;
217  INT32 MeanGain;
218  GAINR_entry Gain[320];
219 
220  int swap();
221 };
222 
223 #endif
224 
225 
226