QA works during reconstruction in and outside the event loop
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerSteer.h
CommitLineData
312e6f8d 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
26class AliQADataMaker ;
4ecde5fc 27class AliRawReader ;
312e6f8d 28class AliRunLoader ;
c65c502a 29class AliESDEvent ;
312e6f8d 30
31class AliQADataMakerSteer: public TNamed {
32public:
33 AliQADataMakerSteer(const char* gAliceFilename = "galice.root",
34 const char * name = "AliQADataMakerSteer",
35 const char * title = "QA makers") ;
36 AliQADataMakerSteer(const AliQADataMakerSteer & qas) ;
37 AliQADataMakerSteer & operator = (const AliQADataMakerSteer & qas) ;
38 virtual ~AliQADataMakerSteer() ;
f0c6fb4b 39 UInt_t GetCurrentEvent() const { return fCurrentEvent ; }
96d67a8d 40 TObjArray * GetFromOCDB(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, const char * year) const ;
4edbc5bc 41 Bool_t Merge(const Int_t runNumber = -1) const ;
fff5167b 42 void Reset(const Bool_t sameCycle = kFALSE) ;
7c002d48 43 TString Run(const char * detectors, const AliQA::TASKINDEX_t taskIndex, Bool_t const sameCycle = kFALSE, const char * fileName = NULL) ;
44 TString Run(const char * detectors, AliRawReader * rawReader, Bool_t const sameCycle = kFALSE) ;
45 TString Run(const char * detectors, const char * filename, Bool_t const sameCycle = kFALSE) ;
11032e1d 46 Bool_t Save2OCDB(const Int_t runNumber, const char * year = "08", const Int_t cycleNumber=0, const char * detectors = "ALL") const ;
96d67a8d 47 void SetCycleLength(const AliQA::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; }
f0c6fb4b 48 void SetMaxEvents(UInt_t max) { fMaxEvents = max ; }
fff5167b 49 void SetNewCycle() { fCycleSame = kTRUE ; }
4edbc5bc 50 void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
51
312e6f8d 52private:
96d67a8d 53 Bool_t DoIt(const AliQA::TASKINDEX_t taskIndex, const char * mode) ;
312e6f8d 54 AliLoader * GetLoader(Int_t iDet) ;
55 const Int_t GetQACycles(const Int_t iDet) { return fQACycles[iDet] ; }
04236e67 56 AliQADataMaker * GetQADataMaker(const Int_t iDet, const char * mode) ;
96d67a8d 57 Bool_t Init(const AliQA::TASKINDEX_t taskIndex, const char * mode, const char * fileName = NULL) ;
312e6f8d 58 Bool_t InitRunLoader() ;
4d52736b 59 Bool_t IsSelected(const char * detName) ;
96d67a8d 60 Bool_t Finish(const AliQA::TASKINDEX_t taskIndex, const char * mode) ;
11032e1d 61 Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const ;
312e6f8d 62
63
018c2b09 64 UInt_t fCurrentEvent ; //! event counter
c65c502a 65 Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector
4d52736b 66 TString fDetectors ; //! list of active detectors
fff5167b 67 TString fDetectorsW ; //! list of active detectors with QA implemented
312e6f8d 68 AliESDEvent * fESD ; //! current ESD
69 TTree * fESDTree ; //! current ESD Tree
70 Bool_t fFirst ; //! to search the detector QA data maker only once
71 TString fGAliceFileName ; //! name of the galice file
f0c6fb4b 72 Int_t fMaxEvents ; //! number of events to process
312e6f8d 73 Long64_t fNumberOfEvents ; //! number of events in the run
f0c6fb4b 74 UInt_t fRunNumber ; //! current run number
4ecde5fc 75 AliRawReader * fRawReader ; //! current raw reader object
6441b07a 76 Bool_t fRawReaderDelete ; //! tells if the rawReader has been created by this
312e6f8d 77 AliRunLoader * fRunLoader ; //! current run loader object
78 static const UInt_t fgkNDetectors = AliQA::kNDET ; //! number of detectors
79 AliLoader * fLoader[fgkNDetectors]; //! array of detectors loader
80 AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects
81 Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length
82
83 ClassDef(AliQADataMakerSteer, 0) // class for running the QA makers
84};
85
86#endif