Updating doc
[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 ; }
e30aef00 48 void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }
49 void SetFirsEvent(UInt_t first) { fFirstEvent = first ; }
f0c6fb4b 50 void SetMaxEvents(UInt_t max) { fMaxEvents = max ; }
fff5167b 51 void SetNewCycle() { fCycleSame = kTRUE ; }
4edbc5bc 52 void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
53
312e6f8d 54private:
96d67a8d 55 Bool_t DoIt(const AliQA::TASKINDEX_t taskIndex, const char * mode) ;
312e6f8d 56 AliLoader * GetLoader(Int_t iDet) ;
57 const Int_t GetQACycles(const Int_t iDet) { return fQACycles[iDet] ; }
04236e67 58 AliQADataMaker * GetQADataMaker(const Int_t iDet, const char * mode) ;
96d67a8d 59 Bool_t Init(const AliQA::TASKINDEX_t taskIndex, const char * mode, const char * fileName = NULL) ;
312e6f8d 60 Bool_t InitRunLoader() ;
4d52736b 61 Bool_t IsSelected(const char * detName) ;
96d67a8d 62 Bool_t Finish(const AliQA::TASKINDEX_t taskIndex, const char * mode) ;
11032e1d 63 Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year) const ;
312e6f8d 64
65
018c2b09 66 UInt_t fCurrentEvent ; //! event counter
c65c502a 67 Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector
4d52736b 68 TString fDetectors ; //! list of active detectors
fff5167b 69 TString fDetectorsW ; //! list of active detectors with QA implemented
312e6f8d 70 AliESDEvent * fESD ; //! current ESD
71 TTree * fESDTree ; //! current ESD Tree
72 Bool_t fFirst ; //! to search the detector QA data maker only once
73 TString fGAliceFileName ; //! name of the galice file
e30aef00 74 UInt_t fFirstEvent ; //! first event to process
95932286 75 Int_t fMaxEvents ; //! number of events to process
312e6f8d 76 Long64_t fNumberOfEvents ; //! number of events in the run
f0c6fb4b 77 UInt_t fRunNumber ; //! current run number
4ecde5fc 78 AliRawReader * fRawReader ; //! current raw reader object
6441b07a 79 Bool_t fRawReaderDelete ; //! tells if the rawReader has been created by this
312e6f8d 80 AliRunLoader * fRunLoader ; //! current run loader object
81 static const UInt_t fgkNDetectors = AliQA::kNDET ; //! number of detectors
82 AliLoader * fLoader[fgkNDetectors]; //! array of detectors loader
83 AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects
56f4f5f4 84 TObjArray fQADataMakers; //! array of active QA data maker objects
312e6f8d 85 Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length
86
87 ClassDef(AliQADataMakerSteer, 0) // class for running the QA makers
88};
89
90#endif