Fixes for SSD detector algorithms and preprocessor (Panos)
[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:
30bbd491 33 AliQADataMakerSteer(char * mode, const char* gAliceFilename = "galice.root",
312e6f8d 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() ;
7ce961eb 39 UInt_t GetCurrentEvent() const { return fCurrentEvent ; }
40 TObjArray * GetFromOCDB(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, const char * year) const ;
30bbd491 41 AliQADataMaker * GetQADataMaker(const Int_t iDet) ;
7ce961eb 42 Bool_t Merge(const Int_t runNumber = -1) const ;
43 void Reset(const Bool_t sameCycle = kFALSE) ;
44 TString Run(const char * detectors, const AliQA::TASKINDEX_t taskIndex, Bool_t const sameCycle = kFALSE, const char * fileName = NULL) ;
45 TString Run(const char * detectors, AliRawReader * rawReader, Bool_t const sameCycle = kFALSE) ;
46 TString Run(const char * detectors, const char * filename, Bool_t const sameCycle = kFALSE) ;
47 Bool_t Save2OCDB(const Int_t runNumber, const char * year = "08", const Int_t cycleNumber=0, const char * detectors = "ALL") const ;
48 void SetCycleLength(const AliQA::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; }
49 void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; }
50 void SetFirsEvent(UInt_t first) { fFirstEvent = first ; }
51 void SetMaxEvents(UInt_t max) { fMaxEvents = max ; }
52 void SetNewCycle() { fCycleSame = kTRUE ; }
53 void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; }
4edbc5bc 54
312e6f8d 55private:
30bbd491 56 Bool_t DoIt(const AliQA::TASKINDEX_t taskIndex) ;
312e6f8d 57 AliLoader * GetLoader(Int_t iDet) ;
58 const Int_t GetQACycles(const Int_t iDet) { return fQACycles[iDet] ; }
30bbd491 59 Bool_t Init(const AliQA::TASKINDEX_t taskIndex, const char * fileName = NULL) ;
312e6f8d 60 Bool_t InitRunLoader() ;
4d52736b 61 Bool_t IsSelected(const char * detName) ;
30bbd491 62 Bool_t Finish(const AliQA::TASKINDEX_t taskIndex) ;
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
7ce961eb 67 Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector
68 TString fDetectors ; //! list of active detectors
69 TString fDetectorsW ; //! list of active detectors with QA implemented
312e6f8d 70 AliESDEvent * fESD ; //! current ESD
71 TTree * fESDTree ; //! current ESD Tree
312e6f8d 72 TString fGAliceFileName ; //! name of the galice file
e30aef00 73 UInt_t fFirstEvent ; //! first event to process
95932286 74 Int_t fMaxEvents ; //! number of events to process
30bbd491 75 char * fMode ; //! sim or rec
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
84 Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length
85
86 ClassDef(AliQADataMakerSteer, 0) // class for running the QA makers
87};
88
89#endif