]>
Commit | Line | Data |
---|---|---|
07426850 | 1 | #ifndef ALIQAMANAGER_H |
2 | #define ALIQAMANAGER_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id: AliQAManager.h 30796 2009-01-28 11:05:10Z schutz $ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | // // | |
10 | // class for running the QA makers // | |
11 | // // | |
12 | // AliQAManager 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 | #include "AliCDBManager.h" | |
26 | #include "AliRecoParam.h" | |
27 | ||
28 | class AliESDEvent ; | |
29 | class AliDetectorRecoParam ; | |
30 | class AliESDEvent ; | |
31 | class AliQADataMaker ; | |
32 | class AliRawReader ; | |
33 | class AliRunLoader ; | |
34 | class AliCorrQADataMakerRec ; | |
35 | ||
36 | class AliQAManager : public AliCDBManager { | |
37 | private: | |
38 | AliQAManager() ; | |
39 | AliQAManager(const Char_t * mode, const Char_t * gAliceFilename = "galice.root") ; | |
40 | AliQAManager(const AliQAManager & qas) ; | |
41 | AliQAManager & operator = (const AliQAManager & qas) ; | |
42 | ||
43 | public: | |
44 | virtual ~AliQAManager() ; | |
45 | void EndOfCycle(TObjArray * detArray=0x0) ; | |
46 | void EndOfCycle(TString detectors) ; | |
47 | UInt_t GetCurrentEvent() const { return fCurrentEvent ; } | |
48 | TObjArray * GetFromOCDB(AliQA::DETECTORINDEX_t det, AliQA::TASKINDEX_t task, const char * year) const ; | |
49 | AliQA * GetQA(UInt_t run, UInt_t evt) ; | |
50 | AliQADataMaker * GetQADataMaker(const Int_t iDet) ; | |
51 | void Increment() ; | |
52 | void InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ; | |
53 | Bool_t Merge(const Int_t runNumber = -1 ) const ; | |
54 | static AliQAManager * QAManager(const Char_t * mode="", TMap *entryCache = NULL, Int_t run = -1) ; | |
55 | void Reset(const Bool_t sameCycle = kFALSE) ; | |
56 | TString Run(const char * detectors, const AliQA::TASKINDEX_t taskIndex=AliQA::kNULLTASKINDEX, Bool_t const sameCycle = kFALSE, const char * fileName = NULL) ; | |
57 | TString Run(const char * detectors, AliRawReader * rawReader, Bool_t const sameCycle = kFALSE) ; | |
58 | TString Run(const char * detectors, const char * filename, Bool_t const sameCycle = kFALSE) ; | |
59 | void RunOneEvent(AliRawReader * rawReader) ; | |
60 | void RunOneEventInOneDetector(Int_t det, TTree * tree) ; | |
61 | void RunOneEvent(AliESDEvent *& esd) ; | |
62 | Bool_t Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const char * year = "08", const char * detectors = "ALL") const ; | |
63 | void SetActiveDetectors(TString aDet) { fDetectors = aDet ; } | |
64 | void SetCycleLength(const AliQA::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; } | |
65 | void SetWriteExpert(const AliQA::DETECTORINDEX_t det) { fQAWriteExpert[det] = kTRUE ; } | |
66 | void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; } | |
67 | void SetEventSpecie(AliRecoParam::EventSpecie_t es) ; | |
68 | void SetFirsEvent(UInt_t first) { fFirstEvent = first ; } | |
69 | void SetMaxEvents(UInt_t max) { fMaxEvents = max ; } | |
70 | void SetNewCycle() { fCycleSame = kTRUE ; } | |
71 | void SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ; | |
72 | void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; } | |
73 | void SetTasks(TString tasks) { fTasks = tasks ; } | |
74 | ||
75 | private: | |
76 | Bool_t DoIt(const AliQA::TASKINDEX_t taskIndex) ; | |
77 | AliLoader * GetLoader(Int_t iDet) ; | |
78 | Int_t GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; } | |
79 | Bool_t InitQA(const AliQA::TASKINDEX_t taskIndex, const char * fileName = NULL) ; | |
80 | Bool_t InitRunLoader() ; | |
81 | Bool_t IsSelected(const char * detName) ; | |
82 | Bool_t Finish(const AliQA::TASKINDEX_t taskIndex) ; | |
83 | Bool_t MergeData(const Int_t runNumber) const ; | |
84 | Bool_t MergeResults(const Int_t runNumber) const ; | |
85 | Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const char * year, AliRecoParam::EventSpecie_t es) const ; | |
86 | ||
87 | static AliQAManager* fgQAInstance; // AliQAManager instance | |
88 | UInt_t fCurrentEvent ; //! event counter | |
89 | Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector | |
90 | TString fDetectors ; //! list of active detectors | |
91 | TString fDetectorsW ; //! list of active detectors with QA implemented | |
92 | AliESDEvent * fESD ; //! current ESD | |
93 | TTree * fESDTree ; //! current ESD Tree | |
94 | TString fGAliceFileName ; //! name of the galice file | |
95 | UInt_t fFirstEvent ; //! first event to process | |
96 | Long64_t fMaxEvents ; //! number of events to process | |
97 | const Char_t * fMode ; //! sim or rec | |
98 | Long64_t fNumberOfEvents ; //! number of events in the run | |
99 | AliRecoParam fRecoParam; //! container for the reco-param objects for detectors | |
100 | UInt_t fRunNumber ; //! current run number | |
101 | AliRawReader * fRawReader ; //! current raw reader object | |
102 | Bool_t fRawReaderDelete ; //! tells if the rawReader has been created by this | |
103 | AliRunLoader * fRunLoader ; //! current run loader object | |
104 | TString fTasks ; //! list of QA tasks to be performed | |
105 | static const UInt_t fgkNDetectors = AliQA::kNDET ; //! number of detectors | |
106 | AliLoader * fLoader[fgkNDetectors]; //! array of detectors loader | |
107 | AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects | |
108 | Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length | |
109 | Bool_t fQAWriteExpert[fgkNDetectors]; //! array of QA cycle length | |
110 | AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam::EventSpecie_t | |
111 | ClassDef(AliQAManager, 0) // class for running the QA makers | |
112 | }; | |
113 | ||
114 | #endif |