New steering class ro run QA stand alone
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerSteer.h
1 #ifndef ALIQADATAMAKERSTEER_H
2 #define ALIQADATAMAKERSTEER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 ///////////////////////////////////////////////////////////////////////////////
9 //                                                                           //
10 // class for running the QA makers                                           //
11 //                                                                           //
12 //   AliQADataMakerSteer qas;                                                //
13 //   qas.Run(AliQA::kRAWS, rawROOTFileName);                                 //
14 //   qas.Run(AliQA::kHITS);                                                  //
15 //   qas.Run(AliQA::kSDIGITS);                                               //
16 //   qas.Run(AliQA::kDIGITS);                                                //
17 //   qas.Run(AliQA::kRECPOINTS);                                             //
18 //   qas.Run(AliQA::kESDS);                                                  //
19 //                                                                           //
20 ///////////////////////////////////////////////////////////////////////////////
21
22 #include <TNamed.h>
23 #include "AliQA.h"
24 #include "AliLoader.h" 
25  
26 class AliQADataMaker ;
27 class AliRawReaderRoot ;  
28 class AliRunLoader ; 
29
30 class AliQADataMakerSteer: public TNamed {
31 public:
32         AliQADataMakerSteer(const char* gAliceFilename = "galice.root", 
33                                                 const char * name = "AliQADataMakerSteer", 
34                                                 const char * title = "QA makers") ; 
35         AliQADataMakerSteer(const AliQADataMakerSteer & qas) ; 
36         AliQADataMakerSteer & operator = (const AliQADataMakerSteer & qas) ; 
37         virtual ~AliQADataMakerSteer() ; 
38         Bool_t Run(const AliQA::TASKINDEX taskIndex, const char * fileName = NULL) ; 
39         void   SetCycleLength(const AliQA::DETECTORINDEX det, const Int_t cycle) { fQACycles[det] = cycle ; }
40
41 private: 
42         AliLoader      * GetLoader(Int_t iDet) ; 
43         const Int_t      GetQACycles(const Int_t iDet) { return fQACycles[iDet] ; }
44         AliQADataMaker * GetQADataMaker(Int_t iDet) ; 
45         Bool_t                   Init(const AliQA::TASKINDEX taskIndex, const  char * fileName = NULL) ;
46         Bool_t           InitRunLoader() ; 
47         Bool_t           Finish(const AliQA::TASKINDEX taskIndex) ;
48
49  
50         Option_t *         fCycleOption ;                  //! new or same in case of 2 consecutive data making for a same detector   
51         AliESDEvent *      fESD ;                          //! current ESD
52         TTree *            fESDTree ;                      //! current ESD Tree
53         Bool_t             fFirst ;                        //! to search the detector QA data maker only once
54         TString            fGAliceFileName ;               //! name of the galice file
55         UInt_t             fRunNumber ;                    //! current run number
56         Long64_t           fNumberOfEvents ;               //! number of events in the run 
57         AliRawReaderRoot * fRawReader ;                    //! current raw reader object 
58         AliRunLoader *     fRunLoader ;                    //! current run loader object
59         static const UInt_t fgkNDetectors = AliQA::kNDET ; //! number of detectors    
60         AliLoader      *   fLoader[fgkNDetectors];         //! array of detectors loader
61         AliQADataMaker *   fQADataMaker[fgkNDetectors];    //! array of QA data maker objects
62         Int_t              fQACycles[fgkNDetectors];       //! array of QA cycle length
63         
64   ClassDef(AliQADataMakerSteer, 0)      // class for running the QA makers
65 };
66
67 #endif