New directory for the VMC tests (Ivana, Eva)
[u/mrichter/AliRoot.git] / TRD / qaRec / AliTRDrecoTask.h
CommitLineData
3d86166d 1#ifndef ALITRDRECOTASK_H
2#define ALITRDRECOTASK_H
3
3a43767e 4///////////////////////////////////////////////////////
5//
6// Basic class for Performance/Calibration TRD tasks
7//
3d86166d 8// Author: Alexandru Bercuci, 10/09/2008
3a43767e 9//
10//////////////////////////////////////////////////
3d86166d 11
12#ifndef ALIANALYSISTASK_H
13#include "AliAnalysisTask.h"
14#endif
15
de520d8f 16#ifndef ALITRDTRACKINFO_H
873458ab 17#include "info/AliTRDtrackInfo.h"
de520d8f 18#endif
19
fc0946a7 20class TH1;
21class TF1;
de520d8f 22class TList;
3d86166d 23class TObjArray;
24class TTreeSRedirector;
de520d8f 25class AliTRDtrackV1;
26class AliTRDtrackInfo;
3d86166d 27class AliTRDrecoTask : public AliAnalysisTask
28{
29public:
30 enum AliTRDrecoSteeringBits{
d85cd79c 31 kMCdata = BIT(20)
32 ,kFriends = BIT(21)
33 ,kPostProcess = BIT(22)
3d86166d 34 };
35 AliTRDrecoTask(const char *name, const char *title);
36 virtual ~AliTRDrecoTask();
d85cd79c 37
38
3d86166d 39 void ConnectInputData(Option_t *);
40 virtual void CreateOutputObjects() = 0;
de520d8f 41 virtual void Exec(Option_t *);
3d86166d 42
dad3aa6b 43 Int_t GetNRefFigures() const { return fNRefFigures; }
de520d8f 44 TList* GetPlotFunctors() const { return fPlotFuncList;}
e15179be 45 virtual Bool_t GetRefFigure(Int_t ifig);
d85cd79c 46
dad3aa6b 47 Bool_t HasFriends() const { return TestBit(kFriends);};
48 Bool_t HasMCdata() const { return TestBit(kMCdata);};
49 Bool_t HasPostProcess() const { return TestBit(kPostProcess);};
50 virtual TObjArray* Histos() { return fContainer;}
d85cd79c 51
1fd9389f 52 virtual Bool_t Load(const Char_t *filename = "TRD.Performance.root");
3a43767e 53 virtual Bool_t Save(TObjArray * const res);
3d86166d 54 virtual Bool_t PostProcess();
2d8b34a7 55 virtual Bool_t PutTrendValue(const Char_t *name, Double_t val);
3d86166d 56 virtual void SetDebugLevel(Int_t level);
d85cd79c 57 virtual void SetFriends(Bool_t fr = kTRUE) {SetBit(kFriends, fr);}
58 virtual void SetMCdata(Bool_t mc = kTRUE) {SetBit(kMCdata, mc);}
59 virtual void SetPostProcess(Bool_t pp = kTRUE) {SetBit(kPostProcess, pp);}
3a43767e 60 virtual void Terminate(Option_t *);
3d86166d 61
de520d8f 62protected:
dad3aa6b 63 Int_t DebugLevel() const { return fDebugLevel;}
64 static TTreeSRedirector* DebugStream() { return fgDebugStream;}
65 void InitFunctorList();
66 void Adjust(TF1 *f, TH1 * const h);
3d86166d 67
3d86166d 68 UChar_t fNRefFigures; //! no of reference figures reported by task
3d86166d 69 TObjArray *fContainer; //! container to store results
70 TObjArray *fTracks; //! Array of tracks
3a43767e 71 const AliTRDtrackV1 *fkTrack; //! current track
72 const AliTRDtrackInfo::AliMCinfo *fkMC; //! MC info
73 const AliTRDtrackInfo::AliESDinfo *fkESD;//! ESD info
3d86166d 74
3a43767e 75private:
76 AliTRDrecoTask(const AliTRDrecoTask&);
77 AliTRDrecoTask& operator=(const AliTRDrecoTask&);
78
dad3aa6b 79 UChar_t fDebugLevel; //! Debug level
80 TList *fPlotFuncList;//! plot functors list
81 static TList *fgTrendPoint; //! trend point
82 static TTreeSRedirector *fgDebugStream; //! Debug stream
83
a63b505e 84 ClassDef(AliTRDrecoTask, 1) // base TRD reconstruction task
3d86166d 85};
86
87#endif
88