From 759c1df1bbd9c0c31920a3ba25a6d2f2fda5f0bf Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 26 Oct 2007 15:07:12 +0000 Subject: [PATCH] QA can be switched off SetQA(kFALSE) --- STEER/AliReconstruction.cxx | 18 +++++++++++------- STEER/AliReconstruction.h | 4 +++- STEER/AliSimulation.cxx | 26 ++++++++++++++++---------- STEER/AliSimulation.h | 6 ++++-- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 2969dbd8f86..a22bd4d1efb 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -241,7 +241,9 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename, const char* cdb fAlignObjArray(NULL), fCDBUri(cdbUri), fRemoteCDBUri(""), - fSpecCDBUri() + fSpecCDBUri(), + fRunQA(kTRUE) + { // create reconstruction object with default parameters @@ -302,7 +304,8 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) : fAlignObjArray(rec.fAlignObjArray), fCDBUri(rec.fCDBUri), fRemoteCDBUri(rec.fRemoteCDBUri), - fSpecCDBUri() + fSpecCDBUri(), + fRunQA(kTRUE) { // copy constructor @@ -950,11 +953,12 @@ Bool_t AliReconstruction::Run(const char* input) } //QA - AliQADataMakerSteer qas ; - qas.Run(AliQA::kRECPOINTS) ; - qas.Reset() ; - qas.Run(AliQA::kESDS) ; - + if ( fRunQA ) { + AliQADataMakerSteer qas ; + qas.Run(AliQA::kRECPOINTS) ; + qas.Reset() ; + qas.Run(AliQA::kESDS) ; + } return kTRUE; } diff --git a/STEER/AliReconstruction.h b/STEER/AliReconstruction.h index 5bcd748f936..83c0f350cb4 100644 --- a/STEER/AliReconstruction.h +++ b/STEER/AliReconstruction.h @@ -147,6 +147,7 @@ private: // AliQADataMaker* GetQADataMaker(Int_t iDet); // const Int_t GetQACycles(const char * detector) { return fQACycles[GetDetIndex(detector)] ; } void CheckQA() ; + void SetQA(const Bool_t val) { fRunQA = val ; } //*** Global reconstruction flags ******************* Bool_t fUniformField; // uniform field tracking flag @@ -205,8 +206,9 @@ private: //Quality Assurance // AliQADataMaker * fQADataMaker[fgkNDetectors]; //! array of QA data maker objects // Int_t fQACycles[fgkNDetectors] ; // cycle length (# events) over which QA data are accumulated + Bool_t fRunQA ; // Runs the QA at the end of simulation - ClassDef(AliReconstruction, 15) // class for running the reconstruction + ClassDef(AliReconstruction, 16) // class for running the reconstruction }; #endif diff --git a/STEER/AliSimulation.cxx b/STEER/AliSimulation.cxx index be371819328..ac0a734f503 100644 --- a/STEER/AliSimulation.cxx +++ b/STEER/AliSimulation.cxx @@ -175,6 +175,7 @@ AliSimulation::AliSimulation(const char* configFileName, const char* cdbUri, fRemoteCDBUri(""), fSpecCDBUri(), fEmbeddingFlag(kFALSE), + fRunQA(kTRUE), fRunHLT("default") { // create simulation object with default parameters @@ -215,6 +216,7 @@ AliSimulation::AliSimulation(const AliSimulation& sim) : fRemoteCDBUri(sim.fRemoteCDBUri), fSpecCDBUri(), fEmbeddingFlag(sim.fEmbeddingFlag), + fRunQA(kTRUE), fRunHLT(sim.fRunHLT) { // copy constructor @@ -536,9 +538,10 @@ Bool_t AliSimulation::Run(Int_t nEvents) } //QA - if (!RunQA("ALL", AliQA::kHITS)) - if (fStopOnError) - return kFALSE ; + if (fRunQA) + if (!RunQA("ALL", AliQA::kHITS)) + if (fStopOnError) + return kFALSE ; // Set run number in CDBManager (if it is not already set in RunSimulation) if (!SetRunNumber()) if (fStopOnError) return kFALSE; @@ -556,7 +559,8 @@ Bool_t AliSimulation::Run(Int_t nEvents) if (!fMakeSDigits.IsNull()) { if (!RunSDigitization(fMakeSDigits)) if (fStopOnError) return kFALSE; //QA - RunQA(fMakeSDigits, AliQA::kSDIGITS) ; + if (fRunQA) + RunQA(fMakeSDigits, AliQA::kSDIGITS) ; } @@ -566,9 +570,10 @@ Bool_t AliSimulation::Run(Int_t nEvents) if (fStopOnError) return kFALSE; } //QA - if (!RunQA(fMakeDigits, AliQA::kDIGITS) ) - if (fStopOnError) - return kFALSE ; + if (fRunQA) + if (!RunQA(fMakeDigits, AliQA::kDIGITS) ) + if (fStopOnError) + return kFALSE ; } // hits -> digits @@ -583,9 +588,10 @@ Bool_t AliSimulation::Run(Int_t nEvents) if (fStopOnError) return kFALSE; } //QA - if( !RunQA(fMakeDigitsFromHits, AliQA::kDIGITS) ) - if (fStopOnError) - return kFALSE ; + if (fRunQA) + if( !RunQA(fMakeDigitsFromHits, AliQA::kDIGITS) ) + if (fStopOnError) + return kFALSE ; } diff --git a/STEER/AliSimulation.h b/STEER/AliSimulation.h index 2dac2a7132a..8c00629fa9e 100644 --- a/STEER/AliSimulation.h +++ b/STEER/AliSimulation.h @@ -104,7 +104,8 @@ public: const Int_t GetQACycles(const char * detector) { return fQACycles[GetDetIndex(detector)] ; } void SetQACycles(const char * detector, const Int_t cycles) { fQACycles[GetDetIndex(detector)] = cycles ; } Bool_t RunQA(const char* detectors, AliQA::TASKINDEX task) ; - + void SetQA(const Bool_t val) { fRunQA = val ; } + private: AliRunLoader* LoadRun(const char* mode = "UPDATE") const; Int_t GetNSignalPerBkgrd(Int_t nEvents = 0) const; @@ -144,11 +145,12 @@ private: static const Int_t fgkNDetectors = 15 ; // number of detectors static const char * fgkDetectorName[fgkNDetectors] ; // names of detectors Int_t fQACycles[fgkNDetectors] ; // cycle length (# events) over which QA data are accumulated + Bool_t fRunQA ; // Runs the QA at the end of simulation //HLT TString fRunHLT; // HLT options, HLT is disabled if empty, default='default' - ClassDef(AliSimulation, 6) // class for running generation, simulation and digitization + ClassDef(AliSimulation, 7) // class for running generation, simulation and digitization }; #endif -- 2.31.1