using AliCDBConnect task in test train of TRD
[u/mrichter/AliRoot.git] / PWG1 / TRD / AliTRDrecoTask.h
CommitLineData
94b94be0 1#ifndef ALITRDRECOTASK_H\r
2#define ALITRDRECOTASK_H\r
3\r
4///////////////////////////////////////////////////////\r
5//\r
6// Basic class for Performance/Calibration TRD tasks\r
7//\r
8// Author: Alexandru Bercuci, 10/09/2008\r
9//\r
10//////////////////////////////////////////////////\r
11\r
12#ifndef ALIANALYSISTASKSE_H\r
13#include "AliAnalysisTaskSE.h"\r
14#endif\r
15\r
16#ifndef ALITRDTRACKINFO_H\r
17#include "info/AliTRDtrackInfo.h"\r
18#endif\r
19\r
8a3dd7a0 20#ifndef ALITRDEVENTINFO_H\r
21#include "info/AliTRDeventInfo.h"\r
22#endif\r
23\r
94b94be0 24class TH1;\r
25class TF1;\r
26class TList;\r
27class TObjArray;\r
28class TTreeSRedirector;\r
29class AliTRDtrackV1;\r
94b94be0 30\r
31class AliTRDrecoTask : public AliAnalysisTaskSE \r
32{\r
33public:\r
34 enum AliTRDrecoSteeringBits{\r
35 kMCdata = BIT(18)\r
36 ,kFriends = BIT(19)\r
37 ,kPostProcess = BIT(20)\r
38 ,kHeavyIon = BIT(21)\r
39 };\r
40 \r
41 AliTRDrecoTask();\r
42 AliTRDrecoTask(const char *name, const char *title);\r
43 virtual ~AliTRDrecoTask();\r
44 \r
45 \r
46 virtual void UserCreateOutputObjects();\r
47 virtual void UserExec(Option_t *opt);\r
48 virtual void SetDebugLevel(Int_t level);\r
49 \r
50 \r
51 Int_t GetNRefFigures() const; \r
52 const Char_t* GetNameId() const { return fNameId;}\r
53 TList* GetPlotFunctors() const { return fPlotFuncList;}\r
54 virtual Bool_t GetRefFigure(Int_t ifig);\r
55 virtual void MakeSummary();\r
56\r
57 Bool_t IsHeavyIon() const { return TestBit(kHeavyIon);};\r
58 Bool_t IsPP() const { return !TestBit(kHeavyIon);};\r
59 Bool_t HasFriends() const { return TestBit(kFriends);};\r
60 Bool_t HasMCdata() const { return TestBit(kMCdata);};\r
61 Bool_t HasPostProcess() const { return TestBit(kPostProcess);};\r
62 Bool_t HasRunTerminate() const { return fRunTerminate; }\r
63 virtual TObjArray* Histos() { return fContainer;}\r
64\r
65 virtual Bool_t Load(const Char_t *file = "AnalysisResults.root", const Char_t *dir = "TRD_Performance");\r
66 virtual Bool_t Save(TObjArray * const res);\r
67 virtual Bool_t PostProcess();\r
68 virtual Bool_t PutTrendValue(const Char_t *name, Double_t val);\r
69 virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}\r
70 virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}\r
71 virtual void SetNameId(const Char_t *nid) {snprintf(fNameId, 10, "%s", nid);}\r
72 virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}\r
73 void SetRunTerminate(Bool_t runTerminate = kTRUE) { fRunTerminate = runTerminate; }\r
74 virtual void Terminate(Option_t *);\r
75\r
76protected:\r
77 static TTreeSRedirector* DebugStream() { return fgDebugStream;}\r
78 void InitFunctorList();\r
79 void Adjust(TF1 *f, TH1 * const h);\r
80 Bool_t HasFunctorList() const { return fPlotFuncList != NULL; }\r
81 Char_t fNameId[10]; // unique identifier of task particularity\r
82 UChar_t fNRefFigures; // no of reference figures reported by task\r
83 TObjArray *fContainer; //! container to store results\r
84 AliTRDeventInfo *fEvent; //! Event Info\r
85 TObjArray *fTracks; //! Array of tracks\r
3ceb45ae 86 const AliTRDtrackV1 *fkTrack; //! current track\r
94b94be0 87 const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info\r
88 const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info\r
3ceb45ae 89 Char_t fSpecies; //! species index +1 with charge sign\r
90 Float_t fPt; //! p_t of the track being analyzed\r
91 Float_t fPhi; //! phi of the track being analyzed\r
92 Float_t fEta; //! eta of the track being analyzed\r
94b94be0 93\r
94private:\r
95 AliTRDrecoTask(const AliTRDrecoTask&);\r
96 AliTRDrecoTask& operator=(const AliTRDrecoTask&);\r
97\r
98 TList *fPlotFuncList;//! plot functors list\r
99 Bool_t fRunTerminate; // Switch for Terminate Function\r
100 static TList *fgTrendPoint; //! trend point\r
101 static TTreeSRedirector *fgDebugStream; //! Debug stream \r
102\r
3ceb45ae 103 ClassDef(AliTRDrecoTask, 4) // base TRD reconstruction task\r
94b94be0 104};\r
105\r
106#endif\r
107\r