66 #ifndef trgStructures2008_h
67 #define trgStructures2008_h
69 #define y8MAX_OFFSET 25
70 #define y8MAX_L0_DATA_BLOCKS 11
71 #define y8MAX_RAW_DATA_BLOCKS 11
72 #define y8FORMAT_VERSION 0x32
73 #define y8TRANSFER_VERSION 0x10
74 #define y8EV_DESC_LEN sizeof(EvtDescData2008)
75 #define y8L0DSM_DATA_LEN sizeof(L0_DSM_Data2008)
76 #define y8RAW_DET_DATA_LEN sizeof(RawTrgDet2008)
77 #define y8TRG_SUM_LEN sizeof(TrgSumData2008)
78 #define y8BTOW_LEN ((64 + 2 + 30*164)*2)
79 #define y8ETOW_LEN ((64 + 2 + 6*164)*2)
80 #define y8L1_DATA_LEN (y8EV_DESC_LEN+y8TRG_SUM_LEN)
81 #define y8TRG_EVT_LEN (y8L1_DATA_LEN+(y8MAX_RAW_DATA_BLOCKS*y8RAW_DET_DATA_LEN))
82 #define y8TRG_TOWER_LEN (4 + (y8MAX_OFFSET*8) + y8L1_DATA_LEN + y8RAW_DET_DATA_LEN + y8BTOW_LEN + y8ETOW_LEN)
84 #define y8RAW_MAX_LEN 272
87 #define y8BTOW_INDEX 1
88 #define y8ETOW_INDEX 2
89 #define y8RAW_TRG_INDEX 3
91 #define L2RESULTS_2008_OFFSET_TRG 0
92 #define L2RESULTS_2008_OFFSET_EMC_CHECK 1
93 #define L2RESULTS_2008_OFFSET_JPSI 2
94 #define L2RESULTS_2008_OFFSET_UPS 8
95 #define L2RESULTS_2008_OFFSET_EMC_PED 14
96 #define L2RESULTS_2008_OFFSET_GAMMA 20
97 #define L2RESULTS_2008_OFFSET_DIJET 32
99 #define y8ADD_BIT_PILEUP 0
100 #define y8ADD_BIT_FORCE 5
101 #define y8ADD_BIT_L2_5 6
102 #define y8ADD_BIT_SIM 7
109 unsigned short TCUdataBytes;
111 unsigned char TrgDataFmtVer;
112 unsigned int bunchXing_hi;
113 unsigned int bunchXing_lo;
114 unsigned short actionWdDetectorBitMask;
115 unsigned char actionWdTrgCommand;
116 unsigned char actionWdDaqCommand;
117 unsigned short TrgToken;
118 unsigned short addBits;
119 unsigned short DSMInput;
120 unsigned short externalBusy;
121 unsigned short modifiedBusyStatus;
122 unsigned short physicsWord;
123 unsigned short TriggerWord;
124 unsigned short DSMAddress;
125 unsigned short contaminationBusyStatus;
127 unsigned short npost;
128 unsigned short dummy;
136 unsigned short CPA[16];
137 unsigned short MTD[8];
138 unsigned short VPD[8];
139 unsigned short CTB[8];
140 unsigned short lastDSM[8];
141 unsigned short VTX[8];
142 unsigned short EMC[8];
143 unsigned short BCdata[16];
144 unsigned short specialTriggers[8];
145 unsigned short FPD[8];
152 unsigned short TrgSumBytes;
153 unsigned short TrgSumHeader;
154 unsigned int L1Sum[2];
155 unsigned int L2Sum[2];
156 unsigned short L0SumBytes;
157 unsigned short L0SumHeader;
159 unsigned short L1SumBytes;
160 unsigned short L1SumHeader;
161 unsigned int L1Result[32];
162 unsigned short L2SumBytes;
163 unsigned short L2SumHeader;
164 unsigned int L2Result[64];
177 unsigned short RawDetBytes;
178 char RawDetHeader[2];
179 unsigned short CTBdataBytes;
180 char CTBdataHeader[2];
181 unsigned char CTB[256];
182 unsigned short MIXdataBytes;
183 char MIXdataHeader[2];
184 unsigned int MIXfiller;
185 unsigned char MTD[32];
186 unsigned char VPD[64];
187 unsigned char P2P[32];
188 unsigned char TOF[16];
189 unsigned short BEMCdataBytes;
190 char BEMCdataHeader[2];
191 unsigned int BEMCfiller;
192 unsigned char BEMCEast[240];
193 unsigned char BEMCWest[240];
194 unsigned short BEMClayer1[48];
195 unsigned short EEMCdataBytes;
196 char EEMCdataHeader[2];
197 unsigned int EEMCfiller;
198 unsigned short EEMClayer1[16];
199 unsigned char EEMC[144];
200 unsigned short FPDdataBytes;
201 char FPDdataHeader[2];
202 unsigned int FPDfiller;
203 unsigned char FPDEastNSLayer0[112];
204 unsigned short FPDEastNSLayer1[8];
205 unsigned char FPDEastTBLayer0[16];
206 unsigned char FPDW[256];
207 unsigned short BBCdataBytes;
208 char BBCdataHeader[2];
209 unsigned int BBCfiller;
210 unsigned char BBC[96];
211 unsigned short BBClayer1[16];
212 unsigned char ZDC[16];
213 unsigned short ZDClayer1[8];
214 unsigned char ZDCSMD[32];
215 unsigned short QQTdataBytes;
216 char QQTdataHeader[2];
217 unsigned int QQTfiller;
218 unsigned int QQTdata[1600];
237 int byteCount_Version;