1 #ifndef ALIRAWDATAHEADER_H
2 #define ALIRAWDATAHEADER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
6 struct AliRawDataHeader {
13 fAttributesSubDetectors(0),
14 fStatusMiniEventID(0x1000), // status bit 4: no L1/L2 trigger information
16 fROILowTriggerClassHigh(0),
20 UChar_t GetAttributes() const
21 {return (fAttributesSubDetectors >> 24) & 0xFF;};
22 Bool_t TestAttribute(Int_t index) const
23 {return (fAttributesSubDetectors >> (24 + index)) & 1;};
24 void SetAttribute(Int_t index)
25 {fAttributesSubDetectors |= (1 << (24 + index));};
26 void ResetAttribute(Int_t index)
27 {fAttributesSubDetectors &= (0xFFFFFFFF ^ (1 << (24 + index)));};
28 UInt_t GetSubDetectors() const
29 {return fAttributesSubDetectors & 0xFFFFFF;};
31 UInt_t GetStatus() const
32 {return (fStatusMiniEventID >> 12) & 0xFFFF;};
33 UInt_t GetMiniEventID() const
34 {return fStatusMiniEventID & 0x7FF;};
36 ULong64_t GetTriggerClasses() const
37 {return ((ULong64_t) (fROILowTriggerClassHigh & 0x1FFFF)) << 32 + fTriggerClassLow;}
38 ULong64_t GetROI() const
39 {return ((ULong64_t) fROIHigh) << 32 + ((fROILowTriggerClassHigh >> 28) & 0xF);}
41 void SetTriggerClass(ULong64_t mask)
42 {fTriggerClassLow = (mask & 0xFFFFFFFF); // low bits of trigger class
43 fROILowTriggerClassHigh = ((mask >> 32) & 0x3FFFF); // low bits of ROI data (bits 28-31) and high bits of trigger class (bits 0-17)
46 UInt_t fSize; // size of the raw data in bytes
47 UShort_t fEventID1; // bunch crossing number
48 UChar_t fL1TriggerType; // level 1 trigger type
49 UChar_t fVersion; // version of the data header format
50 UInt_t fEventID2; // orbit number
51 UInt_t fAttributesSubDetectors; // block attributes (bits 24-31) and participating sub detectors
52 UInt_t fStatusMiniEventID; // status & error bits (bits 12-27) and mini event ID (bits 0-11)
53 UInt_t fTriggerClassLow; // low bits of trigger class
54 UInt_t fROILowTriggerClassHigh; // low bits of ROI data (bits 28-31) and high bits of trigger class (bits 0-17)
55 UInt_t fROIHigh; // high bits of ROI data