]>
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; // | |
4e25ac79 | 13 | // qas.Run(AliQAv1::kRAWS, rawROOTFileName); // |
14 | // qas.Run(AliQAv1::kHITS); // | |
15 | // qas.Run(AliQAv1::kSDIGITS); // | |
16 | // qas.Run(AliQAv1::kDIGITS); // | |
17 | // qas.Run(AliQAv1::kRECPOINTS); // | |
18 | // qas.Run(AliQAv1::kESDS); // | |
07426850 | 19 | // // |
20 | /////////////////////////////////////////////////////////////////////////////// | |
21 | ||
22 | #include <TNamed.h> | |
4e25ac79 | 23 | #include "AliQAv1.h" |
07426850 | 24 | #include "AliLoader.h" |
25 | #include "AliCDBManager.h" | |
26 | #include "AliRecoParam.h" | |
27 | ||
fec0891b | 28 | class TCanvas ; |
07426850 | 29 | class AliESDEvent ; |
30 | class AliDetectorRecoParam ; | |
31 | class AliESDEvent ; | |
32 | class AliQADataMaker ; | |
33 | class AliRawReader ; | |
34 | class AliRunLoader ; | |
35 | class AliCorrQADataMakerRec ; | |
36 | ||
37 | class AliQAManager : public AliCDBManager { | |
38 | private: | |
39 | AliQAManager() ; | |
fec0891b | 40 | AliQAManager(Char_t * mode, const Char_t * gAliceFilename = "galice.root") ; |
07426850 | 41 | AliQAManager(const AliQAManager & qas) ; |
42 | AliQAManager & operator = (const AliQAManager & qas) ; | |
43 | ||
44 | public: | |
45 | virtual ~AliQAManager() ; | |
fec0891b | 46 | void EndOfCycle(TObjArray * detArray=0x0) ; |
47 | void EndOfCycle(TString detectors) ; | |
48 | UInt_t GetCurrentEvent() const { return fCurrentEvent ; } | |
49 | TObjArray * GetFromOCDB(AliQAv1::DETECTORINDEX_t det, AliQAv1::TASKINDEX_t task, const Char_t * year) const ; | |
50 | TCanvas ** GetImage(Char_t * detName) ; | |
51 | const Char_t * GetMode(){ return fMode.Data() ; } | |
52 | AliQAv1 * GetQA(UInt_t run, UInt_t evt) ; | |
07426850 | 53 | AliQADataMaker * GetQADataMaker(const Int_t iDet) ; |
fec0891b | 54 | void Increment() ; |
55 | void InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ; | |
56 | Bool_t Merge(Int_t runNumber = -1) const ; | |
57 | void MergeCustom() const ; | |
58 | Bool_t MergeXML(const Char_t * collection, const Char_t * subFile = 0, const Char_t * outFile = 0) ; | |
59 | static AliQAManager * QAManager(Char_t * mode = "", TMap *entryCache = NULL, Int_t run = -1) ; | |
60 | void Reset(const Bool_t sameCycle = kFALSE) ; | |
61 | TString Run(const Char_t * detectors, const AliQAv1::TASKINDEX_t taskIndex=AliQAv1::kNULLTASKINDEX, Bool_t const sameCycle = kFALSE, const Char_t * fileName = NULL) ; | |
62 | TString Run(const Char_t * detectors, AliRawReader * rawReader, Bool_t const sameCycle = kFALSE) ; | |
63 | TString Run(const Char_t * detectors, const Char_t * filename, Bool_t const sameCycle = kFALSE) ; | |
64 | void RunOneEvent(AliRawReader * rawReader) ; | |
65 | void RunOneEventInOneDetector(Int_t det, TTree * tree) ; | |
66 | void RunOneEvent(AliESDEvent *& esd) ; | |
67 | Bool_t Save2OCDB(const Int_t runNumber, AliRecoParam::EventSpecie_t es, const Char_t * year = "08", const Char_t * detectors = "ALL") const ; | |
68 | void SetActiveDetectors(TString aDet) { fDetectors = aDet ; } | |
69 | void SetCycleLength(const AliQAv1::DETECTORINDEX_t det, const Int_t cycle) { fQACycles[det] = cycle ; } | |
70 | void SetWriteExpert(const AliQAv1::DETECTORINDEX_t det) { fQAWriteExpert[det] = kTRUE ; } | |
71 | void SetEventRange(UInt_t first, UInt_t last) { fFirstEvent = first ; fMaxEvents = last - first + 1 ; } | |
72 | void SetEventSpecie(AliRecoParam::EventSpecie_t es) ; | |
73 | void SetFirsEvent(UInt_t first) { fFirstEvent = first ; } | |
74 | void SetMaxEvents(UInt_t max) { fMaxEvents = max ; } | |
75 | void SetNewCycle() { fCycleSame = kTRUE ; } | |
76 | void SetPrintImage(Bool_t opt = kTRUE) { fPrintImage = opt ; } | |
77 | void SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ; | |
78 | void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; } | |
79 | void SetTasks(TString tasks) { fTasks = tasks ; } | |
80 | void SetWriteExpert() ; | |
81 | ||
07426850 | 82 | private: |
fec0891b | 83 | Bool_t DoIt(const AliQAv1::TASKINDEX_t taskIndex) ; |
84 | AliLoader * GetLoader(Int_t iDet) ; | |
85 | Int_t GetQACycles(const Int_t iDet) const { return fQACycles[iDet] ; } | |
86 | Bool_t InitQA(const AliQAv1::TASKINDEX_t taskIndex, const Char_t * fileName = NULL) ; | |
87 | Bool_t InitRunLoader() ; | |
88 | Bool_t IsSelected(const Char_t * detName) ; | |
89 | Bool_t Finish(const AliQAv1::TASKINDEX_t taskIndex) ; | |
90 | Bool_t MergeData(const Int_t runNumber) const ; | |
91 | Bool_t MergeResults(const Int_t runNumber) const ; | |
92 | Bool_t SaveIt2OCDB(const Int_t runNumber, TFile * inputFile, const Char_t * year, AliRecoParam::EventSpecie_t es) const ; | |
07426850 | 93 | |
fec0891b | 94 | static AliQAManager* fgQAInstance; // AliQAManager instance |
95 | UInt_t fCurrentEvent ; //! event counter | |
96 | Bool_t fCycleSame ; //! true if 2 consecutive data making for a same detector | |
97 | TString fDetectors ; //! list of active detectors | |
98 | TString fDetectorsW ; //! list of active detectors with QA implemented | |
99 | AliESDEvent * fESD ; //! current ESD | |
100 | TTree * fESDTree ; //! current ESD Tree | |
101 | TString fGAliceFileName ; //! name of the galice file | |
102 | UInt_t fFirstEvent ; //! first event to process | |
103 | Long64_t fMaxEvents ; //! number of events to process | |
104 | TString fMode ; //! sim or rec | |
105 | Long64_t fNumberOfEvents ; //! number of events in the run | |
106 | AliRecoParam fRecoParam; //! container for the reco-param objects for detectors | |
107 | UInt_t fRunNumber ; //! current run number | |
108 | AliRawReader * fRawReader ; //! current raw reader object | |
109 | Bool_t fRawReaderDelete ; //! tells if the rawReader has been created by this | |
110 | AliRunLoader * fRunLoader ; //! current run loader object | |
111 | TString fTasks ; //! list of QA tasks to be performed | |
112 | static const UInt_t fgkNDetectors = AliQAv1::kNDET ; //! number of detectors | |
113 | AliLoader * fLoader[fgkNDetectors]; //! array of detectors loader | |
114 | AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects | |
115 | Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length | |
116 | Bool_t fQAWriteExpert[fgkNDetectors]; //! array of QA cycle length | |
117 | AliRecoParam::EventSpecie_t fEventSpecie ; //! type of event | |
118 | Bool_t fPrintImage ; //! flag to print the images or not | |
bc8761a0 | 119 | |
fec0891b | 120 | ClassDef(AliQAManager, 1) // class for running the QA makers |
07426850 | 121 | }; |
122 | ||
123 | #endif |