]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliCentralTrigger.h
Loop over mc and aod possible. (A. Mastroserio)
[u/mrichter/AliRoot.git] / STEER / AliCentralTrigger.h
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 //                                                                           //
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                           //
18 //           Get the inputs                                                  //
19 //           Check the trigger classes                                       //
20 //           Create the class mask                                           //
21 //           Save result                                                     //
22 //                                                                           //
23 ///////////////////////////////////////////////////////////////////////////////
24
25 #include <TObject.h>
26 #include <TObjArray.h>
27
28 class TTree;
29 class AliRunLoader;
30 class AliTriggerConfiguration;
31
32 class AliCentralTrigger : public TObject {
33
34 public:
35                           AliCentralTrigger();
36                           AliCentralTrigger( TString & config );
37                virtual   ~AliCentralTrigger();
38
39                 Bool_t    LoadConfiguration( TString & config );
40                 Bool_t    RunTrigger( AliRunLoader * runloader , const char* detectors);
41              ULong64_t    TriggerClasses();
42                   void    Reset();
43                   void    DeleteConfiguration();
44                   void    MakeBranch( TString name, TTree * tree );
45   //  Getters
46                TString    GetDetectors();
47              ULong64_t    GetClassMask() const { return fClassMask; }
48                UChar_t    GetClusterMask() const { return fClusterMask; }
49  AliTriggerConfiguration* GetConfiguration() { return fConfiguration; }
50              TObjArray*   GetFiredClasses() const;
51                   void    Print( const Option_t* opt ="" ) const;
52                TString    GetTriggeredDetectors() const;
53 protected:
54              ULong64_t    fClassMask;          // UID ( bitwise OR of conditions mask )
55                UChar_t    fClusterMask;        // UID ( bitwise OR of clusters mask )
56  AliTriggerConfiguration* fConfiguration;      // Trigger Configuration used
57
58 private:
59                 void      SetOwner(Bool_t x=kTRUE){SetBit(22,x);} // Bit 22 indicates that the object owns fConfiguration
60                 Bool_t    IsOwner() const {return TestBit(22);} // Test bit 22 to check that the object owns fConfiguration
61                 Bool_t    IsSelected( TString detName, TString& detectors ) const;
62                 AliCentralTrigger( const AliCentralTrigger& ctp ); // Implemented
63                 AliCentralTrigger& operator=( const AliCentralTrigger& ctp ); // Not implemented
64
65    ClassDef( AliCentralTrigger, 3 )  // class for running the Central Trigger Processor
66 };
67
68
69 #endif