]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/qaRec/AliTRDrecoTask.cxx
redesign of the QA package.
[u/mrichter/AliRoot.git] / TRD / qaRec / AliTRDrecoTask.cxx
1 #include "TObjArray.h"
2 #include "TDirectory.h"
3 #include "TTreeStream.h"
4
5 #include "AliLog.h"
6 #include "AliAnalysisTask.h"
7
8 #include "AliTRDrecoTask.h"
9
10 ClassImp(AliTRDrecoTask)
11
12 //_______________________________________________________
13 AliTRDrecoTask::AliTRDrecoTask(const char *name, const char *title)
14   : AliAnalysisTask(name, title)
15   ,fNRefFigures(0)
16   ,fDebugLevel(0)
17   ,fContainer(0x0)
18   ,fTracks(0x0)
19   ,fDebugStream(0x0)
20 {
21   DefineInput(0, TObjArray::Class());
22   DefineOutput(0, TObjArray::Class());
23 }
24
25 //_______________________________________________________
26 AliTRDrecoTask::~AliTRDrecoTask() 
27 {
28   if(fDebugStream){ 
29     delete fDebugStream;
30     fDebugStream = 0x0;
31   }
32
33   if(fContainer){
34     //fContainer->Delete();
35     delete fContainer;
36     fContainer = 0x0;
37   }
38 }
39
40 //_______________________________________________________
41 void AliTRDrecoTask::ConnectInputData(Option_t *)
42 {
43   //
44   // Connect input data
45   //
46
47   fTracks = dynamic_cast<TObjArray *>(GetInputData(0));
48 }
49
50
51 //_______________________________________________________
52 void AliTRDrecoTask::GetRefFigure(Int_t /*ifig*/, Int_t &first, Int_t &last)
53 {
54   AliWarning("Retrieving reference figures not implemented.");
55   first = 0; last = 0;
56 }
57
58 //_______________________________________________________
59 Bool_t AliTRDrecoTask::Load(Char_t */*filename*/)
60 {
61   AliWarning("Loading of reference histograms not implemented.");
62   return kFALSE;
63 }
64
65 //_______________________________________________________
66 Bool_t AliTRDrecoTask::PostProcess()
67 {
68   AliWarning("Post processing of reference histograms not implemented.");
69   return kFALSE;
70 }
71
72 //_______________________________________________________
73 void AliTRDrecoTask::SetDebugLevel(Int_t level)
74 {
75   fDebugLevel = level;
76   if(fDebugLevel>=2){
77     TDirectory *savedir = gDirectory;
78     fDebugStream = new TTreeSRedirector(Form("TRD.Debug%s.root", GetName()));
79     savedir->cd();
80   }
81 }