LCOV - code coverage report
Current view: top level - MUON/MUONraw - AliMUONDarcHeader.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 43 27.9 %
Date: 2016-06-14 17:26:59 Functions: 12 47 25.5 %

          Line data    Source code
       1             : #ifndef ALIMUONDARCHEADER_H
       2             : #define ALIMUONDARCHEADER_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 AliMUONDarcHeader
      10             : /// \brief MUON Darc header for Trigger
      11             : ///
      12             : //  Author Christian Finck
      13             : 
      14             : #include <TObject.h>
      15             : #include <TClonesArray.h>
      16             : 
      17             : class AliMUONRegHeader;
      18             : 
      19             : class AliMUONDarcHeader : public TObject {
      20             :  
      21             : public:
      22             :    AliMUONDarcHeader();
      23             :    AliMUONDarcHeader(TRootIOCtor* dummy);
      24             :    AliMUONDarcHeader(const AliMUONDarcHeader& event);
      25             :    AliMUONDarcHeader& operator=(const AliMUONDarcHeader& event);
      26             : 
      27             :    virtual ~AliMUONDarcHeader();
      28             : 
      29             : 
      30             :             /// Return first word
      31           0 :    UInt_t   GetWord()               const {return fWord;}
      32             :             /// Return global input
      33           0 :    UInt_t   GetGlobalInput(Int_t n) const {return fGlobalInput[n];}
      34             :             /// Return global output
      35           0 :    UChar_t  GetGlobalOutput()       const {return (fGlobalOutput & 0xFF);}
      36             :             /// Return global config  
      37           0 :    UShort_t GetGlobalConfig()       const {return ((fGlobalOutput >> 16) & 0xFFFF);}
      38             : 
      39             :    //MBZ:1, phys trig:1, type:3, ,SerialNb:4,Version:8,VME trig:1, 
      40             :    //GlobalFlag:1, CTP trig:1, DAQ:1, Reg pattern:8;
      41             : 
      42             :             /// Return event type
      43             :    //Bool_t  GetEventType()  const {return (fWord &  0x40000000);}
      44             :    Bool_t  GetEventType() const;
      45             :             /// Return Darc type
      46           0 :    UChar_t GetDarcType()   const {return (UChar_t)(fWord >> 24) &  0x7;}
      47             :             /// Return serial number
      48           0 :    UChar_t GetSerialNb()   const {return (UChar_t)(fWord >> 20) &  0xF;}
      49             :             /// Return version
      50           0 :    UChar_t GetVersion()    const {return (UChar_t)(fWord >> 12) &  0xFF;}
      51             :             /// Return VME trig
      52           0 :    Bool_t  GetVMETrig()    const {return (fWord &  0x800);}
      53             :             /// Return global flag
      54           0 :    Bool_t  GetGlobalFlag() const {return (fWord &  0x400);}
      55             :             /// Return CPT trigger
      56           0 :    Bool_t  GetCTPTrig()    const {return (fWord &  0x200);}
      57             :             /// Return DAQ flag
      58           0 :    Bool_t  GetDAQFlag()    const {return (fWord &  0x100);}
      59             :             /// Return reg pattern
      60           0 :    UChar_t GetRegPattern() const {return (UChar_t)(fWord &  0xFF);}
      61             : 
      62             :            /// Set first word
      63          16 :    void    SetWord(UInt_t w) {fWord = w;}
      64             :            /// Set global input
      65          32 :    void    SetGlobalInput(UInt_t in, Int_t n) {fGlobalInput[n] = in;}
      66             :            /// Set global output
      67          16 :    void    SetGlobalOutput(Int_t out) {fGlobalOutput = out;}
      68             : 
      69             :             /// Return darc header length
      70           2 :    Int_t   GetDarcHeaderLength()   const {return fgkDarcHeaderLength;}
      71             :             /// Return global header length
      72           2 :    Int_t   GetGlobalHeaderLength() const {return fgkGlobalHeaderLength;}
      73             : 
      74             :             /// Return header
      75          16 :    UInt_t* GetHeader() {return &fWord;}
      76             :             /// Return global input
      77          16 :    UInt_t* GetGlobalInput()    {return &fGlobalInput[0];}
      78             : 
      79             :   // DARC get methods
      80             :             /// Return DARC L0 received and used
      81           0 :    UInt_t  GetDarcL0R()     const {return fDarcL0R;}
      82             :             /// Return DARC L1 physics
      83           0 :    UInt_t  GetDarcL1P()     const {return fDarcL1P;}
      84             :             /// Return DARC L1 software
      85           0 :    UInt_t  GetDarcL1S()     const {return fDarcL1S;}
      86             :             /// Return DARC L2 accept
      87           0 :    UInt_t  GetDarcL2A()     const {return fDarcL2A;}
      88             :             /// Return DARC L2 reject
      89           0 :    UInt_t  GetDarcL2R()     const {return fDarcL2R;}
      90             :             /// Return DARC clock
      91           0 :    UInt_t  GetDarcClock()   const {return fDarcClk;}
      92             :             /// Return DARC hold (dead time)
      93           0 :    UInt_t  GetDarcHold()    const {return fDarcHold;}
      94             :    
      95             :    // don't use setting methods but memcpy
      96             :             /// Return global L0
      97           0 :    UInt_t* GetGlobalScalers()  {return &fGlobalL0;}
      98             :             /// Return DARC L0 received and used
      99           0 :    UInt_t* GetDarcScalers()    {return &fDarcL0R;} 
     100             : 
     101             :    // global get methods
     102             :             /// Return global L0
     103           0 :    UInt_t  GetGlobalL0()      const {return fGlobalL0;}
     104             :             /// Return global clock
     105           0 :    UInt_t  GetGlobalClock()   const {return fGlobalClk;}
     106             :             /// Return global scaler
     107           0 :    const UInt_t* GetGlobalScaler()  const {return fGlobalScaler;}
     108             :             /// Return global hold (dead time)
     109           0 :    UInt_t  GetGlobalHold()    const {return fGlobalHold;}
     110             :             /// Return global spare
     111           0 :    UInt_t  GetGlobalSpare()   const {return fGlobalSpare;}
     112             : 
     113             :             /// Return length of global scaler in word
     114           2 :    Int_t GetGlobalScalerLength() const {return fgkGlobalScalerLength;}
     115             :             /// Return length of DARC scaler in word
     116           2 :    Int_t GetDarcScalerLength()   const {return fgkDarcScalerLength;} 
     117             : 
     118             :             /// Return end of darc info word
     119          16 :    UInt_t GetEndOfDarc()     const {return fgkEndOfDarc;} 
     120             :             /// Return end of global info word
     121          16 :    UInt_t GetEndOfGlobal()   const {return fgkEndOfGlobal;} 
     122             : 
     123             :            /// Return default type for DARC def.
     124           0 :    UInt_t GetDarcDefaultType()   const {return fgkDarcDefaultType;} 
     125             :           /// Return default type for DARC def.
     126           0 :    UInt_t GetDarcVadohrType()   const {return fgkDarcVadorhType;} 
     127             : 
     128             :    // set random numbers to fill variable
     129             :    void SetScalersNumbers();
     130             : 
     131             :    /// get TClonesArray
     132           0 :    TClonesArray*  GetRegHeaderArray()  const {return fRegHeaderArray;}
     133             : 
     134             :    /// get entries
     135           0 :    Int_t GetRegHeaderEntries()  const {return fRegHeaderArray->GetEntriesFast();}
     136             : 
     137             :    /// get entry
     138             :    AliMUONRegHeader* GetRegHeaderEntry(Int_t i) const  {
     139           0 :      return (AliMUONRegHeader*)fRegHeaderArray->At(i);}
     140             : 
     141             :    // clear
     142             :    void Clear(Option_t* opt);
     143             : 
     144             :  private:
     145             : 
     146             :    UInt_t    fWord;              ///< first word
     147             :    UInt_t    fGlobalInput[4];    ///< global input
     148             :    Int_t     fGlobalOutput;      ///< global ouput
     149             : 
     150             :    static const Int_t fgkDarcHeaderLength;   ///< darc header length
     151             :    static const Int_t fgkGlobalHeaderLength; ///< global header length
     152             : 
     153             : 
     154             :  // global card scalers   
     155             :    UInt_t     fGlobalL0;         ///< global L0
     156             :    UInt_t     fGlobalClk;        ///< global clock
     157             :    UInt_t     fGlobalScaler[6];  ///< global ouput
     158             :    UInt_t     fGlobalHold;       ///< global hold (dead time)
     159             :    UInt_t     fGlobalSpare;      ///< global spare
     160             :    static const Int_t      fgkGlobalScalerLength;  ///< length of global scaler in word
     161             : 
     162             :    // DARC Scalers
     163             :    UInt_t     fDarcL0R;       ///< DARC L0 received and used
     164             :    UInt_t     fDarcL1P;       ///< DARC L1 physics
     165             :    UInt_t     fDarcL1S;       ///< DARC L1 software
     166             :    UInt_t     fDarcL2A;       ///< DARC L2 accept
     167             :    UInt_t     fDarcL2R;       ///< DARC L2 reject
     168             :    UInt_t     fDarcClk;       ///< DARC clock
     169             :    UInt_t     fDarcHold;      ///< DARC hold (dead time)
     170             :    UInt_t     fDarcSpare;     ///< DARC Empty slot (for the moment)
     171             : 
     172             :    static const Int_t      fgkDarcScalerLength;  ///< length of DARC scaler in word
     173             : 
     174             :    static const UInt_t     fgkEndOfDarc;         ///< end of darc info word
     175             :    static const UInt_t     fgkEndOfGlobal;       ///< end of global info word
     176             : 
     177             :    static const UInt_t     fgkDarcDefaultType;   ///< default type for DARC def.
     178             :    static const UInt_t     fgkDarcVadorhType;    ///< default type for DARC vadorh
     179             : 
     180             : 
     181             :    TClonesArray* fRegHeaderArray; ///< container for regional header
     182             : 
     183          18 :    ClassDef(AliMUONDarcHeader,2)  // MUON DDL Trigger
     184             : };
     185             : #endif

Generated by: LCOV version 1.11