]>
Commit | Line | Data |
---|---|---|
3ab35fc5 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | ||
17 | /////////////////////////////////////////////////////////////////////////////// | |
18 | // // | |
19 | // Base class for the calibration components using | |
20 | // as input TPCseeds and ESDs | |
21 | // Event loop outside of the component | |
22 | // | |
23 | // | |
ae28e92e | 24 | // Base functionality to be implemeneted by component |
25 | /* | |
26 | //In some cases only one of this function to be implemented | |
27 | virtual void Process(AliESDEvent *event) | |
28 | virtual void Process(AliTPCseed *track) | |
29 | // | |
30 | virtual Long64_t Merge(TCollection *li); | |
31 | virtual void Analyze() | |
32 | void Terminate(); | |
33 | */ | |
34 | // Functionality provided by base class for Algorith debuging: | |
35 | // TTreeSRedirector * cstream = GetDebugStreamer() - get debug streamer which can be use for numerical debugging | |
36 | // | |
37 | ||
38 | ||
39 | ||
40 | // marian.ivanov@cern.ch | |
3ab35fc5 | 41 | // |
42 | #include "AliTPCcalibBase.h" | |
ae28e92e | 43 | #include "TTreeStream.h" |
3ab35fc5 | 44 | |
45 | ClassImp(AliTPCcalibBase) | |
46 | ||
ae28e92e | 47 | AliTPCcalibBase::AliTPCcalibBase(): |
48 | TNamed(), | |
49 | fDebugStreamer(0), | |
50 | fStreamLevel(0), | |
51 | fDebugLevel(0) | |
3ab35fc5 | 52 | { |
53 | // | |
54 | // Constructor | |
55 | // | |
56 | } | |
57 | ||
ae28e92e | 58 | AliTPCcalibBase::AliTPCcalibBase(const AliTPCcalibBase&calib): |
59 | TNamed(calib), | |
60 | fDebugStreamer(0), | |
61 | fStreamLevel(calib.fStreamLevel), | |
62 | fDebugLevel(calib.fDebugLevel) | |
63 | { | |
64 | // | |
65 | // copy constructor | |
66 | // | |
67 | } | |
68 | ||
69 | AliTPCcalibBase &AliTPCcalibBase::operator=(const AliTPCcalibBase&calib){ | |
70 | // | |
71 | // | |
72 | // | |
73 | ((TNamed *)this)->operator=(calib); | |
74 | fDebugStreamer=0; | |
75 | fStreamLevel=calib.fStreamLevel; | |
76 | fDebugLevel=calib.fDebugLevel; | |
77 | } | |
78 | ||
79 | ||
3ab35fc5 | 80 | AliTPCcalibBase::~AliTPCcalibBase() { |
81 | // | |
82 | // destructor | |
83 | // | |
ae28e92e | 84 | if (fDebugStreamer) delete fDebugStreamer; |
85 | fDebugStreamer=0; | |
86 | } | |
87 | ||
88 | void AliTPCcalibBase::Terminate(){ | |
89 | // | |
90 | // | |
91 | // | |
92 | if (fDebugStreamer) delete fDebugStreamer; | |
93 | fDebugStreamer = 0; | |
94 | return; | |
95 | } | |
96 | ||
97 | TTreeSRedirector *AliTPCcalibBase::GetDebugStreamer(){ | |
98 | // | |
99 | // Get Debug streamer | |
100 | // In case debug streamer not yet initialized and StreamLevel>0 create new one | |
101 | // | |
102 | if (fStreamLevel==0) return 0; | |
103 | if (fDebugStreamer) return fDebugStreamer; | |
104 | TString dsName; | |
105 | dsName=GetName(); | |
106 | dsName+="Debug.root"; | |
107 | dsName.ReplaceAll(" ",""); | |
108 | fDebugStreamer = new TTreeSRedirector(dsName.Data()); | |
109 | return fDebugStreamer; | |
3ab35fc5 | 110 | } |