From: schutz Date: Fri, 6 Nov 2009 19:36:01 +0000 (+0000) Subject: added the option to save or not the QA data objects X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=50dee02c0b2ad10fca0f1eb7b82cc04440164aea;p=u%2Fmrichter%2FAliRoot.git added the option to save or not the QA data objects --- diff --git a/STEER/AliQADataMakerRec.cxx b/STEER/AliQADataMakerRec.cxx index 3fef9e5ab9c..58bd7d1f399 100644 --- a/STEER/AliQADataMakerRec.cxx +++ b/STEER/AliQADataMakerRec.cxx @@ -39,6 +39,7 @@ #include "AliLog.h" #include "AliQADataMakerRec.h" +#include "AliQAManager.h" #include "AliESDEvent.h" #include "AliRawReader.h" @@ -163,6 +164,7 @@ void AliQADataMakerRec::EndOfCycle(AliQAv1::TASKINDEX_t task) return ; //DefaultEndOfDetectorCycle(task) ; EndOfDetectorCycle(task, list) ; + fDetectorDir = fOutput->GetDirectory(GetDetectorDirName()) ; if (!fDetectorDir) fDetectorDir = fOutput->mkdir(GetDetectorDirName()) ; @@ -378,7 +380,8 @@ void AliQADataMakerRec::StartOfCycle(AliQAv1::TASKINDEX_t task, Int_t run, const ResetCycle() ; if (fOutput) fOutput->Close() ; - fOutput = AliQAv1::GetQADataFile(GetName(), fRun) ; + if (AliQAManager::QAManager(AliQAv1::kRECMODE)->IsSaveData()) + fOutput = AliQAv1::GetQADataFile(GetName(), fRun) ; } AliDebug(AliQAv1::GetQADebugLevel(), Form(" Run %d Cycle %d task %s file %s", fRun, fCurrentCycle, AliQAv1::GetTaskName(task).Data(), fOutput->GetName() )) ; diff --git a/STEER/AliQAManager.cxx b/STEER/AliQAManager.cxx index 9a0e08a7810..ae436ac629a 100644 --- a/STEER/AliQAManager.cxx +++ b/STEER/AliQAManager.cxx @@ -90,7 +90,8 @@ AliQAManager::AliQAManager() : fRunLoader(NULL), fTasks(""), fEventSpecie(AliRecoParam::kDefault), - fPrintImage(kTRUE) + fPrintImage(kTRUE), + fSaveData(kTRUE) { // default ctor fMaxEvents = fNumberOfEvents ; @@ -125,7 +126,8 @@ AliQAManager::AliQAManager(AliQAv1::MODE_t mode, const Char_t* gAliceFilename) : fRunLoader(NULL), fTasks(""), fEventSpecie(AliRecoParam::kDefault), - fPrintImage(kTRUE) + fPrintImage(kTRUE), + fSaveData(kTRUE) { // default ctor fMaxEvents = fNumberOfEvents ; @@ -160,7 +162,8 @@ AliQAManager::AliQAManager(const AliQAManager & qas) : fRunLoader(NULL), fTasks(qas.fTasks), fEventSpecie(qas.fEventSpecie), - fPrintImage(qas.fPrintImage) + fPrintImage(qas.fPrintImage), + fSaveData(qas.fSaveData) { // cpy ctor @@ -534,10 +537,12 @@ void AliQAManager::EndOfCycle(TObjArray * detArray) } qac->SetPrintImage(fPrintImage) ; - for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) { - if ( fTasks.Contains(Form("%d", taskIndex)) ) - qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ; - } + if (IsSaveData()) { + for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) { + if ( fTasks.Contains(Form("%d", taskIndex)) ) + qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ; + } + } qadm->Finish(); } } @@ -563,10 +568,12 @@ void AliQAManager::EndOfCycle(TString detectors) if (!detectors.Contains(AliQAv1::GetDetName(iDet))) continue ; qac->SetPrintImage(fPrintImage) ; - for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) { - if ( fTasks.Contains(Form("%d", taskIndex)) ) - qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ; - } + if (IsSaveData()) { + for (UInt_t taskIndex = 0; taskIndex < AliQAv1::kNTASKINDEX; taskIndex++) { + if ( fTasks.Contains(Form("%d", taskIndex)) ) + qadm->EndOfCycle(AliQAv1::GetTaskIndex(AliQAv1::GetTaskName(taskIndex))) ; + } + } qadm->Finish(); } } diff --git a/STEER/AliQAManager.h b/STEER/AliQAManager.h index 52d94215442..16f8b0b2c8f 100644 --- a/STEER/AliQAManager.h +++ b/STEER/AliQAManager.h @@ -54,6 +54,7 @@ public: AliQADataMaker * GetQADataMaker(const Int_t iDet) ; void Increment(const AliQAv1::TASKINDEX_t taskIndex = AliQAv1::kNULLTASKINDEX) ; void InitQADataMaker(UInt_t run, TObjArray * detArray=0x0) ; + Bool_t IsSaveData() { return fSaveData ; } Bool_t IsSelected(const Char_t * detName) ; Bool_t Merge(Int_t runNumber = -1, const char *fileName = NULL) const ; void MergeCustom() const ; @@ -79,6 +80,7 @@ public: void SetPrintImage(Bool_t opt = kTRUE) { fPrintImage = opt ; } void SetRecoParam(const Int_t det, const AliDetectorRecoParam *par) ; void SetRunLoader(AliRunLoader * rl) { fRunLoader = rl ; } + void SetSaveData(Bool_t opt = kTRUE ) { fSaveData = opt ; } void SetTasks(TString tasks) { fTasks = tasks ; } void SetWriteExpert() ; void ShowQA() ; @@ -118,9 +120,10 @@ private: Int_t fQACycles[fgkNDetectors]; //! array of QA cycle length Bool_t fQAWriteExpert[fgkNDetectors]; //! array of QA cycle length AliRecoParam::EventSpecie_t fEventSpecie ; //! type of event - Bool_t fPrintImage ; //! flag to print the images or not + Bool_t fPrintImage ; //! flag to print the images or not + Bool_t fSaveData ; //! flag to sve the QA data or not - ClassDef(AliQAManager, 1) // class for running the QA makers + ClassDef(AliQAManager, 2) // class for running the QA makers }; #endif