AliRoot Core  ee782a0 (ee782a0)
AliTriggerInput.h
Go to the documentation of this file.
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 
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 //
28 
29 #ifndef ROOT_TNamed
30 #include <TNamed.h>
31 #endif
32 
33 #include "AliDAQ.h"
34 
35 class AliTriggerInput : public TNamed {
36 
37 public:
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);
42  virtual ~AliTriggerInput() {}
43 
44  // Setters
45  void Set() { if (fIsActive) fValue = fMask; }
46  void Reset() { fValue = 0; }
47  void Enable() { fIsActive = kTRUE; }
48 
49  // Getters
50  Bool_t Status() const { return (Bool_t)fValue; }
51  ULong64_t GetValue() const { return fValue; }
52  ULong64_t GetMask() const { return fMask; }
53  Int_t GetSignature() const { return fSignature; }
54  TString GetInputName() const { return GetName(); }
55  TString GetDetector() const { return GetTitle(); }
56  TString GetModule() const;
57  Char_t GetDetectorId() const { return fDetectorId; }
58  UChar_t GetLevel() const { return fLevel; }
59  Bool_t IsActive() const { return fIsActive; }
60  UInt_t GetIndexCTP() const;
61  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
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  ClassDef( AliTriggerInput, 5 ) // Define a Trigger Input
79 };
80 
81 
82 #endif
ULong64_t GetValue() const
Bool_t IsActive() const
virtual void Print(const Option_t *opt="") const
virtual ~AliTriggerInput()
Char_t GetDetectorId() const
TString GetDetector() const
ULong64_t GetMask() const
UInt_t GetIndexCTP() const
static Bool_t fgkIsTriggerDetector[AliDAQ::kNDetectors]
TString GetInputName() const
static const char * fgkCTPDetectorName[AliDAQ::kNDetectors]
TString GetModule() const
UChar_t GetLevel() const
Bool_t Status() const
UInt_t GetIndexSwitch() const
Int_t GetSignature() const