]>
Commit | Line | Data |
---|---|---|
a5a091ce | 1 | #ifndef ALICENTRALTRIGGER_H |
2 | #define ALICENTRALTRIGGER_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 | // This class for running the Central Trigger Processor // | |
12 | // // | |
13 | // // | |
51f6d619 | 14 | // Load Configuration // |
15 | // Make a list the trigger detectors involved ( from the configuration) // | |
a5a091ce | 16 | // For the each event // |
17 | // Run the Trigger for the each detector // | |
18 | // Get the inputs // | |
51f6d619 | 19 | // Check the trigger classes // |
a5a091ce | 20 | // Create the class mask // |
21 | // Save result // | |
22 | // // | |
23 | /////////////////////////////////////////////////////////////////////////////// | |
24 | ||
25 | #include <TObject.h> | |
26 | #include <TObjArray.h> | |
27 | ||
bacbe0fd | 28 | class TTree; |
e8d02863 | 29 | class AliRunLoader; |
51f6d619 | 30 | class AliTriggerConfiguration; |
e8d02863 | 31 | |
a5a091ce | 32 | class AliCentralTrigger : public TObject { |
33 | ||
34 | public: | |
35 | AliCentralTrigger(); | |
51f6d619 | 36 | AliCentralTrigger( TString & config ); |
a5a091ce | 37 | virtual ~AliCentralTrigger(); |
38 | ||
51f6d619 | 39 | Bool_t LoadConfiguration( TString & config ); |
8480396b | 40 | Bool_t RunTrigger( AliRunLoader * runloader , const char* detectors); |
51f6d619 | 41 | ULong64_t TriggerClasses(); |
d3f1f232 | 42 | void TriggerInputs(); |
bacbe0fd | 43 | void Reset(); |
51f6d619 | 44 | void DeleteConfiguration(); |
bacbe0fd | 45 | void MakeBranch( TString name, TTree * tree ); |
a5a091ce | 46 | // Getters |
47 | TString GetDetectors(); | |
92c1978f | 48 | ULong64_t GetClassMask() const { return fClassMask; } |
305085a6 | 49 | ULong64_t GetClassMaskNext50() const { return fClassMaskNext50; } |
7e88424f | 50 | UInt_t GetClusterMask() const { return fClusterMask; } |
d3f1f232 | 51 | UInt_t GetL0TriggerInputs() const { return fL0TriggerInputs; } |
52 | UInt_t GetL1TriggerInputs() const { return fL1TriggerInputs; } | |
53 | UShort_t GetL2TriggerInputs() const { return fL2TriggerInputs; } | |
51f6d619 | 54 | AliTriggerConfiguration* GetConfiguration() { return fConfiguration; } |
55 | TObjArray* GetFiredClasses() const; | |
a5a091ce | 56 | void Print( const Option_t* opt ="" ) const; |
7e88424f | 57 | Bool_t CheckTriggeredDetectors() const; |
58 | ||
59 | // Setters to be used in case raw data when the trigger information | |
60 | // is read from the event header | |
61 | void SetClassMask(ULong64_t mask) { fClassMask = mask; } | |
305085a6 | 62 | void SetClassMaskNext50(ULong64_t mask) { fClassMaskNext50 = mask; } |
7e88424f | 63 | void SetClusterMask(UInt_t mask) { fClusterMask = mask; } |
d3f1f232 | 64 | void SetL0TriggerInputs(UInt_t mask) { fL0TriggerInputs = mask; } |
65 | void SetL1TriggerInputs(UInt_t mask) { fL1TriggerInputs = mask; } | |
66 | void SetL2TriggerInputs(UShort_t mask) { fL2TriggerInputs = mask; } | |
a5a091ce | 67 | protected: |
bacbe0fd | 68 | ULong64_t fClassMask; // UID ( bitwise OR of conditions mask ) |
305085a6 | 69 | ULong64_t fClassMaskNext50; // UID ( bitwise OR of conditions mask ) high 50 bits for run2 |
7e88424f | 70 | UInt_t fClusterMask; // UID ( bitwise OR of clusters mask - detector pattern) |
d3f1f232 | 71 | UInt_t fL0TriggerInputs; // L0 trigger inputs (24 bits) |
72 | UInt_t fL1TriggerInputs; // L1 trigger inputs (24 bits) | |
73 | UShort_t fL2TriggerInputs; // L2 trigger inputs (12 bits) | |
74 | ||
51f6d619 | 75 | AliTriggerConfiguration* fConfiguration; // Trigger Configuration used |
a5a091ce | 76 | |
77 | private: | |
596735df | 78 | void SetOwner(Bool_t x=kTRUE){SetBit(22,x);} // Bit 22 indicates that the object owns fConfiguration |
1793149a | 79 | Bool_t IsOwner() const {return TestBit(22);} // Test bit 22 to check that the object owns fConfiguration |
a5a091ce | 80 | Bool_t IsSelected( TString detName, TString& detectors ) const; |
2972d4eb | 81 | AliCentralTrigger( const AliCentralTrigger& ctp ); // Implemented |
82 | AliCentralTrigger& operator=( const AliCentralTrigger& ctp ); // Not implemented | |
a5a091ce | 83 | |
305085a6 | 84 | ClassDef( AliCentralTrigger, 6 ) // class for running the Central Trigger Processor |
a5a091ce | 85 | }; |
86 | ||
87 | ||
88 | #endif |