LCOV - code coverage report
Current view: top level - MUON/MUONraw - AliMUONBlockHeader.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 6 24 25.0 %
Date: 2016-06-14 17:26:59 Functions: 6 28 21.4 %

          Line data    Source code
       1             : #ifndef ALIMUONBLOCKHEADER_H
       2             : #define ALIMUONBLOCKHEADER_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             : /// \ingroup raw
       9             : /// \class AliMUONBlockHeader
      10             : /// \brief MUON block (Crocus CRT)  header for tracker event
      11             : ///
      12             : //  Author Christian Finck
      13             : 
      14             : #include <TObject.h>
      15             : #include <TClonesArray.h>
      16             : 
      17             : class AliMUONDspHeader;
      18             : 
      19             : class AliMUONBlockHeader : public TObject {
      20             : 
      21             : public:
      22             :    AliMUONBlockHeader();
      23             :    AliMUONBlockHeader(TRootIOCtor* dummy);
      24             :    AliMUONBlockHeader(const AliMUONBlockHeader &event);
      25             :    AliMUONBlockHeader& operator=(const AliMUONBlockHeader &event);
      26             : 
      27             :    virtual ~AliMUONBlockHeader();
      28             : 
      29             :    //
      30             :    // Block header
      31             :    //
      32             :            /// Return data key word for CRT header
      33           0 :    Int_t   GetDataKey()        const {return fDataKey;}
      34             :            /// Return total length of block structure (w/o padding word)
      35           0 :    Int_t   GetTotalLength()    const {return fTotalLength;}
      36             :            /// Return length of raw data
      37           0 :    Int_t   GetLength()         const {return fLength;}
      38             :            /// Return Dsp id
      39           0 :    Int_t   GetDspId()          const {return fDspId;}
      40             :            /// Return L0 trigger word
      41           0 :    Int_t   GetL0Trigger()      const {return fL0Trigger;}
      42             :            /// Return Bunch Crossing for mini-event id (see TDR chapter 8)
      43           0 :    Int_t   GetMiniEventId()    const {return fMiniEventId;}
      44             :            /// Return Event Id in bunch crossing
      45           0 :    Int_t   GetEventId1()       const {return fEventId1;}
      46             :            /// Return Event Id in orbit number
      47           0 :    Int_t   GetEventId2()       const {return fEventId2;}
      48             : 
      49             :            /// Return header length in word
      50         640 :    Int_t   GetHeaderLength()   const {return fgkHeaderLength;}
      51             :            /// Return default data key word for CRT header
      52           2 :    UInt_t  GetDefaultDataKey() const {return fgkDefaultDataKey;}
      53             :          /// Return  data key end word for CRT header
      54         320 :    UInt_t  GetDdlDataKey() const {return fgkDdlDataKey;}
      55             : 
      56             :            /// Set data key word for CRT header
      57           2 :    void    SetDataKey(Int_t d)     {fDataKey = d;}
      58             :            /// Set total length of block structure (w/o padding word)
      59           0 :    void    SetTotalLength(Int_t l) {fTotalLength = l;}
      60             :            /// Set length of raw data
      61           0 :    void    SetLength(Int_t l)      {fLength = l;}
      62             :            /// Set Dsp id
      63           0 :    void    SetDspId(Int_t d)       {fDspId = d;}  
      64             :            /// Set L0 trigger word
      65           0 :    void    SetL0Trigger(Int_t l)   {fL0Trigger = l;}
      66             :            /// Set Bunch Crossing for mini-event id (see TDR chapter 8)
      67           0 :    void    SetMiniEventId(Int_t e) {fMiniEventId = e;}
      68             :            /// Set Event Id in bunch crossing
      69           0 :    void    SetEventId1(Int_t e)    {fEventId1 = e;}
      70             :            /// Set Event Id in orbit number
      71           0 :    void    SetEventId2(Int_t e)    {fEventId2 = e;}
      72             :    
      73             :    
      74             :    /// Return header
      75         320 :    Int_t* GetHeader() {return &fDataKey;}
      76             : 
      77             :    void   AddDspHeader(const AliMUONDspHeader& dspHeader);
      78             : 
      79             :    /// get TClonesArray
      80           0 :    TClonesArray*      GetDspHeaderArray()  const {return fDspHeaderArray;}
      81             : 
      82             :    /// get entries
      83           0 :    Int_t              GetDspHeaderEntries() const {return fDspHeaderArray->GetEntriesFast();}
      84             : 
      85             :    /// get entry
      86             :    AliMUONDspHeader*  GetDspHeaderEntry(Int_t i) const {
      87           0 :      return (AliMUONDspHeader*)fDspHeaderArray->At(i);}
      88             : 
      89             :    // clear
      90             :    void Clear(Option_t* opt);
      91             : 
      92             :    // print out
      93             :    void Print(Option_t* /*opt*/) const;
      94             : 
      95             :  private:
      96             : 
      97             :    // block header
      98             :    Int_t     fDataKey;        ///< Data key word for CRT header 
      99             :    Int_t     fTotalLength;    ///< total length of block structure (w/o padding word)
     100             :    Int_t     fLength;         ///< length of raw data
     101             :    Int_t     fDspId;          ///< Dsp id
     102             :    Int_t     fL0Trigger;      ///< L0 trigger word
     103             :    Int_t     fMiniEventId;    ///< Bunch Crossing for mini-event id (see TDR chapter 8)
     104             :    Int_t     fEventId1;       ///< Event Id in bunch crossing
     105             :    Int_t     fEventId2;       ///< Event Id in orbit number
     106             : 
     107             : 
     108             :    static const Int_t  fgkHeaderLength;    ///< header length in word
     109             :    static const UInt_t fgkDefaultDataKey;  ///< default data key word for CRT header 
     110             :    static const UInt_t fgkDdlDataKey;      ///< data key end word for CRT header 
     111             : 
     112             :    TClonesArray*  fDspHeaderArray;  ///< array of block header
     113             : 
     114          18 :    ClassDef(AliMUONBlockHeader,3)  // MUON block header for Tracker event
     115             : };
     116             : #endif

Generated by: LCOV version 1.11