]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMaker.h
Pedestal suppression implemented
[u/mrichter/AliRoot.git] / STEER / AliQADataMaker.h
index 34d32ecdc643712de793cb4c1e89edaefc569d23..331fd1cb9d2b6294209762aa7edbb7b6103a9e1e 100644 (file)
@@ -6,25 +6,25 @@
 
 /* $Id$ */
 
-/*
-  Base Class:
-  Produces the data needed to calculate the quality assurance. 
-  All data must be mergeable objects.
-  Y. Schutz CERN July 2007
-*/
+//
+//  Base Class:
+//  Produces the data needed to calculate the quality assurance. 
+//  All data must be mergeable objects.
+//  Y. Schutz CERN July 2007
+//
 
 
 // --- ROOT system ---
 #include <TH1.h>
-#include <TList.h>
+#include <TObjArray.h>
 #include <TNamed.h>  
-class TFile;  
+class TClonesArray;
 class TDirectory;
+class TFile;  
 class TObject; 
 class TTree; 
 class AliESDEvent;
 class AliRawReader;
-class TClonesArray;
 
 // --- Standard library ---
 
@@ -34,75 +34,74 @@ class TClonesArray;
 class AliQADataMaker: public TNamed {
   
 public:
+       
+       AliQADataMaker(const char * name="", const char * title="") ;          // ctor
+       AliQADataMaker(const AliQADataMaker& qadm) ;   
+       virtual ~AliQADataMaker() {} // dtor
   
-  AliQADataMaker(const char * name="", const char * title="") ;          // ctor
-  AliQADataMaker(const AliQADataMaker& qadm) ;   
-  AliQADataMaker& operator = (const AliQADataMaker& qadm) ;
-  virtual ~AliQADataMaker() {;} // dtor
-  
-  const Int_t         Add2DigitsList(TH1 * hist, const Int_t index)    { return Add2List(hist, index, fDigitsQAList) ; }
-  const Int_t         Add2ESDsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fESDsQAList) ; }
-  const Int_t         Add2HitsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fHitsQAList) ; }
-  const Int_t         Add2RecPointsList(TH1 * hist, const Int_t index) { return Add2List(hist, index, fRecPointsQAList) ; }
-  const Int_t         Add2RawsList(TH1 * hist, const Int_t index)      { return Add2List(hist, index, fRawsQAList) ; }
-  const Int_t         Add2SDigitsList(TH1 * hist, const Int_t index)   { return Add2List(hist, index, fSDigitsQAList) ; }
-  virtual void        Exec(AliQA::TASKINDEX, TObject * data) ;
-  void                EndOfCycle(AliQA::TASKINDEX) ;
-  void                Finish(AliQA::TASKINDEX task) const ; 
-  TH1 *               GetDigitsData(const Int_t index)    { return dynamic_cast<TH1 *>(GetData(fDigitsQAList, index)) ; }
-  TH1 *               GetESDsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fESDsQAList, index)) ; }
-  TH1 *               GetHitsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fHitsQAList, index)) ; }
-  TH1 *               GetRecPointsData(const Int_t index) { return dynamic_cast<TH1 *>(GetData(fRecPointsQAList, index)) ; }
-  TH1 *               GetRawsData(const Int_t index)      { return dynamic_cast<TH1 *>(GetData(fRawsQAList, index)) ; }
-  TH1 *               GetSDigitsData(const Int_t index)   { return dynamic_cast<TH1 *>(GetData(fSDigitsQAList, index)) ; }
-  const char *        GetDetectorDirName() { return fDetectorDirName.Data() ; }
-  const Int_t         Increment() { return ++fCycleCounter ; } 
-  TList *             Init(AliQA::TASKINDEX, Int_t run, Int_t cycles = -1) ;
-  void                Init(AliQA::TASKINDEX, TList * list, Int_t run, Int_t cycles = -1) ;
-  const Bool_t        IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
-  void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
-  void                StartOfCycle(AliQA::TASKINDEX, Option_t * sameCycle = "new") ;
+       virtual Int_t Add2DigitsList(TH1 * hist, const Int_t index)          = 0 ; 
+       virtual Int_t Add2ESDsList(TH1 * hist, const Int_t index)            = 0 ; 
+       virtual Int_t Add2HitsList(TH1 * hist, const Int_t index)            = 0 ; 
+       virtual Int_t Add2RecPointsList(TH1 * hist, const Int_t index)       = 0 ; 
+       virtual Int_t Add2RawsList(TH1 * hist, const Int_t index)            = 0 ; 
+       virtual Int_t Add2SDigitsList(TH1 * hist, const Int_t index)         = 0 ; 
+       virtual void        Exec(AliQA::TASKINDEX_t, TObject * data)                 = 0 ;
+       virtual void        EndOfCycle(AliQA::TASKINDEX_t)                           = 0 ;
+       void                Finish() const ; 
+    virtual TH1 *       GetDigitsData(const Int_t index)                       = 0 ; 
+       virtual TH1 *       GetESDsData(const Int_t index)                         = 0 ; 
+       virtual TH1 *       GetHitsData(const Int_t index)                         = 0 ; 
+       virtual TH1 *       GetRecPointsData(const Int_t index)                    = 0 ; 
+       virtual TH1 *       GetRawsData(const Int_t index)                         = 0 ; 
+       virtual TH1 *       GetSDigitsData(const Int_t index)                      = 0 ; 
+       const char *        GetDetectorDirName() const { return fDetectorDirName.Data() ; }
+       const Int_t         Increment() { return ++fCycleCounter ; } 
+       virtual TObjArray * Init(AliQA::TASKINDEX_t, Int_t run, Int_t cycles = -1)                   = 0 ;
+       virtual void        Init(AliQA::TASKINDEX_t, TObjArray * list, Int_t run, Int_t cycles = -1) = 0 ;
+       const Bool_t        IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; }
+       void                Reset(const Bool_t sameCycle = kTRUE) ;     
+    void                SetCycle(Int_t nevts) { fCycle = nevts ; } 
+       virtual void        StartOfCycle(AliQA::TASKINDEX_t, const Bool_t sameCycle = kFALSE) = 0 ;
 
 protected: 
 
