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