1 #ifndef ALITRIGGERINPUT_H
2 #define ALITRIGGERINPUT_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 // Class to define a Trigger Input from an specific detector //
14 // name description id mask
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 );
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)
24 // A maximun of 60 inputs trigger are allow.
25 // So, the id mask should set only bit from the position 1 to 60.
27 ///////////////////////////////////////////////////////////////////////////////
35 class AliTriggerInput : public TNamed {
38 AliTriggerInput(): TNamed(),
46 AliTriggerInput( TString name, TString det, UChar_t level, Int_t signature = -1, Char_t number = -1);
47 AliTriggerInput( AliTriggerInput & inp )
51 fSignature( inp.fSignature ),
53 fDetectorId( inp.fDetectorId),
56 virtual ~AliTriggerInput() {}
59 void Set() { if (fIsActive) fValue = fMask; }
60 void Reset() { fValue = 0; }
61 void Enable() { fIsActive = kTRUE; }
64 Bool_t Status() const { return (Bool_t)fValue; }
65 ULong64_t GetValue() const { return fValue; }
66 ULong64_t GetMask() const { return fMask; }
67 Int_t GetSignature() const { return fSignature; }
68 TString GetInputName() const { return GetName(); }
69 TString GetDetector() const { return GetTitle(); }
70 TString GetModule() const;
71 Char_t GetDetectorId() const { return fDetectorId; }
72 UChar_t GetLevel() const { return fLevel; }
73 Bool_t IsActive() const { return fIsActive; }
75 virtual void Print( const Option_t* opt ="" ) const;
77 static Bool_t fgkIsTriggerDetector[AliDAQ::kNDetectors]; // List of trigger detectors
78 static const char* fgkCTPDetectorName[AliDAQ::kNDetectors];
80 ULong64_t fMask; // Trigger ID mask (1 bit)
81 ULong64_t fValue; // Trigger Signal (0 = false, > 1 = true = fMask )
82 Int_t fSignature; // 8 bit signature (internal CTP inputs can have longer signature)
83 UChar_t fLevel; // L0, L1 or L2
84 Char_t fDetectorId; // Alice-wide detector id, see AliDAQ class for details
85 Bool_t fIsActive; // Is trigger input active (during simulation)
86 // void fDectParameterTable; //-> link to detector parameter table????
88 ClassDef( AliTriggerInput, 4 ) // Define a Trigger Input