]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TOF/AliTOFRawStream.h
Enabled option for selecting tree name in trneding macro
[u/mrichter/AliRoot.git] / TOF / AliTOFRawStream.h
1 #ifndef ALITOFRAWSTREAM_H
2 #define ALITOFRAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////
9 //                                                           //
10 //   This class provides the key-reading for TOF raw data.   //
11 //                                                           //
12 ///////////////////////////////////////////////////////////////
13
14 #include "TObject.h"
15
16 //#include "AliTOFHitData.h"
17 #include "AliTOFHitDataBuffer.h"
18 #include "AliTOFDecoder.h"
19 //#include "AliTOFCableLengthMap.h"
20
21 class AliTOFHitData;
22
23 class AliTOFDecoderV2;
24
25 /**********************************
26  * OLD DEFINITIONS 
27  **********************************/ 
28
29 /******************************************
30 GENERAL DATA FORMAT                    
31 ******************************************/
32
33 //filler
34 //#ifndef FILLER
35 #define FILLER 0x70000000
36 //#endif
37
38 //word type mask/position
39 #define WORD_TYPE_MASK 0xf0000000
40 #define WORD_TYPE_POSITION 28
41
42 //global header word required bit pattern
43 #define GLOBAL_HEADER 0x40000000
44
45 //global trailer word required bit pattern
46 #define GLOBAL_TRAILER 0x50000000
47
48 //error word required bit pattern
49 // already defined in AliTOFDecoder
50 //#define ERROR 0x30000000
51
52 //header slot ID mask/position
53 #define HEADER_SLOT_ID_MASK 0x0000000f
54 #define HEADER_SLOT_ID_POSITION 0
55
56 //word types
57 #define GLOBAL_HEADER_TYPE 4
58 #define GLOBAL_TRAILER_TYPE 5
59 #define ERROR_TYPE 6
60 #define FILLER_TYPE 7
61 #define TRM_CHAIN0_HEADER_TYPE 0
62 #define TRM_CHAIN0_TRAILER_TYPE 1
63 #define TRM_CHAIN1_HEADER_TYPE 2
64 #define TRM_CHAIN1_TRAILER_TYPE 3
65
66 //slot types
67 #define DRM_ID_NUMBER 1
68 #define LTM_ID_NUMBER 2
69
70
71 /******************************************
72 DRM DATA FORMAT                        
73 ******************************************/
74
75 //DRM global header word required bit pattern
76 #define DRM_GLOBAL_HEADER 0x40000001
77
78 //DRM event words mask/position
79 #define DRM_EVENT_WORDS_MASK 0x001ffff0
80 #define DRM_EVENT_WORDS_POSITION 4
81
82 //DRM DRM ID mask/position
83 #define DRM_DRM_ID_MASK 0x0fe00000
84 #define DRM_DRM_ID_POSITION 21
85
86 //DRM status header 1 word required bit pattern
87 #define DRM_STATUS_HEADER_1 0x40000001
88
89 //DRM slot ID mask/position
90 #define DRM_SLOT_ID_MASK 0x00007ff0
91 #define DRM_SLOT_ID_POSITION 4
92
93 //DRM C-bit mask/position
94 #define DRM_C_BIT_MASK 0x00008000
95 #define DRM_C_BIT_POSITION 15
96
97 //DRM Vers-ID mask/position
98 #define DRM_VERS_ID_MASK 0x001f0000
99 #define DRM_VERS_ID_POSITION 16
100
101 //DRM DRM Header size mask/position
102 #define DRM_HEADER_SIZE_MASK 0x01e00000
103 #define DRM_HEADER_SIZE_POSITION 21
104
105 //DRM status header 2 word required bit pattern
106 #define DRM_STATUS_HEADER_2 0x40000001
107
108 //DRM enable ID mask/position
109 #define DRM_ENABLE_ID_MASK 0x00007ff0
110 #define DRM_ENABLE_ID_POSITION 4
111
112 //DRM zero in word2 mask/position
113 #define DRM_ZERO_WORD2_MASK 0x00008000
114 #define DRM_ZERO_WORD2_POSITION 15
115
116 //DRM fault ID mask/position
117 #define DRM_FAULT_ID_MASK 0x07ff0000
118 #define DRM_FAULT_ID_POSITION 16
119
120 //DRM RTO bit mask/position
121 #define DRM_RTO_BIT_MASK 0x08000000
122 #define DRM_RTO_BIT_POSITION 27
123
124 //DRM status header 3 word required bit pattern
125 #define DRM_STATUS_HEADER_3 0x40000001
126
127 //DRM L0 BCID mask/position
128 #define DRM_L0_BCID_MASK 0x0000fff0
129 #define DRM_L0_BCID_POSITION 4
130
131 //DRM Run Time Info mask/position
132 #define DRM_RUNTIME_INFO_MASK 0x0fff0000
133 #define DRM_RUNTIME_INFO_POSITION 16
134
135 //DRM status header 4 word required bit pattern
136 #define DRM_STATUS_HEADER_4 0x40000001
137
138 //DRM Temperature mask/position
139 #define DRM_TEMPERATURE_MASK 0x00003ff0
140 #define DRM_TEMPERATURE_POSITION 4
141
142 //DRM 1st zero in word4 mask/position
143 #define DRM_ZERO_1_WORD4_MASK 0x00004000
144 #define DRM_ZERO_1_WORD4_POSITION 14
145
146 //DRM ACK mask/position
147 #define DRM_ACK_MASK 0x00008000
148 #define DRM_ACK_POSITION 15
149
150 //DRM Sens AD mask/position
151 #define DRM_SENS_AD_MASK 0x00070000
152 #define DRM_SENS_AD_POSITION 16
153
154 //DRM 2nd zero in word4 mask/position
155 #define DRM_ZERO_2_WORD4_MASK 0x00080000
156 #define DRM_ZERO_2_WORD4_POSITION 19
157
158 //DRM event CRC mask/position
159 #define DRM_EVENT_CRC_MASK 0x000ffff0
160 #define DRM_EVENT_CRC_POSITION 4
161
162 //DRM global trailer word required bit pattern
163 #define DRM_GLOBAL_TRAILER 0x50000001
164
165 //DRM local event counter mask/position
166 #define DRM_LOCAL_EVENT_COUNTER_MASK 0x0000fff0
167 #define DRM_LOCAL_EVENT_COUNTER_POSITION 4
168
169
170 /******************************************
171 TRM DATA FORMAT                        
172 ******************************************/
173
174 //TRM global header word required bit pattern
175 #define TRM_GLOBAL_HEADER 0x40000000
176
177 //TRM slot ID mask/position
178 #define TRM_SLOT_ID_MASK 0x0000000f
179 #define TRM_SLOT_ID_POSITION 0
180
181 //TRM event words mask/position
182 #define TRM_EVENT_WORDS_MASK 0x0001fff0
183 #define TRM_EVENT_WORDS_POSITION 4
184
185 //TRM ACQ-bits mask/position
186 #define TRM_ACQ_BITS_MASK 0x00060000
187 #define TRM_ACQ_BITS_POSITION 17
188
189 //TRM L-bit mask/position
190 #define TRM_L_BIT_MASK 0x00080000
191 #define TRM_L_BIT_POSITION 19
192
193 //TRM chain-0 header word required bit pattern
194 #define TRM_CHAIN_0_HEADER 0x00000000
195
196 //TRM chain-1 header word required bit pattern
197 #define TRM_CHAIN_1_HEADER 0x20000000
198
199 //TRM bunch ID mask/position
200 #define TRM_BUNCH_ID_MASK 0x0000fff0
201 #define TRM_BUNCH_ID_POSITION 4
202
203 //TRM PB24 temp mask/position
204 #define TRM_PB24_TEMP_MASK 0x00ff0000
205 #define TRM_PB24_TEMP_POSITION 16
206
207 //TRM PB24 ID mask/position
208 #define TRM_PB24_ID_MASK 0x07000000
209 #define TRM_PB24_ID_POSITION 24
210
211 //TRM TS-bit mask/position
212 #define TRM_TS_BIT_MASK 0x08000000
213 #define TRM_TS_BIT_POSITION 27
214
215 //TRM chain-0 trailer word required bit pattern
216 #define TRM_CHAIN_0_TRAILER 0x10000000
217
218 //TRM chain-1 trailer word required bit pattern
219 #define TRM_CHAIN_1_TRAILER 0x30000000
220
221 //TRM status mask/position
222 #define TRM_STATUS_MASK 0x0000000f
223 #define TRM_STATUS_POSITION 0
224
225
226 //TDC digit
227
228 //TRM TDC digit word required bit pattern
229 #define TRM_TDC_DIGIT 0x8000000
230
231 //TRM digit time mask/position
232 #define TRM_DIGIT_TIME_MASK 0x00001fff
233 #define TRM_DIGIT_TIME_POSITION 0
234
235 //TRM long digit time mask/position
236 #define TRM_LONG_DIGIT_TIME_MASK 0x001fffff
237 #define TRM_LONG_DIGIT_TIME_POSITION 0
238
239 //TRM TOT width mask/position
240 #define TRM_TOT_WIDTH_MASK 0x001fe000
241 #define TRM_TOT_WIDTH_POSITION 13
242
243 //TRM chan mask/position
244 #define TRM_CHAN_MASK 0x00e00000
245 #define TRM_CHAN_POSITION 21
246
247 //TRM TDC ID mask/position
248 #define TRM_TDC_ID_MASK 0x0f000000
249 #define TRM_TDC_ID_POSITION 24
250
251 //TRM E-bit mask/position
252 #define TRM_E_BIT_MASK 0x10000000
253 #define TRM_E_BIT_POSITION 28
254
255 //TRM PS-bits mask/position
256 #define TRM_PS_BITS_MASK 0x60000000
257 #define TRM_PS_BITS_POSITION 29
258
259 #define TRM_FIRST_SLOT_ID 3
260
261 //define hptdc time bin width
262 #define TIME_BIN_WIDTH 24.4e-3 //ns
263
264 //define hptdc tot bin width
265 // already defined in AliTOFDecoder
266 //#define TOT_BIN_WIDTH 48.4e-3 //ns
267
268 //TRM errors
269
270 //TRM TDC error word required bit pattern
271 #define TRM_TDC_ERROR 0x6000000
272
273 //TRM TDC diagnostic error word required bit pattern
274 #define TRM_TDC_DIAGNOSTIC_ERROR 0x6f00000
275
276 //TRM TDC error flags mask/position
277 #define TRM_TDC_ERROR_FLAGS_MASK 0x00007fff
278 #define TRM_TDC_ERROR_FLAGS_POSITION 0
279
280 //TRM TDC error TDC ID mask/position
281 #define TRM_TDC_ERROR_TDC_ID_MASK 0x0f00000
282 #define TRM_TDC_ERROR_TDC_ID_POSITION 24
283
284 //TRM TDC fault chip flag ID mask/position
285 #define TRM_TDC_ERROR_FAULT_CHIP_FLAG_ID_MASK 0x00007fff
286 #define TRM_TDC_ERROR_FAULT_CHIP_FLAG_ID_POSITION 0
287
288 //TRM TDC error C-bit mask/position
289 #define TRM_TDC_ERROR_C_BIT_MASK 0x00008000
290 #define TRM_TDC_ERROR_C_BIT_POSITION 15
291
292 //TRM TDC JTAG error code mask/position
293 #define TRM_TDC_ERROR_JTAG_ERROR_CODE_MASK 0x000007ff
294 #define TRM_TDC_ERROR_JTAG_ERROR_CODE_POSITION 0
295
296 //TRM TDC disgnostic error TDC ID mask/position
297 #define TRM_TDC_DIAGNOSTIC_ERROR_TDC_ID_MASK 0x00007800
298 #define TRM_TDC_DIAGNOSTIC_ERROR_TDC_ID_POSITION 11 
299
300 //TRM global trailer word required bit pattern
301 //#define TRM_GLOBAL_TRAILER 0x50000000
302 #define TRM_GLOBAL_TRAILER 0x5000000f
303
304 //TRM event CRC mask/position
305 #define TRM_EVENT_CRC_MASK 0x0000fff0
306 #define TRM_EVENT_CRC_POSITION 4
307
308 //TRM event counter mask/position
309 #define TRM_EVENT_COUNTER_MASK 0x0fff0000
310 #define TRM_EVENT_COUNTER_POSITION 16
311
312
313 /******************************************
314 LTM DATA FORMAT                        
315 ******************************************/
316
317 //LTM global header word required bit pattern
318 #define LTM_GLOBAL_HEADER 0x40000002
319
320 //LTM event words mask/position
321 #define LTM_EVENT_WORDS_MASK 0x0001fff0
322 #define LTM_EVENT_WORDS_POSITION 4
323
324 //LTM C-bit mask/position
325 #define LTM_C_BIT_MASK 0x00020000
326 #define LTM_C_BIT_POSITION 17
327
328 //LTM fault mask/position
329 #define LTM_FAULT_MASK 0x00fc0000
330 #define LTM_FAULT_POSITION 18
331
332 //PDL data 
333
334 //PDL value 1 mask/position
335 #define LTM_PDL_VALUE_1_MASK 0x000000ff
336 #define LTM_PDL_VALUE_1_POSITION 0
337
338 //PDL value 2 mask/position
339 #define LTM_PDL_VALUE_2_MASK 0x0000ff00
340 #define LTM_PDL_VALUE_2_POSITION 8
341
342 //PDL value 3 mask/position
343 #define LTM_PDL_VALUE_3_MASK 0x00ff0000
344 #define LTM_PDL_VALUE_3_POSITION 16
345
346 //PDL value 4 mask/position
347 #define LTM_PDL_VALUE_4_MASK 0xff000000
348 #define LTM_PDL_VALUE_4_POSITION 24
349
350 //ADC data 
351
352 //ADC value 1 mask/position
353 #define LTM_ADC_VALUE_1_MASK 0x000003ff
354 #define LTM_ADC_VALUE_1_POSITION 0
355
356 //ADC value 2 mask/position
357 #define LTM_ADC_VALUE_2_MASK 0x000ffc00
358 #define LTM_ADC_VALUE_2_POSITION 10
359
360 //ADC value 3 mask/position
361 #define LTM_ADC_VALUE_3_MASK 0x3ff00000
362 #define LTM_ADC_VALUE_3_POSITION 20
363
364 //LTM global trailer word required bit pattern
365 #define LTM_GLOBAL_TRAILER 0x50000002
366
367 //LTM event CRC mask/position
368 #define LTM_EVENT_CRC_MASK 0x0000fff0
369 #define LTM_EVENT_CRC_POSITION 4
370
371 //LTM event number mask/position
372 #define LTM_EVENT_NUMBER_MASK 0x0fff0000
373 #define LTM_EVENT_NUMBER_POSITION 16
374
375 /******************************************
376  * END OF OLD DEFINITIONS
377  ******************************************/
378
379 class TClonesArray;
380 class AliRawReader;
381 class AliTOFrawData;
382
383 class AliTOFRawStream: public TObject {
384  public:
385
386   AliTOFRawStream(); // default ctr
387   AliTOFRawStream(AliRawReader* rawReader); // ctr
388   virtual ~AliTOFRawStream(); // default dtr
389
390   AliTOFRawStream(const AliTOFRawStream& stream); // copy ctr
391   AliTOFRawStream& operator = (const AliTOFRawStream& stream); // ass. op.
392
393   virtual Bool_t Next();
394   
395   virtual void   LoadRawData(Int_t indexDDL);
396
397   Int_t GetDDL()        const {return fDDL;};
398   Int_t GetTRM()        const {return fTRM;};
399   Int_t GetTDC()        const {return fTDC;};
400   Int_t GetTRMchain()   const {return fTRMchain;};
401   Int_t GetTDCchannel() const {return fTDCchannel;};
402   
403   Int_t GetSector() const {return fSector;};
404   Int_t GetPlate()  const {return fPlate;};
405   Int_t GetStrip()  const {return fStrip;};
406   Int_t GetPadZ()   const {return fPadZ;};
407   Int_t GetPadX()   const {return fPadX;};
408   
409   Int_t GetTofBin() const {return fTime;};
410   Int_t GetToTbin() const {return fToT;};
411   Float_t GetLeadingEdge() const {return fLeadingEdge;};
412   Float_t GetTrailingEdge() const {return fTrailingEdge;};
413
414   Int_t GetPSbit()  const {return fPSbit;};
415   Int_t GetACQ()    const {return fACQ;};
416     
417   Int_t GetErrorFlag()  const {return fErrorFlag;};
418
419   Bool_t GetDecoderVersion() const {return fNewDecoderVersion;};
420
421   void SetDDL(Int_t nDDL)            {fDDL = nDDL;};
422   void SetTRM(Int_t nTRM)            {fTRM = nTRM;};
423   void SetTDC(Int_t nTDC)            {fTDC = nTDC;};
424   void SetTRMchain(Int_t nChain)     {fTRMchain = nChain;};
425   void SetTDCchannel(Int_t nChannel) {fTDCchannel = nChannel;};
426
427   void SetDecoderVersion(Bool_t version) {fNewDecoderVersion = version;};
428
429   TClonesArray *GetRawData() const {return fTOFrawData;};
430
431   void SetSector();
432   void SetPlate();
433   void SetStrip();
434   void SetPadZ();
435   void SetPadX();
436
437   Bool_t GetBCCorrections() const {return fgApplyBCCorrections;}; // getter for the BC application switch
438   Int_t GetDDLBCshift(Int_t ddl) const {return fgkddlBCshift[ddl];}; // getter for the DDL BC shift
439   Int_t GetLocalEventCounterDRM() const {return fLocalEventCounterDRM;}; // getter for the DRM event counter
440   Int_t GetLocalEventCounterLTM() const {return fLocalEventCounterLTM;}; // getter for the LTM event counter
441   Int_t GetLocalEventCounterTRM(Int_t trm) const {return fLocalEventCounterTRM[trm];}; // getter for the TRM event counter
442   Int_t GetLocalEventCounterChain(Int_t trm, Int_t chain) const {return fLocalEventCounterChain[trm][chain];}; // getter for the chain event counter
443   Int_t GetChainBunchID(Int_t trm, Int_t chain) const {return fChainBunchID[trm][chain];}; // getter for the chain BC ID
444
445
446   void Raw2Digits(AliRawReader* rawReader, TClonesArray * const digitsArray);
447   void Raw2SDigits(AliRawReader* rawReader, TClonesArray * const sdigitsArray);
448
449   static void  EquipmentId2VolumeId(Int_t nDDL, Int_t nTRM, Int_t iChain,
450                                     Int_t iTDC, Int_t iCH, Int_t *volume);
451   void  EquipmentId2VolumeId(AliTOFHitData *hitData, Int_t *volume) const;
452   static Int_t Equip2VolNplate(Int_t iDDL, Int_t nTRM, Int_t nTDC);
453   static Int_t Equip2VolNstrip(Int_t iDDL, Int_t nTRM, Int_t nTDC);
454   static Int_t Equip2VolNpad(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH);
455   static Int_t Equip2VolNpadX(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH);
456   static Int_t Equip2VolNpadZ(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH);
457   static Int_t GetDDLnumberPerSector(Int_t nDDL);
458   static Int_t GetSectorNumber(Int_t nDDL);
459
460   static Int_t Geant2DDL(Int_t vol[]);
461   static Int_t Geant2TRM(Int_t vol[]);
462   static Int_t Geant2TDC(Int_t vol[]);
463   static Int_t Geant2Chain(Int_t vol[]);
464   static Int_t Geant2Channel(Int_t vol[]);
465   static void  Geant2EquipmentId(Int_t vol[], Int_t eqId[]);
466
467   Bool_t DecodeDDL(Int_t DDLMin, Int_t DDLMax, Int_t verbose);
468   Bool_t Decode(Int_t verbose);
469   Bool_t DecodeV2(Int_t verbose);
470   AliTOFDecoder *GetDecoder() const {return fDecoder;};
471   AliTOFDecoderV2 *GetDecoderV2() const {return fDecoderV2;};
472   void SetV2718Patch(Bool_t V2718Patch = kTRUE) {fDecoder->SetV2718Patch(V2718Patch);};
473
474   void SetRawReader(AliRawReader * const rawReader) {fRawReader=rawReader;};
475
476   AliTOFHitDataBuffer * GetDataBuffer(Int_t DDL) {return &fDataBuffer[DDL];};
477   AliTOFHitDataBuffer * GetPackedDataBuffer(Int_t DDL) {return &fPackedDataBuffer[DDL];};
478
479   void ResetDataBuffer(Int_t DDL) {fDataBuffer[DDL].Reset();};
480   void ResetPackedDataBuffer(Int_t DDL) {fPackedDataBuffer[DDL].Reset();};
481
482   void ResetBuffers();
483
484   Bool_t LoadRawDataBuffers(Int_t indexDDL, Int_t verbose = 0);
485   Bool_t LoadRawDataBuffersV2(Int_t indexDDL, Int_t verbose = 0);
486   static void ApplyBCCorrections(Bool_t Value = kTRUE) {fgApplyBCCorrections = Value;};
487   
488   Int_t GetEventID() const {return fEventID;}; // getter for the eventID1 (bunch crossing) in the common data header
489
490   void LTM2VolumeID(Int_t iDDL,
491                     Int_t iTRM,
492                     Int_t iChain,
493                     Int_t iTDC,
494                     Int_t iChannel,
495                     Int_t detind0[], Int_t detind1[]) const;
496   void VolumeID2LTM(Int_t detind[],
497                     Int_t &iDDL,
498                     Int_t &iTRM,
499                     Int_t &iChain,
500                     Int_t &iTDC,
501                     Int_t &iChannel) const;
502
503   enum ETOFRawStreamError {
504     kPadXError = 0,
505     kPadAlongStripError = 1,
506     kPlateError = 2,
507     kStripError = 3,
508     kSectorError = 4,
509     kDDLMinError = 5,
510     kDDLMaxError = 6,
511     kDDLdataReading = 7,
512     kDDLDecoder = 8
513   };
514
515  private:
516   
517   Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const;
518   
519   AliRawReader*  fRawReader; // object for reading the raw data
520
521   TClonesArray *fTOFrawData; // pointer to AliTOFrawData TClonesArray
522
523   AliTOFDecoder *fDecoder; //pointer to TOF decoder
524   AliTOFDecoderV2 *fDecoderV2; //pointer to TOF decoder
525
526   Int_t         fDDL;          // DDL file number [0;71]
527   Int_t         fTRM;          // TRM number [1;12]
528   Int_t         fTRMchain;     // TRM chain number [0;1]
529   Int_t         fTDC;          // TDC number [0;14]
530   Int_t         fTDCchannel;   // TDC channel number [0;7]
531   Int_t         fTime;         // time-of-flight measurement [0;8191]
532   Int_t         fToT;          // time-over-threshould measurement [0;255]
533   Int_t         fLeadingEdge;  // leading edge measurement
534   Int_t         fTrailingEdge; // trailing edge measurement
535   Int_t         fErrorFlag;    // error flag
536   
537   Int_t         fSector;     // sector number [0;17]
538   Int_t         fPlate;      // plate number [0;4]
539   Int_t         fStrip;      // strip number [0;14/18]
540   Int_t         fPadX;       // pad number along the strip [0;47]
541   Int_t         fPadZ;       // pad-row number [0;1]
542
543   Int_t fPackedDigits;       // counter for packed digits
544
545   Int_t fWordType;           // word type
546   Int_t fSlotID;             // crate slot ID number
547   Int_t fACQ;                // flag to identif the aquisition kind
548   Int_t fPSbit;              // flag for packing 
549   Int_t fTDCerrorFlag;       // TDC error flag
550   Bool_t fInsideDRM;         // inside/outside DRM
551   Bool_t fInsideTRM;         // inside/outside TRM
552   Bool_t fInsideLTM;         // inside/outside LTM
553   Bool_t fInsideTRMchain0;   // inside/outside chain 0
554   Bool_t fInsideTRMchain1;   // inside/outside chain 1
555
556   AliTOFHitDataBuffer fDataBuffer[72]; // AliTOFHitDataBuffer
557   AliTOFHitDataBuffer fPackedDataBuffer[72]; // AliTOFHitDataBuffer
558
559   Int_t fLocalEventCounterDRM;          // event counter recorded in the DRM global trailer
560   Int_t fLocalEventCounterLTM;          // event counter recorded in the LTM global trailer
561   Int_t fLocalEventCounterTRM[13];      // event counter recorded in the TRMs global trailer
562   Int_t fLocalEventCounterChain[13][2]; // event counter recorded in the chains trailer
563   Int_t fChainBunchID[13][2];           // BC ID recorded in the chains header
564
565   //AliTOFCableLengthMap * fCableLengthMap; // Pointer to the map of Amphenol cable length
566
567   Int_t fEventID; // event ID1 in the common data header
568
569   Bool_t fNewDecoderVersion;   // setting whether to use the new decoder version
570                                //  -true -> new version
571                                //  -false ->old version (default value!!)
572
573   static const Int_t fgkddlBCshift[72]; // DDL BC shifts
574   static Bool_t fgApplyBCCorrections; // switch to choose if apply or not the BC shift corrections
575
576   static const Int_t fgkStrip0MapCrate0[];   // 1st strip number in crate 0
577   static const Int_t fgkStrip1MapCrate0[];   // 2nd strip number in crate 0
578   static const Int_t fgkStrip0MapCrate1[];   // 1st strip number in crate 1
579   static const Int_t fgkStrip1MapCrate1[];   // 2nd strip number in crate 1
580   static const Int_t fgkStrip0MapCrate2[];   // 1st strip number in crate 2
581   static const Int_t fgkStrip1MapCrate2[];   // 2nd strip number in crate 2
582   static const Int_t fgkStrip0MapCrate3[];   // 1st strip number in crate 3
583   static const Int_t fgkStrip1MapCrate3[];   // 2nd strip number in crate 3
584
585   static const Int_t fgkModule0MapCrate0[];  // 1st module number in crate 0
586   static const Int_t fgkModule1MapCrate0[];  // 2nd module number in crate 0
587   static const Int_t fgkModule0MapCrate1[];  // 1st module number in crate 1
588   static const Int_t fgkModule1MapCrate1[];  // 2nd module number in crate 1
589   static const Int_t fgkModule0MapCrate2[];  // 1st module number in crate 2
590   static const Int_t fgkModule1MapCrate2[];  // 2nd module number in crate 2
591   static const Int_t fgkModule0MapCrate3[];  // 1st module number in crate 3
592   static const Int_t fgkModule1MapCrate3[];  // 2nd module number in crate 3
593
594   static const Int_t fgkChannelMap0[5][19];  // mapping padX<24 <-> TDC channels
595   static const Int_t fgkChannelMap24[5][19]; // mapping padX>=24 <-> TDC channels
596   static const Int_t fgkChainMap0[5][19];    // mapping padX<24 <-> TRM chain
597   static const Int_t fgkChainMap24[5][19];   // mapping padX>=24 <-> TRM chain
598
599
600   ClassDef(AliTOFRawStream, 3)  // class for reading TOF raw digits
601 };
602
603 #endif