]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIQADATAMAKER_H | |
2 | #define ALIQADATAMAKER_H | |
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 | ||
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 | // | |
15 | ||
16 | ||
17 | // --- ROOT system --- | |
18 | #include <TH1.h> | |
19 | #include <TObjArray.h> | |
20 | #include <TNamed.h> | |
21 | class TClonesArray; | |
22 | class TDirectory; | |
23 | class TFile; | |
24 | class TObject; | |
25 | class TTree; | |
26 | class AliESDEvent; | |
27 | class AliRawReader; | |
28 | ||
29 | // --- Standard library --- | |
30 | ||
31 | // --- AliRoot header files --- | |
32 | #include "AliQA.h" | |
33 | ||
34 | class AliQADataMaker: public TNamed { | |
35 | ||
36 | public: | |
37 | ||
38 | AliQADataMaker(const char * name="", const char * title="") ; // ctor | |
39 | AliQADataMaker(const AliQADataMaker& qadm) ; | |
40 | virtual ~AliQADataMaker() {} // dtor | |
41 | ||
42 | virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index) = 0 ; | |
43 | virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index) = 0 ; | |
44 | virtual Int_t Add2HitsList(TH1 * hist, const Int_t index) = 0 ; | |
45 | virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index) = 0 ; | |
46 | virtual Int_t Add2RawsList(TH1 * hist, const Int_t index) = 0 ; | |
47 | virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index) = 0 ; | |
48 | virtual void Exec(AliQA::TASKINDEX, TObject * data) = 0 ; | |
49 | virtual void EndOfCycle(AliQA::TASKINDEX) = 0 ; | |
50 | void Finish() const ; | |
51 | virtual TH1 * GetDigitsData(const Int_t index) = 0 ; | |
52 | virtual TH1 * GetESDsData(const Int_t index) = 0 ; | |
53 | virtual TH1 * GetHitsData(const Int_t index) = 0 ; | |
54 | virtual TH1 * GetRecPointsData(const Int_t index) = 0 ; | |
55 | virtual TH1 * GetRawsData(const Int_t index) = 0 ; | |
56 | virtual TH1 * GetSDigitsData(const Int_t index) = 0 ; | |
57 | const char * GetDetectorDirName() const { return fDetectorDirName.Data() ; } | |
58 | const Int_t Increment() { return ++fCycleCounter ; } | |
59 | virtual TObjArray * Init(AliQA::TASKINDEX, Int_t run, Int_t cycles = -1) = 0 ; | |
60 | virtual void Init(AliQA::TASKINDEX, TObjArray * list, Int_t run, Int_t cycles = -1) = 0 ; | |
61 | const Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; } | |
62 | void Reset(const Bool_t sameCycle = kTRUE) ; | |
63 | void SetCycle(Int_t nevts) { fCycle = nevts ; } | |
64 | virtual void StartOfCycle(AliQA::TASKINDEX, const Bool_t sameCycle = kFALSE) = 0 ; | |
65 | ||
66 | protected: | |
67 | ||
68 | Int_t Add2List(TH1 * hist, const Int_t index, TObjArray * list) ; | |
69 | virtual void EndOfDetectorCycle(AliQA::TASKINDEX, TObjArray * ) = 0 ; | |
70 | TObject * GetData(TObjArray * list, const Int_t index) ; | |
71 | virtual void InitDigits() = 0 ; | |
72 | virtual void InitESDs() = 0 ; | |
73 | virtual void InitHits() = 0 ; | |
74 | //virtual void InitRecParticles() = 0 ; | |
75 | virtual void InitRecPoints() = 0 ; | |
76 | virtual void InitRaws() = 0 ; | |
77 | virtual void InitSDigits() = 0 ; | |
78 | //virtual void InitTrackSegments() = 0 ; | |
79 | virtual void MakeESDs(AliESDEvent * ) = 0 ; | |
80 | virtual void MakeHits(TClonesArray * ) = 0 ; | |
81 | virtual void MakeHits(TTree * ) = 0 ; | |
82 | virtual void MakeDigits(TClonesArray * ) = 0 ; | |
83 | virtual void MakeDigits(TTree * ) = 0 ; | |
84 | //virtual void MakeRecParticles(TClonesArray * ) = 0 ; | |
85 | virtual void MakeRaws(AliRawReader *) = 0 ; | |
86 | virtual void MakeRecPoints(TTree * ) = 0 ; | |
87 | virtual void MakeSDigits(TClonesArray * ) = 0 ; | |
88 | virtual void MakeSDigits(TTree * ) = 0 ; | |
89 | //virtual void MakeTrackSegments(TTree * ) = 0 ; | |
90 | void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; } | |
91 | virtual void StartOfDetectorCycle() = 0 ; | |
92 | ||
93 | TFile * fOutput ; //! output root file | |
94 | TDirectory * fDetectorDir ; //! directory for the given detector in the file | |
95 | TString fDetectorDirName ; //! detector directory name in the quality assurance data file | |
96 | Int_t fCurrentCycle ; //! current cycle number | |
97 | Int_t fCycle ; //! length (# events) of the QA data acquisition cycle | |
98 | Int_t fCycleCounter ; //! cycle counter | |
99 | Int_t fRun ; //! run number | |
100 | ||
101 | private: | |
102 | AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented | |
103 | ||
104 | ||
105 | ClassDef(AliQADataMaker,1) // description | |
106 | ||
107 | }; | |
108 | ||
109 | #endif // AliQADataMaker_H |