]>
Commit | Line | Data |
---|---|---|
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> |
4edbc5bc | 21 | class TClonesArray; |
7079c8d7 | 22 | class TDirectory; |
4edbc5bc | 23 | class TFile; |
d76c31f4 | 24 | class TObject; |
25 | class TTree; | |
26 | class AliESDEvent; | |
d5cf81bd | 27 | class AliRawReader; |
b8bd1ab8 | 28 | class AliDetectorRecoParam; |
a5fa6165 | 29 | |
421ab0fb | 30 | // --- Standard library --- |
31 | ||
32 | // --- AliRoot header files --- | |
2e42b4d4 | 33 | #include "AliQA.h" |
57acd2d2 | 34 | #include "AliRecoParam.h" |
421ab0fb | 35 | |
2e42b4d4 | 36 | class AliQADataMaker: public TNamed { |
421ab0fb | 37 | |
38 | public: | |
04236e67 | 39 | |
40 | AliQADataMaker(const char * name="", const char * title="") ; // ctor | |
41 | AliQADataMaker(const AliQADataMaker& qadm) ; | |
54194e95 | 42 | virtual ~AliQADataMaker() {} // dtor |
421ab0fb | 43 | |
6e65319c | 44 | virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ; |
45 | virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ; | |
46 | virtual Int_t Add2HitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ; | |
47 | virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ; | |
48 | virtual Int_t Add2RawsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) = 0 ; | |
49 | virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index, const Bool_t expert = kFALSE) = 0 ; | |
57acd2d2 | 50 | virtual void Exec(AliQA::TASKINDEX_t, TObject * data) = 0 ; |
51 | virtual void EndOfCycle() = 0 ; | |
52 | virtual void EndOfCycle(AliQA::TASKINDEX_t ) = 0 ; | |
04236e67 | 53 | void Finish() const ; |
940d8e5f | 54 | virtual TH1 * GetDigitsData(const Int_t index) = 0 ; |
eaff8e3b | 55 | virtual TH1 * GetESDsData(const Int_t index) = 0 ; |
56 | virtual TH1 * GetHitsData(const Int_t index) = 0 ; | |
57 | virtual TH1 * GetRecPointsData(const Int_t index) = 0 ; | |
58 | virtual TH1 * GetRawsData(const Int_t index) = 0 ; | |
59 | virtual TH1 * GetSDigitsData(const Int_t index) = 0 ; | |
60 | const char * GetDetectorDirName() const { return fDetectorDirName.Data() ; } | |
57acd2d2 | 61 | TList * GetParameterList() const { return fParameterList[AliRecoParam::AConvert(fEventSpecie)] ; } |
62 | Int_t Increment() { return ++fCycleCounter ; } | |
63 | virtual TObjArray** Init(AliQA::TASKINDEX_t, Int_t cycles = -1) = 0 ; | |
64 | virtual void Init(AliQA::TASKINDEX_t, TObjArray ** list, Int_t run, Int_t cycles = -1) = 0 ; | |
65 | Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; } | |
930e6e3e | 66 | void Reset() { fCycleCounter = 0 ; } |
940d8e5f | 67 | void SetCycle(Int_t nevts) { fCycle = nevts ; } |
b1af1125 | 68 | void SetWriteExpert() { fWriteExpert = kTRUE ; } |
57acd2d2 | 69 | virtual void StartOfCycle(Int_t run = -1) = 0 ; |
930e6e3e | 70 | virtual void StartOfCycle(AliQA::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ; |
b1af1125 | 71 | void UnSetWriteExpert() { fWriteExpert = kFALSE ; } |
72 | Bool_t WriteExpert() { return fWriteExpert ; } | |
57acd2d2 | 73 | void SetEventSpecie(AliRecoParam::EventSpecie_t es) { fEventSpecie = es ; } |
74 | void SetEventSpecie(Int_t es) { fEventSpecie = AliRecoParam::Convert(es) ; } | |
75 | virtual void SetRecoParam(const AliDetectorRecoParam */*param*/) {AliInfo("To be implemented by AliQADataMakerRec, not needed yet in Sim") ; } | |
b8bd1ab8 | 76 | |
421ab0fb | 77 | protected: |
78 | ||
57acd2d2 | 79 | Int_t Add2List(TH1 * hist, const Int_t index, TObjArray ** list, const Bool_t expert = kFALSE, const Bool_t saveForCorr = kFALSE) ; |
80 | TH1 * CloneMe(TH1 * hist, Int_t specie) const ; | |
96d67a8d | 81 | virtual void DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ; |
57acd2d2 | 82 | virtual void EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray ** list ) = 0 ; |
83 | TObject * GetData(TObjArray ** list, const Int_t index) ; | |
04236e67 | 84 | virtual void InitDigits() = 0 ; |
85 | virtual void InitESDs() = 0 ; | |
86 | virtual void InitHits() = 0 ; | |
87 | //virtual void InitRecParticles() = 0 ; | |
88 | virtual void InitRecPoints() = 0 ; | |
89 | virtual void InitRaws() = 0 ; | |
90 | virtual void InitSDigits() = 0 ; | |
91 | //virtual void InitTrackSegments() = 0 ; | |
92 | virtual void MakeESDs(AliESDEvent * ) = 0 ; | |
93 | virtual void MakeHits(TClonesArray * ) = 0 ; | |
94 | virtual void MakeHits(TTree * ) = 0 ; | |
95 | virtual void MakeDigits(TClonesArray * ) = 0 ; | |
96 | virtual void MakeDigits(TTree * ) = 0 ; | |
97 | //virtual void MakeRecParticles(TClonesArray * ) = 0 ; | |
98 | virtual void MakeRaws(AliRawReader *) = 0 ; | |
99 | virtual void MakeRecPoints(TTree * ) = 0 ; | |
100 | virtual void MakeSDigits(TClonesArray * ) = 0 ; | |
101 | virtual void MakeSDigits(TTree * ) = 0 ; | |
102 | //virtual void MakeTrackSegments(TTree * ) = 0 ; | |
103 | void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; } | |
104 | virtual void StartOfDetectorCycle() = 0 ; | |
105 | ||
106 | TFile * fOutput ; //! output root file | |
107 | TDirectory * fDetectorDir ; //! directory for the given detector in the file | |
108 | TString fDetectorDirName ; //! detector directory name in the quality assurance data file | |
109 | Int_t fCurrentCycle ; //! current cycle number | |
110 | Int_t fCycle ; //! length (# events) of the QA data acquisition cycle | |
111 | Int_t fCycleCounter ; //! cycle counter | |
b1af1125 | 112 | Bool_t fWriteExpert ; //! flag to write or not the expert QA data |
57acd2d2 | 113 | TList ** fParameterList ; //! list of QA data parameters |
04236e67 | 114 | Int_t fRun ; //! run number |
57acd2d2 | 115 | AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam |
54194e95 | 116 | private: |
117 | AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented | |
118 | ||
a4976ef3 | 119 | |
2e42b4d4 | 120 | ClassDef(AliQADataMaker,1) // description |
421ab0fb | 121 | |
122 | }; | |
123 | ||
2e42b4d4 | 124 | #endif // AliQADataMaker_H |