LCOV - code coverage report
Current view: top level - STEER/ESD - AliTriggerInput.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 11 16 68.8 %
Date: 2016-06-14 17:26:59 Functions: 14 22 63.6 %

          Line data    Source code
       1             : #ifndef ALITRIGGERINPUT_H
       2             : #define ALITRIGGERINPUT_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             :  * See cxx source for full Copyright notice                               */
       6             : 
       7             : /* $Id$ */
       8             : 
       9             : ///////////////////////////////////////////////////////////////////////////////
      10             : //
      11             : //  Class to define a Trigger Input from an specific detector                                                                                           //
      12             : //
      13             : //
      14             : //                        name         description     id mask
      15             : //    Ej:
      16             : //      AliTriggerInput( "V0_MB_L0", "VO minimum bias", 0x01 );
      17             : //      AliTriggerInput( "V0_SC_L0", "VO semi central", 0x02 );
      18             : //      AliTriggerInput( "V0_C_L0",  "VO central",      0x04 );
      19             : 
      20             : //    The name must be globaly unique. Spaces are not allowed.
      21             : //    As convention should start with detector name then an id
      22             : //    and the trigger level (L0, L1, L2)
      23             : //
      24             : //    A maximun of 60 inputs trigger are allow.
      25             : //    So, the id mask should set only bit from the position 1 to 60.
      26             : //
      27             : ///////////////////////////////////////////////////////////////////////////////
      28             : 
      29             : #ifndef ROOT_TNamed
      30             : #include <TNamed.h>
      31             : #endif
      32             : 
      33             : #include "AliDAQ.h"
      34             : 
      35           0 : class AliTriggerInput : public TNamed {
      36             : 
      37             : public:
      38             :                           AliTriggerInput();
      39             :                           AliTriggerInput( TString name, TString det, UChar_t level, Int_t signature = -1, Char_t number = -1);
      40             :                           AliTriggerInput( TString name, TString det, UChar_t level, Int_t signature, UInt_t indexCTP, UInt_t indexSwitch);
      41             :                           AliTriggerInput( AliTriggerInput & inp );
      42        1848 :                virtual   ~AliTriggerInput() {}
      43             : 
      44             :   //  Setters
      45         552 :                   void    Set()   { if (fIsActive) fValue = fMask; }
      46         176 :                   void    Reset() { fValue = 0; }
      47         440 :                   void    Enable() { fIsActive = kTRUE; }
      48             : 
      49             :   //  Getters
      50         104 :                 Bool_t    Status() const   { return (Bool_t)fValue; }
      51         540 :              ULong64_t    GetValue() const { return fValue; }
      52        1404 :              ULong64_t    GetMask() const  { return fMask; }
      53         880 :                 Int_t     GetSignature() const { return fSignature; }
      54         592 :                TString    GetInputName() const { return GetName(); }
      55           0 :                TString    GetDetector() const { return GetTitle(); }
      56             :                TString    GetModule() const;
      57           0 :                 Char_t    GetDetectorId() const { return fDetectorId; }
      58         412 :                UChar_t    GetLevel() const { return fLevel; }
      59           0 :                 Bool_t    IsActive() const { return fIsActive; }
      60             :                 UInt_t    GetIndexCTP() const;
      61           0 :                 UInt_t    GetIndexSwitch() const { return fIndexSwitch; }
      62             : 
      63             :            virtual void   Print( const Option_t* opt ="" ) const;
      64             : 
      65             :            static Bool_t  fgkIsTriggerDetector[AliDAQ::kNDetectors]; // List of trigger detectors
      66             :    static  const char*    fgkCTPDetectorName[AliDAQ::kNDetectors];
      67             : protected:
      68             :              ULong64_t    fMask;                //  Trigger ID mask (1 bit)
      69             :              ULong64_t    fValue;               //  Trigger Signal (0 = false, > 1 = true = fMask )
      70             :                 Int_t     fSignature;           //  8 bit signature (internal CTP inputs can have longer signature)
      71             :                 UChar_t   fLevel;               //  L0, L1 or L2
      72             :                 Char_t    fDetectorId;          //  Alice-wide detector id, see AliDAQ class for details
      73             :                 Bool_t    fIsActive;            //  Is trigger input active (during simulation)
      74             :                 UInt_t    fIndexCTP;            // input position as seen at CTP (fMask=(1<<(fIndexCTP-1)) [1..24]      
      75             :                 UInt_t    fIndexSwitch;         // input position in connector to CTP board (as seen in IR2) [1..48]    
      76             : //                  void    fDectParameterTable;  //-> link to detector parameter table????
      77             : 
      78        1554 :    ClassDef( AliTriggerInput, 5 )  // Define a Trigger Input
      79             : };
      80             : 
      81             : 
      82             : #endif

Generated by: LCOV version 1.11