In AddTaskPHOSPi0Flow.C set Cent. Bin past event buffers/lists,
[u/mrichter/AliRoot.git] / STEER / ESD / AliTriggerClass.h
1 #ifndef ALITRIGGERCLASS_H
2 #define ALITRIGGERCLASS_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ///////////////////////////////////////////////////////////////////////////////
8 //                                                                           //
9 // This class represents the CTP class objects                               //
10 //                                                                           //
11 // The Class consists of Name, index in the trigger mask counted from 1,     //
12 // descriptor, cluster,past-future, mask, downscale, allrare,                //
13 // time group, time window                                                   //
14 //                                                                           //
15 //                                                                           //
16 ///////////////////////////////////////////////////////////////////////////////
17
18 #include <TNamed.h>
19
20 class AliTriggerConfiguration;
21 class AliTriggerDescriptor;
22 class AliTriggerCluster;
23 class AliTriggerPFProtection;
24 class AliTriggerBCMask;
25
26 class AliTriggerClass : public TNamed {
27
28 public:
29                           AliTriggerClass();
30                           AliTriggerClass( TString & name, UChar_t index,
31                                            AliTriggerDescriptor *desc, AliTriggerCluster *clus,
32                                            AliTriggerPFProtection *pfp, AliTriggerBCMask *mask,
33                                            UInt_t prescaler, Bool_t allrare);
34                           AliTriggerClass( AliTriggerConfiguration *config,
35                                            TString & name, UChar_t index,
36                                            TString &desc, TString &clus,
37                                            TString &pfp, TString &mask,
38                                            UInt_t prescaler, Bool_t allrare);
39                           AliTriggerClass( AliTriggerConfiguration *config,
40                                            TString & name, UChar_t index,
41                                            TString &desc, TString &clus,
42                                            TString &pfp,
43                                            UInt_t prescaler, Bool_t allrare,
44                                            UInt_t timegroup, UInt_t timewindow);
45
46                           AliTriggerClass( const AliTriggerClass& trclass );
47                virtual   ~AliTriggerClass();
48   AliTriggerClass&   operator=(const AliTriggerClass& trclass);
49
50                   void    Reset() { fStatus = kFALSE; }
51
52              ULong64_t    GetValue() const { return (fStatus) ? fClassMask : 0; }
53                 Bool_t    GetStatus() const { return fStatus; }
54                ULong64_t  GetMask() const { return fClassMask; }
55     AliTriggerDescriptor* GetDescriptor() const { return fDescriptor; }
56        AliTriggerCluster* GetCluster() const { return fCluster; }
57         AliTriggerBCMask* GetBCMask() const { return fMask[0]; }
58                    UInt_t GetTimeGroup() const { return fTimeGroup; }
59                    UInt_t GetTimeWindow() const { return fTimeGroup; }
60
61                    Bool_t SetMasks(AliTriggerConfiguration *config,TString &mask);
62                     void  Trigger( const TObjArray& inputs , const TObjArray& functions);
63                     void  Print( const Option_t* ) const;
64
65                   Bool_t  CheckClass(AliTriggerConfiguration *config) const;
66                   Bool_t  IsActive( const TObjArray& inputs, const TObjArray& functions) const;
67                   enum {kNMaxMasks = 13};  // CTP handles up to 12 different BC masks + NONE
68
69 private:
70                ULong64_t  fClassMask;    // trigger mask (1<< (index-1))
71                  UChar_t  fIndex;        // position of class in mask
72     AliTriggerDescriptor* fDescriptor;   // pointer to the descriptor
73        AliTriggerCluster* fCluster;      // pointer to the cluster
74   AliTriggerPFProtection* fPFProtection; // pointer to the past-future protection
75         AliTriggerBCMask* fMask[kNMaxMasks];         // array of pinters pointer to bunch-crossing mask
76                   UInt_t  fPrescaler;    // Downscaling factor
77                   Bool_t  fAllRare;      // All or Rare trigger
78                   Bool_t  fStatus;       //! true = Condition has been satisfied after Trigger
79                   UInt_t  fTimeGroup;    // time group
80                   UInt_t  fTimeWindow;   // the size of time window for its group
81
82   ClassDef( AliTriggerClass, 5 )  // Define a trigger class object
83 };
84
85 #endif