From b1af112568d0f5bf9ffdf92b157c70a221150207 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 29 Aug 2008 18:15:39 +0000 Subject: [PATCH] expert QA data are written on demand only. The cycles array has been extended to kNDET --- STEER/AliQADataMaker.cxx | 2 ++ STEER/AliQADataMaker.h | 4 ++++ STEER/AliQADataMakerRec.cxx | 24 +++++++++++++----------- STEER/AliQADataMakerSim.cxx | 26 ++++++++++++++------------ STEER/AliReconstruction.cxx | 15 ++++++++++----- STEER/AliReconstruction.h | 2 +- 6 files changed, 44 insertions(+), 29 deletions(-) diff --git a/STEER/AliQADataMaker.cxx b/STEER/AliQADataMaker.cxx index 9a08428d737..6142b13fe4e 100644 --- a/STEER/AliQADataMaker.cxx +++ b/STEER/AliQADataMaker.cxx @@ -51,6 +51,7 @@ AliQADataMaker::AliQADataMaker(const char * name, const char * title) : fCurrentCycle(0), fCycle(9999999), fCycleCounter(0), + fWriteExpert(kFALSE), fParameterList(0x0), fRun(0) { @@ -67,6 +68,7 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) : fCurrentCycle(qadm.fCurrentCycle), fCycle(qadm.fCycle), fCycleCounter(qadm.fCycleCounter), + fWriteExpert(qadm.fWriteExpert), fParameterList(qadm.fParameterList), fRun(qadm.fRun) { diff --git a/STEER/AliQADataMaker.h b/STEER/AliQADataMaker.h index 320ef2fceed..9e7ea6cf168 100644 --- a/STEER/AliQADataMaker.h +++ b/STEER/AliQADataMaker.h @@ -64,8 +64,11 @@ public: const Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; } void Reset() { fCycleCounter = 0 ; } void SetCycle(Int_t nevts) { fCycle = nevts ; } + void SetWriteExpert() { fWriteExpert = kTRUE ; } virtual void StartOfCycle(Int_t run = -1) = 0 ; virtual void StartOfCycle(AliQA::TASKINDEX_t, Int_t run, const Bool_t sameCycle = kFALSE) = 0 ; + void UnSetWriteExpert() { fWriteExpert = kFALSE ; } + Bool_t WriteExpert() { return fWriteExpert ; } virtual void SetRecoParam(const AliDetectorRecoParam */*param*/) { return; } @@ -103,6 +106,7 @@ protected: Int_t fCurrentCycle ; //! current cycle number Int_t fCycle ; //! length (# events) of the QA data acquisition cycle Int_t fCycleCounter ; //! cycle counter + Bool_t fWriteExpert ; //! flag to write or not the expert QA data TList * fParameterList ; //! list of QA data parameters Int_t fRun ; //! run number diff --git a/STEER/AliQADataMakerRec.cxx b/STEER/AliQADataMakerRec.cxx index c19ee37e2a1..c519ace3325 100644 --- a/STEER/AliQADataMakerRec.cxx +++ b/STEER/AliQADataMakerRec.cxx @@ -138,18 +138,20 @@ void AliQADataMakerRec::EndOfCycle(AliQA::TASKINDEX_t task) obj->Write() ; } } - TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; - if ( expertDir ) { - expertDir->cd() ; - next.Reset() ; - while ( (obj = dynamic_cast(next())) ) { - TString name(obj->GetTitle()) ; - if (!name.Contains(AliQA::GetExpert())) - continue ; - name.ReplaceAll(AliQA::GetExpert(), "") ; - obj->SetTitle(name) ; + if (WriteExpert()) { + TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; + if ( expertDir ) { // Write only if requested + expertDir->cd() ; + next.Reset() ; + while ( (obj = dynamic_cast(next())) ) { + TString name(obj->GetTitle()) ; + if (!name.Contains(AliQA::GetExpert())) + continue ; + name.ReplaceAll(AliQA::GetExpert(), "") ; + obj->SetTitle(name) ; obj->Write() ; - } + } + } } } if (fObject && GetName() == AliQA::kCORR) { diff --git a/STEER/AliQADataMakerSim.cxx b/STEER/AliQADataMakerSim.cxx index 369bc870429..49207b25f92 100644 --- a/STEER/AliQADataMakerSim.cxx +++ b/STEER/AliQADataMakerSim.cxx @@ -127,18 +127,20 @@ void AliQADataMakerSim::EndOfCycle(AliQA::TASKINDEX_t task) obj->Write() ; } } - TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; - if ( expertDir ) { - expertDir->cd() ; - next.Reset() ; - while ( (obj = dynamic_cast(next())) ) { - TString name(obj->GetTitle()) ; - if (name.Contains(AliQA::GetExpert())) - continue ; - name.ReplaceAll(AliQA::GetExpert(), "") ; - obj->SetTitle(name) ; - obj->Write() ; - } + if (WriteExpert()) { + TDirectory * expertDir = subDir->GetDirectory(AliQA::GetExpert()) ; + if ( expertDir ) { + expertDir->cd() ; + next.Reset() ; + while ( (obj = dynamic_cast(next())) ) { + TString name(obj->GetTitle()) ; + if (name.Contains(AliQA::GetExpert())) + continue ; + name.ReplaceAll(AliQA::GetExpert(), "") ; + obj->SetTitle(name) ; + obj->Write() ; + } + } } } ResetCycle() ; diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 31855684e6e..bf69c94cf4b 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -374,8 +374,11 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) : fReconstructor[iDet] = NULL; fLoader[iDet] = NULL; fTracker[iDet] = NULL; - fQACycles[iDet] = rec.fQACycles[iDet]; - } + } + + for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) + fQACycles[iDet] = rec.fQACycles[iDet]; + for (Int_t i = 0; i < rec.fSpecCDBUri.GetEntriesFast(); i++) { if (rec.fSpecCDBUri[i]) fSpecCDBUri.Add(rec.fSpecCDBUri[i]->Clone()); } @@ -448,9 +451,11 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec) delete fReconstructor[iDet]; fReconstructor[iDet] = NULL; delete fLoader[iDet]; fLoader[iDet] = NULL; delete fTracker[iDet]; fTracker[iDet] = NULL; - fQACycles[iDet] = rec.fQACycles[iDet]; } - + + for (Int_t iDet = 0; iDet < AliQA::kNDET; iDet++) + fQACycles[iDet] = rec.fQACycles[iDet]; + fVertexer = NULL; delete fDiamondProfile; fDiamondProfile = NULL; if (rec.fDiamondProfile) fDiamondProfile = new AliESDVertex(*rec.fDiamondProfile); @@ -1286,7 +1291,7 @@ void AliReconstruction::SlaveBegin(TTree*) if (fRunQA) { fQASteer = new AliQADataMakerSteer("rec") ; fQASteer->SetActiveDetectors(fQADetectors) ; - for (Int_t det = 0 ; det < fgkNDetectors ; det++) + for (Int_t det = 0 ; det < AliQA::kNDET ; det++) fQASteer->SetCycleLength(AliQA::DETECTORINDEX_t(det), fQACycles[det]) ; if (!fRawReader && fQATasks.Contains(AliQA::kRAWS)) fQATasks.ReplaceAll(Form("%d",AliQA::kRAWS), "") ; diff --git a/STEER/AliReconstruction.h b/STEER/AliReconstruction.h index 02eb818377d..ec15f41bd02 100644 --- a/STEER/AliReconstruction.h +++ b/STEER/AliReconstruction.h @@ -265,7 +265,7 @@ private: Bool_t fSetRunNumberFromDataCalled; //! flag to check if run number is already loaded from run loader //Quality Assurance - Int_t fQACycles[ fgkNDetectors]; // # events over which QA data are accumulated + Int_t fQACycles[ AliQA::kNDET]; // # events over which QA data are accumulated TString fQADetectors ; // list of detectors to be QA'ed AliQADataMakerSteer * fQASteer ; //! steering class to run QA TString fQATasks ; // list of QA tasks to be performed -- 2.43.0