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