38 #ifndef trgStructures2003_h
39 #define trgStructures2003_h
41 #define y3MAX_L0_DATA_BLOCKS 11
42 #define y3MAX_RAW_DATA_BLOCKS 11
43 #define y3FORMAT_VERSION 0x20
44 #define y3EV_DESC_LEN sizeof(EvtDescData)
45 #define y3L0DSM_DATA_LEN sizeof(L0_DSM_Data)
46 #define y3RAW_DET_DATA_LEN sizeof(RawTrgDet)
47 #define y3TRG_SUM_LEN sizeof(TrgSumData)
49 #define y3L1_DATA_LEN (y3EV_DESC_LEN+y3TRG_SUM_LEN)
50 #define y3TRG_EVT_LEN (y3L1_DATA_LEN+(y3MAX_RAW_DATA_BLOCKS*y3RAW_DET_DATA_LEN))
51 #define y3TDI_EVT_LEN (y3EV_DESC_LEN+y3TRG_SUM_LEN+(y3MAX_RAW_DATA_BLOCKS*y3RAW_DET_DATA_LEN))
53 #define y3L0_SUM_LEN 148
54 #define y3L1_SUM_LEN 132
55 #define y3L2_SUM_LEN 116
56 #define y3L0_REG_LEN 16
58 #define y3CTB_DATA_OFFSET 8
59 #define y3RAW_CTB_LEN 256
60 #define y3MWC_DATA_OFFSET 272
61 #define y3RAW_MWC_LEN 128
62 #define y3BCE_DATA_OFFSET 408
63 #define y3RAW_BCE_LEN 240
64 #define y3BCW_DATA_OFFSET 648
65 #define y3RAW_BCW_LEN 240
66 #define y3BC1_DATA_OFFSET 888
67 #define y3RAW_BC1_LEN 96
68 #define y3EEC_DATA_OFFSET 992
69 #define y3RAW_EEC_LEN 176
70 #define y3FPE_DATA_OFFSET 1176
71 #define y3RAW_FPE_LEN 208
72 #define y3FPW_DATA_OFFSET 1384
73 #define y3RAW_FPW_LEN 208
74 #define y3BBC_DATA_OFFSET 1600
75 #define y3RAW_BBC_LEN 144
78 #define y3ADD_BIT_PILEUP 0
79 #define y3ADD_BIT_FORCE 5
80 #define y3ADD_BIT_L2_5 6
81 #define y3ADD_BIT_SIM 7
89 unsigned short TCUdataBytes;
91 unsigned char TrgDataFmtVer;
92 unsigned int bunchXing_hi;
93 unsigned int bunchXing_lo;
94 unsigned short actionWdDetectorBitMask;
95 unsigned char actionWdTrgCommand;
96 unsigned char actionWdDaqCommand;
97 unsigned short TrgToken;
98 unsigned short addBits;
99 unsigned short DSMInput;
100 unsigned short externalBusy;
101 unsigned short modifiedBusyStatus;
102 unsigned short physicsWord;
103 unsigned short TriggerWord;
104 unsigned short DSMAddress;
105 unsigned short contaminationBusyStatus;
107 unsigned short npost;
108 unsigned short dummy;
116 unsigned short CPA[32];
117 unsigned short quadDSM[8];
118 unsigned short lastDSM[8];
119 unsigned short VTX[8];
120 unsigned short EMC[8];
121 unsigned short BCdata[16];
122 unsigned short specialTriggers[8];
123 unsigned short FPD[8];
130 unsigned short TrgSumBytes;
131 unsigned short TrgSumHeader;
132 unsigned int L1Sum[2];
133 unsigned int L2Sum[2];
134 unsigned short L0SumBytes;
135 unsigned short L0SumHeader;
137 unsigned short L1SumBytes;
138 unsigned short L1SumHeader;
139 unsigned int L1Result[32];
140 unsigned short L2SumBytes;
141 unsigned short L2SumHeader;
142 unsigned int L2Result[32];
155 unsigned short RawDetBytes;
156 char RawDetHeader[2];
157 unsigned short CTBdataBytes;
158 char CTBdataHeader[2];
159 unsigned char CTB[256];
160 unsigned short MWCdataBytes;
161 char MWCdataHeader[2];
162 unsigned int MWCfiller;
163 unsigned char MWC[128];
164 unsigned short BEMCdataBytes;
165 char BEMCdataHeader[2];
166 unsigned int BEMCfiller;
167 unsigned char BEMCEast[240];
168 unsigned char BEMCWest[240];
169 unsigned short BEMClayer1[48];
170 unsigned short EEMCdataBytes;
171 char EEMCdataHeader[2];
172 unsigned int EEMCfiller;
173 unsigned short EEMClayer1[16];
174 unsigned char EEMC[144];
175 unsigned short FPDdataBytes;
176 char FPDdataHeader[2];
177 unsigned int FPDfiller;
178 unsigned char FPDEastNSLayer0[112];
179 unsigned short FPDEastNSLayer1[8];
180 unsigned char FPDEastTBLayer0[64];
181 unsigned short FPDEastTBLayer1[8];
182 unsigned char FPDWestNSLayer0[112];
183 unsigned short FPDWestNSLayer1[8];
184 unsigned char FPDWestTBLayer0[64];
185 unsigned short FPDWestTBLayer1[8];
186 unsigned short BBCdataBytes;
187 char BBCdataHeader[2];
188 unsigned int BBCfiller;
189 unsigned char BBC[80];
190 unsigned short BBClayer1[16];
191 unsigned char ZDC[16];
192 unsigned short ZDClayer1[8];