Changes to compile with Root6 on macosx64
[u/mrichter/AliRoot.git] / STEER / STEER / AliQADataMaker.h
CommitLineData
2e42b4d4 1#ifndef ALIQADATAMAKER_H
2#define ALIQADATAMAKER_H
421ab0fb 3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5
6
7/* $Id$ */
8
202374b1 9//
10// Base Class:
11// Produces the data needed to calculate the quality assurance.
12// All data must be mergeable objects.
13// Y. Schutz CERN July 2007
14//
421ab0fb 15
16
17// --- ROOT system ---
6c18591a 18#include <TH1.h>
4edbc5bc 19#include <TObjArray.h>
421ab0fb 20#include <TNamed.h>
92664bc8 21#include <TArrayI.h>
634696f5 22//class TCanvas ;
4edbc5bc 23class TClonesArray;
7079c8d7 24class TDirectory;
4edbc5bc 25class TFile;
d76c31f4 26class TObject;
27class TTree;
28class AliESDEvent;
d5cf81bd 29class AliRawReader;
b8bd1ab8 30class AliDetectorRecoParam;
a5fa6165 31
421ab0fb 32// --- Standard library ---
33
34// --- AliRoot header files ---
4e25ac79 35#include "AliQAv1.h"
57acd2d2 36#include "AliRecoParam.h"
421ab0fb 37
2e42b4d4 38class AliQADataMaker: public TNamed {
421ab0fb 39
92664bc8 40 public:
41
42 AliQADataMaker(const Char_t * name="", const Char_t * title="") ; // ctor
43 AliQADataMaker(const AliQADataMaker& qadm) ;
44 virtual ~AliQADataMaker() ; // dtor
45 //
46 void ForbidCloning(TH1* h, Bool_t v=kTRUE) {h->SetBit(AliQAv1::GetForbidCloningBit(),v);}
47 Bool_t IsCloningForbidden(TH1* h) const {return h->TestBit(AliQAv1::GetForbidCloningBit());}
48 Char_t* GetHistoTrigger(const TH1* h) const;
49 //
50 virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE) = 0 ;
51 virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE) = 0 ;
52 virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE) = 0 ;
53 virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE) = 0 ;
54 virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE, const Bool_t saveForCorr = kFALSE) = 0 ;
55 virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t image = kFALSE) = 0 ;
56 virtual void Exec(AliQAv1::TASKINDEX_t, TObject * data) = 0 ;
57 virtual void EndOfCycle() = 0 ;
58 virtual void EndOfCycle(AliQAv1::TASKINDEX_t ) = 0 ;
59 virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list ) = 0 ;
60 void Finish() const ;
f4af9d92 61 AliRecoParam::EventSpecie_t GetEventSpecie() const { return fEventSpecie ; }
92664bc8 62 //
63 virtual TObject* GetDigitsData(const Int_t index) = 0 ;
64 virtual TObject* GetESDsData(const Int_t index) = 0 ;
65 virtual TObject* GetHitsData(const Int_t index) = 0 ;
66 virtual TObject* GetRecPointsData(const Int_t index) = 0 ;
67 virtual TObject* GetRawsData(const Int_t index) = 0 ;
68 virtual TObject* GetSDigitsData(const Int_t index) = 0 ;
69 //
70 virtual TH1* GetDigitsData(const Int_t index, int cloneID) = 0 ;
71 virtual TH1* GetESDsData(const Int_t index, int cloneID) = 0 ;
72 virtual TH1* GetHitsData(const Int_t index, int cloneID) = 0 ;
73 virtual TH1* GetRecPointsData(const Int_t index, int cloneID) = 0 ;
74 virtual TH1* GetRawsData(const Int_t index, int cloneID) = 0 ;
75 virtual TH1* GetSDigitsData(const Int_t index, int cloneID) = 0 ;
76 //
77 virtual TObjArray* GetDigitsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
78 virtual TObjArray* GetSDigitsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
79 virtual TObjArray* GetESDsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
80 virtual TObjArray* GetHitsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
81 virtual TObjArray* GetRecPointsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
82 virtual TObjArray* GetRawsDataOfTrigClass(int cloneID, TObjArray *dest=0) = 0;
83
84 //
85 const Char_t * GetDetectorDirName() const { return fDetectorDirName.Data() ; }
57acd2d2 86 TList * GetParameterList() const { return fParameterList[AliRecoParam::AConvert(fEventSpecie)] ; }
2b261f20 87 virtual const AliDetectorRecoParam * GetRecoParam() { return NULL ; }
f4af9d92 88 Int_t GetRun() const { return fRun ; }
92664bc8 89 Int_t Increment() { return ++fCycleCounter ; }
90 virtual TObjArray** Init(AliQAv1::TASKINDEX_t, Int_t cycles = -1) = 0 ;
211a7313 91 TObjArray* Init(AliQAv1::TASKINDEX_t, AliRecoParam::EventSpecie_t es, Int_t cycles = -1) ;
92664bc8 92 virtual void Init(AliQAv1::TASKINDEX_t, TObjArray ** list, Int_t run, Int_t cycles = -1) = 0 ;
93 virtual void InitDigits() = 0 ;
94 virtual void InitESDs() = 0 ;
95 virtual void InitRaws() = 0 ;
4c2c255c 96 virtual void InitRecPoints() = 0 ;
97 Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
6252ceeb 98 Bool_t IsValidEventSpecie(Int_t eventSpecieIndex, TObjArray ** list) ;
92664bc8 99 void Reset() { fCycleCounter = 0 ; }
100 virtual void ResetDetector(AliQAv1::TASKINDEX_t task) = 0 ;
101 void SetCycle(Int_t nevts) { fCycle = nevts ; }
b1af1125 102 void SetWriteExpert() { fWriteExpert = kTRUE ; }
92664bc8 103 virtual void StartOfCycle(Int_t run = -1) = 0 ;
104 virtual void StartOfCycle(AliQAv1::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ;
b1af1125 105 void UnSetWriteExpert() { fWriteExpert = kFALSE ; }
106 Bool_t WriteExpert() { return fWriteExpert ; }
92664bc8 107 void SetEventSpecie(AliRecoParam::EventSpecie_t es) {fEventSpecie = es;}
108 void SetEventSpecie(Int_t es) { SetEventSpecie(AliRecoParam::Convert(es)); }
2b261f20 109 virtual void SetRecoParam(const AliDetectorRecoParam *) {;}
110
eca4fa66 111 virtual void InitRecPointsForTracker() {;} // needed by AliGlobalQADataMaker
112
92664bc8 113 Int_t IsClonedPerTrigClass(Int_t index, TObjArray ** list);
114 Bool_t IsOrigHistoKept(Int_t index, TObjArray ** list);
115 Bool_t MatchesToTriggers(UInt_t hpos) const;
116 //
117 virtual TObjArray* GetMatchingDigitsData(const Int_t index, TObjArray* optDest=0) = 0 ;
118 virtual TObjArray* GetMatchingESDsData(const Int_t index, TObjArray* optDest=0) = 0 ;
119 virtual TObjArray* GetMatchingHitsData(const Int_t index, TObjArray* optDest=0) = 0 ;
120 virtual TObjArray* GetMatchingRecPointsData(const Int_t index, TObjArray* optDest=0) = 0 ;
121 virtual TObjArray* GetMatchingRawsData(const Int_t index, TObjArray* optDest=0) = 0 ;
122 virtual TObjArray* GetMatchingSDigitsData(const Int_t index, TObjArray* optDest=0) = 0 ;
123 //
124 virtual TH1* GetMatchingRawsHisto(Int_t index, Int_t trigId) = 0;
125 virtual TH1* GetMatchingDigitsHisto(Int_t index, Int_t trigId) = 0;
126 virtual TH1* GetMatchingSDigitsHisto(Int_t index, Int_t trigId) = 0;
127 virtual TH1* GetMatchingHitsHisto(Int_t index, Int_t trigId) = 0;
128 virtual TH1* GetMatchingRecPointsHisto(Int_t index, Int_t trigId) = 0;
129 virtual TH1* GetMatchingESDsHisto(Int_t index, Int_t trigId) = 0;
130 //
131 virtual TObjArray* GetMatchingRawsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
132 virtual TObjArray* GetMatchingDigitsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
133 virtual TObjArray* GetMatchingSDigitsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
134 virtual TObjArray* GetMatchingHitsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
135 virtual TObjArray* GetMatchingRecPointsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
136 virtual TObjArray* GetMatchingESDsHistosSet(const Int_t* indexList, Int_t nHist,Int_t trigId) = 0;
137 //
138 virtual Int_t FillHitsData(Int_t index, double x) = 0;
139 virtual Int_t FillDigitsData(Int_t index, double x) = 0;
140 virtual Int_t FillSDigitsData(Int_t index, double x) = 0;
141 virtual Int_t FillRawsData(Int_t index, double x) = 0;
142 virtual Int_t FillRecPointsData(Int_t index, double x) = 0;
143 virtual Int_t FillESDsData(Int_t index, double x) = 0;
144 //
145 virtual Int_t FillHitsData(Int_t index, double x, double y) = 0;
146 virtual Int_t FillDigitsData(Int_t index, double x, double y) = 0;
147 virtual Int_t FillSDigitsData(Int_t index, double x, double y) = 0;
148 virtual Int_t FillRawsData(Int_t index, double x, double y) = 0;
149 virtual Int_t FillRecPointsData(Int_t index, double x, double y) = 0;
150 virtual Int_t FillESDsData(Int_t index, double x, double y) = 0;
151 //
152 virtual Int_t FillHitsData(Int_t index, double x, double y, double z) = 0;
153 virtual Int_t FillDigitsData(Int_t index, double x, double y, double z) = 0;
154 virtual Int_t FillSDigitsData(Int_t index, double x, double y, double z) = 0;
155 virtual Int_t FillRawsData(Int_t index, double x, double y, double z) = 0;
156 virtual Int_t FillRecPointsData(Int_t index, double x, double y, double z) = 0;
157 virtual Int_t FillESDsData(Int_t index, double x, double y, double z) = 0;
158 //
159 virtual Int_t SetHitsDataBinContent(Int_t index, int bin, double w) = 0;
160 virtual Int_t SetDigitsDataBinContent(Int_t index, int bin, double w) = 0;
161 virtual Int_t SetSDigitsDataBinContent(Int_t index, int bin, double w) = 0;
162 virtual Int_t SetRawsDataBinContent(Int_t index, int bin, double w) = 0;
163 virtual Int_t SetRecPointsDataBinContent(Int_t index, int bin, double w) = 0;
164 virtual Int_t SetESDsDataBinContent(Int_t index, int bin, double w) = 0;
165 //
166 virtual Int_t SetHitsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
167 virtual Int_t SetDigitsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
168 virtual Int_t SetSDigitsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
169 virtual Int_t SetRawsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
170 virtual Int_t SetRecPointsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
171 virtual Int_t SetESDsDataBinContent(Int_t index, int binX, int binY, double w) = 0;
172 //
173 virtual Int_t SetHitsDataBinError(Int_t index, int bin, double err) = 0;
174 virtual Int_t SetDigitsDataBinError(Int_t index, int bin, double err) = 0;
175 virtual Int_t SetSDigitsDataBinError(Int_t index, int bin, double err) = 0;
176 virtual Int_t SetRawsDataBinError(Int_t index, int bin, double err) = 0;
177 virtual Int_t SetRecPointsDataBinError(Int_t index, int bin, double err) = 0;
178 virtual Int_t SetESDsDataBinError(Int_t index, int bin, double err) = 0;
179 //
180 virtual Int_t SetHitsDataBinError(Int_t index, int binX, int binY, double err) = 0;
181 virtual Int_t SetDigitsDataBinError(Int_t index, int binX, int binY, double err) = 0;
182 virtual Int_t SetSDigitsDataBinError(Int_t index, int binX, int binY, double err) = 0;
183 virtual Int_t SetRawsDataBinError(Int_t index, int binX, int binY, double err) = 0;
184 virtual Int_t SetRecPointsDataBinError(Int_t index, int binX, int binY, double err) = 0;
185 virtual Int_t SetESDsDataBinError(Int_t index, int binX, int binY, double err) = 0;
186 //
187 virtual Int_t ResetHitsData(Int_t index, Option_t *opt="") = 0;
188 virtual Int_t ResetDigitsData(Int_t index, Option_t *opt="") = 0;
189 virtual Int_t ResetSDigitsData(Int_t index, Option_t *opt="") = 0;
190 virtual Int_t ResetRawsData(Int_t index, Option_t *opt="") = 0;
191 virtual Int_t ResetRecPointsData(Int_t index, Option_t *opt="") = 0;
192 virtual Int_t ResetESDsData(Int_t index, Option_t *opt="") = 0;
193 //
194 virtual Int_t ResetStatsHitsData(Int_t index) = 0;
195 virtual Int_t ResetStatsDigitsData(Int_t index) = 0;
196 virtual Int_t ResetStatsSDigitsData(Int_t index) = 0;
197 virtual Int_t ResetStatsRawsData(Int_t index) = 0;
198 virtual Int_t ResetStatsRecPointsData(Int_t index) = 0;
199 virtual Int_t ResetStatsESDsData(Int_t index) = 0;
200 //
201 void ResetEvCountCycle(AliRecoParam::EventSpecie_t isp, AliQAv1::TASKINDEX_t task);
202 void ResetEvCountTotal(AliRecoParam::EventSpecie_t isp, AliQAv1::TASKINDEX_t task);
203 void ResetEvCountCycle(AliRecoParam::EventSpecie_t isp) {fEvCountCycle[AliRecoParam::AConvert(isp)].Reset();}
204 void ResetEvCountTotal(AliRecoParam::EventSpecie_t isp) {fEvCountTotal[AliRecoParam::AConvert(isp)].Reset();}
205 void ResetEvCountCycle() {for (int isp=AliRecoParam::kNSpecies;isp--;) ResetEvCountCycle(AliRecoParam::ConvertIndex(isp));}
206 void ResetEvCountTotal() {for (int isp=AliRecoParam::kNSpecies;isp--;) ResetEvCountTotal(AliRecoParam::ConvertIndex(isp));}
207 //
208 Int_t GetEvCountCycle(AliRecoParam::EventSpecie_t sp, AliQAv1::TASKINDEX_t task, Int_t trCl=-1) const;
209 Int_t GetEvCountTotal(AliRecoParam::EventSpecie_t sp, AliQAv1::TASKINDEX_t task, Int_t trCl=-1) const;
210 Int_t GetEvCountCycle(AliQAv1::TASKINDEX_t task,Int_t trCl=-1) const {return GetEvCountCycle(fEventSpecie,task,trCl);}
211 Int_t GetEvCountTotal(AliQAv1::TASKINDEX_t task,Int_t trCl=-1) const {return GetEvCountCycle(fEventSpecie,task,trCl);}
212 //
213 Int_t GetEvCountCycleRaws(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kRAWS,trCl);}
214 Int_t GetEvCountCycleHits(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kHITS,trCl);}
215 Int_t GetEvCountCycleSDigits(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kSDIGITS,trCl);}
216 Int_t GetEvCountCycleDigits(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kDIGITS,trCl);}
217 Int_t GetEvCountCycleRecPoints(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kRECPOINTS,trCl);}
218 Int_t GetEvCountCycleESDS(Int_t trCl=-1) const {return GetEvCountCycle(AliQAv1::kESDS,trCl);}
219 //
220 Int_t GetEvCountTotalRaws(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kRAWS,trCl);}
221 Int_t GetEvCountTotalHits(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kHITS,trCl);}
222 Int_t GetEvCountTotalSDigits(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kSDIGITS,trCl);}
223 Int_t GetEvCountTotalDigits(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kDIGITS,trCl);}
224 Int_t GetEvCountTotalRecPoints(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kRECPOINTS,trCl);}
225 Int_t GetEvCountTotalESDS(Int_t trCl=-1) const {return GetEvCountTotal(AliQAv1::kESDS,trCl);}
226 //
227 void IncEvCountCycle(AliQAv1::TASKINDEX_t task, Int_t diff=1);
228 void IncEvCountTotal(AliQAv1::TASKINDEX_t task, Int_t diff=1);
229 //
230 void IncEvCountCycleRaws(Int_t diff=1) {IncEvCountCycle(AliQAv1::kRAWS, diff);}
231 void IncEvCountCycleHits(Int_t diff=1) {IncEvCountCycle(AliQAv1::kHITS, diff);}
232 void IncEvCountCycleSDigits(Int_t diff=1) {IncEvCountCycle(AliQAv1::kSDIGITS, diff);}
233 void IncEvCountCycleDigits(Int_t diff=1) {IncEvCountCycle(AliQAv1::kDIGITS, diff);}
234 void IncEvCountCycleRecPoints(Int_t diff=1) {IncEvCountCycle(AliQAv1::kRECPOINTS, diff);}
235 void IncEvCountCycleTrackSegments(Int_t diff=1) {IncEvCountCycle(AliQAv1::kTRACKSEGMENTS, diff);}
236 void IncEvCountCycleRecParticles(Int_t diff=1) {IncEvCountCycle(AliQAv1::kRECPARTICLES, diff);}
237 void IncEvCountCycleESDs(Int_t diff=1) {IncEvCountCycle(AliQAv1::kESDS, diff);}
238 //
239 void IncEvCountTotalRaws(Int_t diff=1) {IncEvCountTotal(AliQAv1::kRAWS, diff);}
240 void IncEvCountTotalHits(Int_t diff=1) {IncEvCountTotal(AliQAv1::kHITS, diff);}
241 void IncEvCountTotalSDigits(Int_t diff=1) {IncEvCountTotal(AliQAv1::kSDIGITS, diff);}
242 void IncEvCountTotalDigits(Int_t diff=1) {IncEvCountTotal(AliQAv1::kDIGITS, diff);}
243 void IncEvCountTotalRecPoints(Int_t diff=1) {IncEvCountTotal(AliQAv1::kRECPOINTS, diff);}
244 void IncEvCountTotalTrackSegments(Int_t diff=1) {IncEvCountTotal(AliQAv1::kTRACKSEGMENTS, diff);}
245 void IncEvCountTotalRecParticles(Int_t diff=1) {IncEvCountTotal(AliQAv1::kRECPARTICLES, diff);}
246 void IncEvCountTotalESDs(Int_t diff=1) {IncEvCountTotal(AliQAv1::kESDS, diff);}
247 //
248 virtual void ClonePerTrigClass(AliQAv1::TASKINDEX_t task) = 0;
249 //
250 static Int_t SetEventTrigClasses(const char* triggers);
251 static const TObjArray& GetEventTrigClasses() {return fgEventTrigClasses;}
252 static TNamed* GetTrigClass(Int_t i) {return fgTrigClasses ? (TNamed*)fgTrigClasses->At(i) : 0;}
253 static const char* GetTrigClassName(Int_t i) {return fgTrigClasses ? (i<0||i>=GetNTrigClasses() ? "TriggerBlind":GetTrigClass(i)->GetName()) : 0;}
254 static TNamed* GetEventTrigClass(Int_t i) {return (TNamed*)fgEventTrigClasses.At(i);}
255 static Int_t GetNEventTrigClasses() {return fgEventTrigClasses.GetEntriesFast();}
256 static void ResetEventTrigClasses() {fgEventTrigClasses.Clear(); fgEventTrigClasses.SetUniqueID(0);}
257 static Int_t GetNTrigClasses() {return fgTrigClasses ? fgTrigClasses->GetEntriesFast() : 0;}
258 static Bool_t IsEventTriggerSet() {return fgEventTrigClasses.GetUniqueID()>0;}
259 static void SetCloningRequest(TObjArray* aliases, TObjArray* histos);
260 //
261 static TObjArray* GetDataOfTrigClass(TObjArray * arr, Int_t cloneID, TObjArray *dest=0);
262 static TObjArray* GetDataOfTrigClass(TObjArray ** list, Int_t specieIndex, int cloneID, TObjArray *dest);
263 //
264 static const char* GetTriggerPrefix() {return fgkTriggerPrefix;}
265 //
266 protected:
267 virtual void ClonePerTrigClassL(TObjArray ** list, AliQAv1::TASKINDEX_t task);
268 virtual Int_t ClonePerTrigClassA(TObjArray * list, const char* hnm, const char* triggers, Bool_t keepOriginal=kFALSE);
269 virtual Int_t ClonePerTrigClassH(Int_t index, TObjArray* list, TObjArray* trigArr, Bool_t keepOriginal=kFALSE);
270 //
271 Int_t Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert = kFALSE, const Bool_t image = kFALSE, const Bool_t saveForCorr = kFALSE) ;
57acd2d2 272 TH1 * CloneMe(TH1 * hist, Int_t specie) const ;
92664bc8 273 virtual void DefaultEndOfDetectorCycle(AliQAv1::TASKINDEX_t task ) ;
274 TObject * GetData(TObjArray ** list, const Int_t index);
275 TH1* GetData(TObjArray ** list, const Int_t index, Int_t cloneID);
276 TObjArray* GetDataOfTrigClass(TObjArray ** list, Int_t cloneID, TObjArray *dest=0);
277 virtual void InitHits() = 0 ;
04236e67 278 //virtual void InitRecParticles() = 0 ;
92664bc8 279 virtual void InitSDigits() = 0 ;
04236e67 280 //virtual void InitTrackSegments() = 0 ;
92664bc8 281 virtual void MakeESDs(AliESDEvent * ) = 0 ;
282 virtual void MakeHits() = 0 ;
283 virtual void MakeHits(TTree * ) = 0 ;
284 virtual void MakeDigits() = 0 ;
285 virtual void MakeDigits(TTree * ) = 0 ;
6252ceeb 286 //virtual void MakeRecParticles( ) = 0 ;
92664bc8 287 virtual void MakeRaws(AliRawReader *) = 0 ;
288 virtual void MakeRecPoints(TTree * ) = 0 ;
289 virtual void MakeSDigits() = 0 ;
290 virtual void MakeSDigits(TTree * ) = 0 ;
04236e67 291 //virtual void MakeTrackSegments(TTree * ) = 0 ;
92664bc8 292 void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; }
293 virtual void StartOfDetectorCycle() = 0 ;
294 //
295 TH1* GetMatchingHisto(TObjArray ** list, Int_t index, Int_t trigId);
296 TObjArray* GetMatchingHistosSet(TObjArray ** list, const Int_t* indexList, Int_t nHist, Int_t trigId);
297 TObjArray* GetMatchingHistos(TObjArray ** list, Int_t index, TObjArray* optDest=0);
298 Bool_t CheckCloningConsistency(TObjArray ** list, const Int_t* indexList, Int_t nHist, Bool_t checkTriggers=kFALSE);
299 Int_t FillData(TObjArray ** list, Int_t index, double x);
300 Int_t FillData(TObjArray ** list, Int_t index, double x, double y);
301 Int_t FillData(TObjArray ** list, Int_t index, double x, double y, double z);
302 Int_t SetDataBinContent(TObjArray ** list, Int_t index, int bin, double w);
303 Int_t SetDataBinContent(TObjArray ** list, Int_t index, int binX, int binY, double w);
304 Int_t SetDataBinError(TObjArray ** list, Int_t index, int bin, double err);
305 Int_t SetDataBinError(TObjArray ** list, Int_t index, int binX, int binY, double err);
306 Int_t ResetData(TObjArray ** list, Int_t index, Option_t* option = "");
307 Int_t ResetStatsData(TObjArray ** list, Int_t index);
308 //
309 TFile * fOutput ; //! output root file
310 TDirectory * fDetectorDir ; //! directory for the given detector in the file
311 TString fDetectorDirName ; //! detector directory name in the quality assurance data file
312 Int_t fCurrentCycle ; //! current cycle number
313 Int_t fCycle ; //! length (# events) of the QA data acquisition cycle
314 Int_t fCycleCounter ; //! cycle counter
b1af1125 315 Bool_t fWriteExpert ; //! flag to write or not the expert QA data
57acd2d2 316 TList ** fParameterList ; //! list of QA data parameters
92664bc8 317 Int_t fRun ; //! run number
57acd2d2 318 AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam
6252ceeb 319 TClonesArray * fDigitsArray ; //! array to hold the sdigits
92664bc8 320 TArrayI fEvCountCycle[AliRecoParam::kNSpecies]; // cycle event counters per specie and per task and eventually per trigger class
321 TArrayI fEvCountTotal[AliRecoParam::kNSpecies]; // total event counters per specie and per task and eventually per trigger class
322 //
323 static TObjArray fgEventTrigClasses; // array of indices of fired trigger classes for current event (indices of fgTriggeClasses)
324 static TObjArray* fgCloningRequest; // set of histogram names and trigger aliases
325 static TObjArray* fgTrigClasses; // set of trigger_aliases and corresponding trigger names
326 static const Char_t* fgkTriggerPrefix; // special prefix to separate the trigger name from histo name
327 private:
328 AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented
421ab0fb 329
92664bc8 330 ClassDef(AliQADataMaker,5) // description
331
421ab0fb 332};
333
92664bc8 334//____________________________________________________________________________
335inline Bool_t AliQADataMaker::IsOrigHistoKept(Int_t index, TObjArray ** list) {
336 // check if the histogram was cloned and the original is kept
337 TObject* h = GetData(list,index); if (!h) return kFALSE;
338 return (!h->TestBit(AliQAv1::GetClonedBit())) || h->TestBit(AliQAv1::GetOrigHistoKeptBit());
339}
340
341//____________________________________________________________________________
342inline Int_t AliQADataMaker::IsClonedPerTrigClass(Int_t index, TObjArray ** list)
343{
344 // if the historgam was cloned per trigger, return number of clones, otherwise, return 0
345 TObject* obj = GetData(list, index);
346 if (!obj || !obj->TestBit(AliQAv1::GetClonedBit())) return 0;
347 return ((TObjArray*)obj)->GetEntriesFast();
348}
349
350//____________________________________________________________________________
351inline Bool_t AliQADataMaker::MatchesToTriggers(UInt_t hpos) const
352{
353 // check if the position hpos of clones TObjArray matches to one of event triggers classes
354 // if the event trigger was not set, every position is matching
355 if (!IsEventTriggerSet()) return kTRUE; // if triggers are not set, then this is a call from EndOfCycle
356 for (int itc=GetNEventTrigClasses();itc--;) if (fgEventTrigClasses.UncheckedAt(itc)->GetUniqueID()==hpos) return kTRUE;
357 return kFALSE;
358}
359
2e42b4d4 360#endif // AliQADataMaker_H