1 #ifndef ALIANALYSISTASKTRDTRIGGERCHECK_H
2 #define ALIANALYSISTASKTRDTRIGGERCHECK_H
10 #include "AliAnalysisTaskSE.h"
13 #define LAB(x) x+1, #x
17 class AliAnalysisTaskTRDtriggerCheck :
18 public AliAnalysisTaskSE
21 AliAnalysisTaskTRDtriggerCheck(const char *name = "trd_trg_check");
22 ~AliAnalysisTaskTRDtriggerCheck();
24 // analysis operations
25 virtual void UserCreateOutputObjects();
26 virtual Bool_t Notify();
27 virtual void UserExec(Option_t *option);
28 virtual void Terminate(const Option_t *option);
37 kHistTrgStatStackCond,
38 kHistTrgStatStackCondNotFired,
61 kTriggeredFiredCondition,
73 TList *fOutputList; // list of output objects
75 // histogram management
76 TH1 *fHist[kHistLast]; //! pointers to histogram
77 const char *fShortTaskId; //! short identifier for the task
79 TH1*& GetHistogram(Hist_t hist, const Int_t idx = 0) { return fHist[hist + idx]; }
81 TH1* AddHistogram(Hist_t hist, const char *hid, TString title,
82 Int_t xbins, Float_t xmin, Float_t xmax, Int_t binType = 1);
83 TH2* AddHistogram(Hist_t hist, const char *hid, TString title,
84 Int_t xbins, Float_t xmin, Float_t xmax,
85 Int_t ybins, Float_t ymin, Float_t ymax, Int_t binType = 1);
86 TH3* AddHistogram(Hist_t hist, const char *hid, TString title,
87 Int_t xbins, Float_t xmin, Float_t xmax,
88 Int_t ybins, Float_t ymin, Float_t ymax,
89 Int_t zbins, Float_t zmin, Float_t zmax, Int_t binType = 1);
91 void FillH1(Hist_t hist, Float_t x, Float_t weight = 1., Int_t idx = 0)
92 { GetHistogram(hist, idx)->Fill(x, weight); }
93 void FillH2(Hist_t hist, Float_t x, Float_t y, Float_t weight = 1., Int_t idx = 0)
94 { ((TH2*) GetHistogram(hist, idx))->Fill(x, y, weight); }
95 void FillH3(Hist_t hist, Float_t x, Float_t y, Float_t z, Float_t weight = 1., Int_t idx = 0)
96 { ((TH3*) GetHistogram(hist, idx))->Fill(x, y, z, weight); }
100 // task configuration
104 AliAnalysisTaskTRDtriggerCheck(const AliAnalysisTaskTRDtriggerCheck &rhs);
105 AliAnalysisTaskTRDtriggerCheck& operator=(const AliAnalysisTaskTRDtriggerCheck &rhs);
107 ClassDef(AliAnalysisTaskTRDtriggerCheck, 1);