X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=RAW%2FAliRawDataHeader.h;h=2b87fbd1915fed12ba858a785594f65c6c081b2c;hb=44785f3e323b52cf3992aa28d80217e25f7ae08b;hp=46cf5f1b0c63f31036652f1a8b7fb6c373565f12;hpb=ebb92147e4fb774158d308a50db6406101b16986;p=u%2Fmrichter%2FAliRoot.git diff --git a/RAW/AliRawDataHeader.h b/RAW/AliRawDataHeader.h index 46cf5f1b0c6..2b87fbd1915 100644 --- a/RAW/AliRawDataHeader.h +++ b/RAW/AliRawDataHeader.h @@ -6,25 +6,39 @@ struct AliRawDataHeader { AliRawDataHeader() : fSize(0xFFFFFFFF), - fEventID1(0), - fL1TriggerType(0), - fVersion(2), + fWord2(2<<24), fEventID2(0), fAttributesSubDetectors(0), - fStatusMiniEventID(0x1000), // status bit 4: no L1/L2 trigger information + fStatusMiniEventID(0x10000), // status bit 4: no L1/L2 trigger information fTriggerClassLow(0), fROILowTriggerClassHigh(0), fROIHigh(0) {} + // Adding virtual destructor breaks + // C++ struct backward compatibility + // Do not uncomment the line below!!! + // virtual ~AliRawDataHeader() {} + UShort_t GetEventID1() const - {return (fEventID1 & 0xFFF);}; + { + return (UShort_t)( fWord2 & 0xFFF ); + }; + + UInt_t GetEventID2() const + { + return fEventID2; + }; UChar_t GetL1TriggerMessage() const - {return (UChar_t)((fEventID1 >> 14) | ((UShort_t)fL1TriggerType << 2));}; + { + return (UChar_t)( (fWord2 >> 14) & 0x3FF ); + }; UChar_t GetVersion() const - {return fVersion;}; + { + return (UChar_t)( (fWord2 >> 24) & 0xFF ); + }; UChar_t GetAttributes() const {return (fAttributesSubDetectors >> 24) & 0xFF;}; @@ -40,12 +54,12 @@ struct AliRawDataHeader { UInt_t GetStatus() const {return (fStatusMiniEventID >> 12) & 0xFFFF;}; UInt_t GetMiniEventID() const - {return fStatusMiniEventID & 0x7FF;}; + {return fStatusMiniEventID & 0xFFF;}; ULong64_t GetTriggerClasses() const - {return ((ULong64_t) (fROILowTriggerClassHigh & 0x1FFFF)) << 32 + fTriggerClassLow;} + {return (((ULong64_t) (fROILowTriggerClassHigh & 0x3FFFF)) << 32) | fTriggerClassLow;} ULong64_t GetROI() const - {return ((ULong64_t) fROIHigh) << 32 + ((fROILowTriggerClassHigh >> 28) & 0xF);} + {return (((ULong64_t) fROIHigh) << 4) | ((fROILowTriggerClassHigh >> 28) & 0xF);} void SetTriggerClass(ULong64_t mask) {fTriggerClassLow = (UInt_t)(mask & 0xFFFFFFFF); // low bits of trigger class @@ -53,9 +67,7 @@ struct AliRawDataHeader { }; UInt_t fSize; // size of the raw data in bytes - UShort_t fEventID1; // bunch crossing number - UChar_t fL1TriggerType; // level 1 trigger type - UChar_t fVersion; // version of the data header format + UInt_t fWord2; // bunch crossing, L1 trigger message and fomrat version UInt_t fEventID2; // orbit number UInt_t fAttributesSubDetectors; // block attributes (bits 24-31) and participating sub detectors UInt_t fStatusMiniEventID; // status & error bits (bits 12-27) and mini event ID (bits 0-11)