1 #ifndef ALICENTRALTRIGGER_H
2 #define ALICENTRALTRIGGER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 ///////////////////////////////////////////////////////////////////////////////
11 // This class for running the Central Trigger Processor //
14 // Load Configuration //
15 // Make a list the trigger detectors involved ( from the configuration) //
16 // For the each event //
17 // Run the Trigger for the each detector //
19 // Check the trigger classes //
20 // Create the class mask //
23 ///////////////////////////////////////////////////////////////////////////////
26 #include <TObjArray.h>
30 class AliTriggerConfiguration;
32 class AliCentralTrigger : public TObject {
36 AliCentralTrigger( TString & config );
37 virtual ~AliCentralTrigger();
39 Bool_t LoadConfiguration( TString & config );
40 Bool_t RunTrigger( AliRunLoader * runloader , const char* detectors);
41 ULong64_t TriggerClasses();
43 void DeleteConfiguration();
44 void MakeBranch( TString name, TTree * tree );
46 TString GetDetectors();
47 ULong64_t GetClassMask() const { return fClassMask; }
48 UInt_t GetClusterMask() const { return fClusterMask; }
49 AliTriggerConfiguration* GetConfiguration() { return fConfiguration; }
50 TObjArray* GetFiredClasses() const;
51 void Print( const Option_t* opt ="" ) const;
52 Bool_t CheckTriggeredDetectors() const;
54 // Setters to be used in case raw data when the trigger information
55 // is read from the event header
56 void SetClassMask(ULong64_t mask) { fClassMask = mask; }
57 void SetClusterMask(UInt_t mask) { fClusterMask = mask; }
59 ULong64_t fClassMask; // UID ( bitwise OR of conditions mask )
60 UInt_t fClusterMask; // UID ( bitwise OR of clusters mask - detector pattern)
61 AliTriggerConfiguration* fConfiguration; // Trigger Configuration used
64 void SetOwner(Bool_t x=kTRUE){SetBit(22,x);} // Bit 22 indicates that the object owns fConfiguration
65 Bool_t IsOwner() const {return TestBit(22);} // Test bit 22 to check that the object owns fConfiguration
66 Bool_t IsSelected( TString detName, TString& detectors ) const;
67 AliCentralTrigger( const AliCentralTrigger& ctp ); // Implemented
68 AliCentralTrigger& operator=( const AliCentralTrigger& ctp ); // Not implemented
70 ClassDef( AliCentralTrigger, 5 ) // class for running the Central Trigger Processor