LCOV - code coverage report
Current view: top level - RAW/RAWDatabase - AliRawDataHeaderV3.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 28 30 93.3 %
Date: 2016-06-14 17:26:59 Functions: 14 16 87.5 %

          Line data    Source code
       1             : #ifndef ALIRAWDATAHEADERV3_H
       2             : #define ALIRAWDATAHEADERV3_H
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : struct AliRawDataHeaderV3 {
       7             :   AliRawDataHeaderV3() :
       8        3662 :     fSize(0xFFFFFFFF), 
       9        1831 :     fWord2(3<<24),
      10        1831 :     fEventID2(0),
      11        1831 :     fAttributesSubDetectors(0),
      12        1831 :     fStatusMiniEventID(0x10000),  // status bit 4: no L1/L2 trigger information
      13        1831 :     fTriggerClassLow(0),
      14        1831 :     fTriggerClassesMiddleLow(0),
      15        1831 :     fTriggerClassesMiddleHigh(0),
      16        1831 :     fROILowTriggerClassHigh(0),
      17        1831 :     fROIHigh(0)
      18        1833 :   {}
      19             : 
      20             :   // Adding virtual destructor breaks
      21             :   // C++ struct backward compatibility
      22             :   // Do not uncomment the line below!!!
      23             :   //  virtual ~AliRawDataHeaderV3() {}
      24             : 
      25             :   UShort_t  GetEventID1() const
      26             :     {
      27        1162 :       return (UShort_t)( fWord2 & 0xFFF );
      28             :     };
      29             : 
      30             :   UInt_t  GetEventID2() const
      31             :     {
      32          18 :       return fEventID2;
      33             :     };
      34             : 
      35             :   UChar_t   GetL1TriggerMessage() const
      36             :     {
      37          24 :       return (UChar_t)( (fWord2 >> 14) & 0xFF );
      38             :     };
      39             : 
      40             :   UChar_t   GetVersion() const
      41             :     {
      42           0 :       return (UChar_t)( (fWord2 >> 24) & 0xFF );
      43             :     };
      44             : 
      45             :   UChar_t   GetAttributes() const 
      46        1752 :     {return (fAttributesSubDetectors >> 24) & 0xFF;};
      47             :   Bool_t    TestAttribute(Int_t index) const
      48       10880 :     {return (fAttributesSubDetectors >> (24 + index)) & 1;};
      49             :   void      SetAttribute(Int_t index)
      50        1224 :     {fAttributesSubDetectors |= (1 << (24 + index));};
      51             :   void      ResetAttribute(Int_t index)
      52           0 :     {fAttributesSubDetectors &= (0xFFFFFFFF ^ (1 << (24 + index)));};
      53             :   UInt_t    GetSubDetectors() const
      54             :     {return fAttributesSubDetectors & 0xFFFFFF;};
      55             : 
      56             :   UInt_t    GetStatus() const
      57         160 :     {return (fStatusMiniEventID >> 12) & 0xFFFF;};
      58             :   UInt_t    GetMiniEventID() const
      59        1152 :     {return fStatusMiniEventID & 0xFFF;};
      60             : 
      61             :   ULong64_t GetTriggerClasses() const
      62          10 :   {return (((ULong64_t) (fTriggerClassesMiddleLow & 0x3FFFF)) << 32) | fTriggerClassLow;}
      63             :   ULong64_t GetTriggerClassesNext50() const
      64          10 :   {return ((((ULong64_t) (fROILowTriggerClassHigh & 0xF)) << 46) | ((ULong64_t)fTriggerClassesMiddleHigh<<14) | (((ULong64_t)fTriggerClassesMiddleLow>>18) & 0x3fff));}
      65             :   ULong64_t GetROI() const
      66             :   {return (((ULong64_t) fROIHigh) << 4) | ((fROILowTriggerClassHigh >> 28) & 0xF);}
      67             : 
      68             :   void      SetTriggerClass(ULong64_t mask)
      69             :     {
      70        3660 :      fTriggerClassLow = (UInt_t)(mask & 0xFFFFFFFF);  // low bits of trigger class
      71        1830 :      fTriggerClassesMiddleLow = (fTriggerClassesMiddleLow & 0xFFFC0000) | ((UInt_t)((mask >> 32) & 0x3FFFF)); // middle low bits of trigger class
      72        1830 :     };
      73             :   void      SetTriggerClassNext50(ULong64_t mask)
      74             :     {
      75        3660 :      fTriggerClassesMiddleLow  = (fTriggerClassesMiddleLow & 0x3FFFF) | (((UInt_t)(mask & 0x3FFF) << 18));
      76        1830 :      fTriggerClassesMiddleHigh = (UInt_t)((mask >> 14) & 0xFFFFFFFF);  // middle high bits of trigger class
      77        1830 :      fROILowTriggerClassHigh = (fROILowTriggerClassHigh & 0xFFFFFFF0) | (UInt_t)((mask >> 46) & 0xF); // low bits of ROI data (bits 28-31) and high bits of trigger class (bits 0-3)
      78        1830 :     };
      79             : 
      80             :   UInt_t    fSize;              // size of the raw data in bytes
      81             :   UInt_t    fWord2;             // bunch crossing, L1 trigger message and fomrat version
      82             :   UInt_t    fEventID2;          // orbit number
      83             :   UInt_t    fAttributesSubDetectors; // block attributes (bits 24-31) and participating sub detectors
      84             :   UInt_t    fStatusMiniEventID; // status & error bits (bits 12-27) and mini event ID (bits 0-11)
      85             :   UInt_t    fTriggerClassLow;   // low bits of trigger class
      86             :   UInt_t    fTriggerClassesMiddleLow; // 18 bits go into eventTriggerPattern[1] (low), 14 bits are zeroes (cdhMBZ2)
      87             :   UInt_t    fTriggerClassesMiddleHigh; // Goes into eventTriggerPattern[1] (high) and [2] (low)
      88             :   UInt_t    fROILowTriggerClassHigh; // low bits of ROI data (bits 28-31) and high bits of trigger class (bits 0-17)
      89             :   UInt_t    fROIHigh;           // high bits of ROI data
      90             : };
      91             : 
      92             : #endif

Generated by: LCOV version 1.11