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