]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliQualAssDataMaker.h
bug fix in T00 alias names
[u/mrichter/AliRoot.git] / STEER / AliQualAssDataMaker.h
CommitLineData
421ab0fb 1#ifndef ALIQUALASSDATAMAKER_H
2#define ALIQUALASSDATAMAKER_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 ---
6c18591a 18#include <TH1.h>
19#include <TList.h>
421ab0fb 20#include <TNamed.h>
21class TFile;
7079c8d7 22class TDirectory;
d76c31f4 23class TObject;
24class TTree;
25class AliESDEvent;
d5cf81bd 26class AliRawReader;
27class TClonesArray;
a5fa6165 28
421ab0fb 29// --- Standard library ---
30
31// --- AliRoot header files ---
32#include "AliQualAss.h"
33
34class AliQualAssDataMaker: public TNamed {
35
36public:
37
38 AliQualAssDataMaker(const char * name="", const char * title="") ; // ctor
39 AliQualAssDataMaker(const AliQualAssDataMaker& qadm) ;
40 AliQualAssDataMaker& operator = (const AliQualAssDataMaker& qadm) ;
a4976ef3 41 virtual ~AliQualAssDataMaker() ; // dtor
421ab0fb 42
d76c31f4 43 virtual void Exec(AliQualAss::TASKINDEX, TObject * data) ;
5b188f2f 44 void EndOfCycle(AliQualAss::TASKINDEX) ;
421ab0fb 45 void Finish(AliQualAss::TASKINDEX task) const ;
46 static const char * GetDetectorDirName() { return fDetectorDirName.Data() ; }
5b188f2f 47 const Int_t Increment() { return ++fCycleCounter ; }
48 TList * Init(AliQualAss::TASKINDEX, Int_t run, Int_t cycles = -1) ;
49 const Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
d62f9368 50 const Int_t Add2DigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fDigitsQAList) ; }
51 const Int_t Add2ESDsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fESDsQAList) ; }
52 const Int_t Add2HitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fHitsQAList) ; }
53 const Int_t Add2RecPointsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
54 const Int_t Add2RawsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRawsQAList) ; }
55 const Int_t Add2SDigitsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fSDigitsQAList) ; }
56 TH1 * GetDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
57 TH1 * GetESDsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
58 TH1 * GetHitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
59 TH1 * GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
60 TH1 * GetRawsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
61 TH1 * GetSDigitsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
5b188f2f 62 void SetCycle(Int_t nevts) { fCycle = nevts ; }
d62f9368 63 void StartOfCycle(AliQualAss::TASKINDEX, Option_t * sameCycle = "new") ;
6c18591a 64
421ab0fb 65protected:
66
d62f9368 67 Int_t Add2List(TH1 * hist, const Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
a4976ef3 68 virtual void EndOfDetectorCycle(AliQualAss::TASKINDEX, TList * ) {AliInfo("To be implemented by detectors");}
d62f9368 69 TObject * GetData(TList * list, const Int_t index) { return list->At(index) ; }
5b188f2f 70 virtual void InitDigits() {AliInfo("To be implemented by detectors");}
71 virtual void InitESDs() {AliInfo("To be implemented by detectors");}
72 virtual void InitHits() {AliInfo("To be implemented by detectors");}
73 //virtual void InitRecParticles() {AliInfo("To be implemented by detectors");}
74 virtual void InitRecPoints() {AliInfo("To be implemented by detectors");}
75 virtual void InitRaws() {AliInfo("To be implemented by detectors");}
76 virtual void InitSDigits() {AliInfo("To be implemented by detectors");}
6c18591a 77 //virtual void InitTrackSegments() {AliInfo("To ne implemented by detectors");}
5b188f2f 78 virtual void MakeESDs(AliESDEvent * ) {AliInfo("To be implemented by detectors");}
d5cf81bd 79 virtual void MakeHits(TClonesArray * ) {AliInfo("To be implemented by detectors");}
80 virtual void MakeDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");}
5b188f2f 81 // virtual void MakeRecParticles(TClonesArray * ) {AliInfo("To be implemented by detectors");}
d5cf81bd 82 virtual void MakeRaws(AliRawReader *) {AliInfo("To be implemented by detectors");}
5b188f2f 83 virtual void MakeRecPoints(TTree * ) {AliInfo("To be implemented by detectors");}
d5cf81bd 84 virtual void MakeSDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");}
5b188f2f 85 //virtual void MakeTrackSegments(TTree * ) {AliInfo("To be implemented by detectors");}
d62f9368 86 void ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; }
5b188f2f 87 virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");}
421ab0fb 88
6c18591a 89 TFile * fOutput ; //! output root file
90 TDirectory * fDetectorDir ; //! directory for the given detector in the file
421ab0fb 91 static TString fDetectorDirName ; //! detector directory name in the quality assurance data file
6c18591a 92 TList * fDigitsQAList ; //! list of the digits QA data objects
93 TList * fESDsQAList ; //! list of the ESDs QA data objects
94 TList * fHitsQAList ; //! list of the hits QA data objects
95 TList * fRawsQAList ; //! list of the raws QA data objects
96 TList * fRecPointsQAList ; //! list of the recpoints QA data objects
97 TList * fSDigitsQAList ; //! list of the sdigits QA data objects
5b188f2f 98 Int_t fCurrentCycle ; //! current cycle number
99 Int_t fCycle ; //! length (# events) of the QA data acquisition cycle
100 Int_t fCycleCounter ; //! cycle counter
101 Int_t fRun ; //! run number
a4976ef3 102
6c18591a 103 ClassDef(AliQualAssDataMaker,1) // description
421ab0fb 104
105};
106
107#endif // AliQualAssDataMaker_H