-  Int_t          Add2List(TH1 * hist, const Int_t index, TList * list) { list->AddAt(hist, index) ; return list->LastIndex() ; }
-  virtual void   EndOfDetectorCycle(AliQA::TASKINDEX, TList * ) {AliInfo("To be implemented by detectors");} 
-  TObject *      GetData(TList * list, const Int_t index)  { return list->At(index) ; } 
-  virtual void   InitDigits()        {AliInfo("To be implemented by detectors");}
-  virtual void   InitESDs()          {AliInfo("To be implemented by detectors");}
-  virtual void   InitHits()          {AliInfo("To be implemented by detectors");}
-  //virtual void   InitRecParticles()  {AliInfo("To be implemented by detectors");}
-  virtual void   InitRecPoints()     {AliInfo("To be implemented by detectors");}
-  virtual void   InitRaws()          {AliInfo("To be implemented by detectors");}
-  virtual void   InitSDigits()       {AliInfo("To be implemented by detectors");}
-  //virtual void   InitTrackSegments() {AliInfo("To ne implemented by detectors");}
-  virtual void   MakeESDs(AliESDEvent * )          {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeHits(TClonesArray * )         {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeHits(TTree * )                {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeDigits(TClonesArray * )       {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeDigits(TTree * )              {AliInfo("To be implemented by detectors");} 
-  //  virtual void   MakeRecParticles(TClonesArray * ) {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeRaws(AliRawReader *)          {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeRecPoints(TTree * )           {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeSDigits(TClonesArray * )      {AliInfo("To be implemented by detectors");} 
-  virtual void   MakeSDigits(TTree * )             {AliInfo("To be implemented by detectors");} 
-  //virtual void   MakeTrackSegments(TTree * )       {AliInfo("To be implemented by detectors");} 
-  void           ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; } 
-  virtual void   StartOfDetectorCycle() {AliInfo("To be implemented by detectors");} 
+       Int_t          Add2List(TH1 * hist, const Int_t index, TObjArray * list) ;
+       virtual void   DefaultEndOfDetectorCycle(AliQA::TASKINDEX_t task ) ; 
+       virtual void   EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * obj ) = 0 ; 
+       TObject *      GetData(TObjArray * list, const Int_t index) ;
+       virtual void   InitDigits()        = 0 ; 
+       virtual void   InitESDs()          = 0 ; 
+       virtual void   InitHits()          = 0 ; 
+  //virtual void   InitRecParticles()  = 0 ; 
+       virtual void   InitRecPoints()     = 0 ; 
+       virtual void   InitRaws()          = 0 ; 
+       virtual void   InitSDigits()       = 0 ; 
+  //virtual void   InitTrackSegments()  = 0 ; 
+       virtual void   MakeESDs(AliESDEvent * )          = 0 ; 
+       virtual void   MakeHits(TClonesArray * )         = 0 ; 
+       virtual void   MakeHits(TTree * )                = 0 ;  
+       virtual void   MakeDigits(TClonesArray * )       = 0 ;  
+       virtual void   MakeDigits(TTree * )              = 0 ; 
+  //virtual void   MakeRecParticles(TClonesArray * ) = 0 ; 
+       virtual void   MakeRaws(AliRawReader *)          = 0 ; 
+       virtual void   MakeRecPoints(TTree * )           = 0 ; 
+       virtual void   MakeSDigits(TClonesArray * )      = 0 ;  
+       virtual void   MakeSDigits(TTree * )             = 0 ;  
+  //virtual void   MakeTrackSegments(TTree * )          = 0 ;  
+       void           ResetCycle() { fCurrentCycle++ ; fCycleCounter = 0 ; } 
+       virtual void   StartOfDetectorCycle()            = 0 ;
+       
+       TFile *        fOutput ;          //! output root file
+       TDirectory *   fDetectorDir ;     //! directory for the given detector in the file
+       TString        fDetectorDirName ; //! detector directory name in the quality assurance data file
+       Int_t          fCurrentCycle ;    //! current cycle number
+       Int_t          fCycle ;           //! length (# events) of the QA data acquisition cycle  
+       Int_t          fCycleCounter ;    //! cycle counter
+       Int_t          fRun ;             //! run number
+
+private:
+       AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented
 
-  TFile *        fOutput ;          //! output root file
-  TDirectory *   fDetectorDir ;     //! directory for the given detector in the file
-  TString        fDetectorDirName ; //! detector directory name in the quality assurance data file
-  TList *        fDigitsQAList ;    //! list of the digits QA data objects
-  TList *        fESDsQAList ;      //! list of the ESDs QA data objects
-  TList *        fHitsQAList ;      //! list of the hits QA data objects
-  TList *        fRawsQAList ;      //! list of the raws QA data objects
-  TList *        fRecPointsQAList ; //! list of the recpoints QA data objects
-  TList *        fSDigitsQAList ;   //! list of the sdigits QA data objects
-  Int_t          fCurrentCycle ;    //! current cycle number
-  Int_t          fCycle ;           //! length (# events) of the QA data acquisition cycle  
-  Int_t          fCycleCounter ;    //! cycle counter
-  Int_t          fRun ;             //! run number
   
  ClassDef(AliQADataMaker,1)  // description