From 49466ea2556a43ac2787a5d55ae6b54bf9554f98 Mon Sep 17 00:00:00 2001 From: schutz Date: Wed, 17 Jun 2009 09:30:31 +0000 Subject: [PATCH] parametrized the number of allowed QA histograms --- STEER/AliQADataMaker.cxx | 17 +++++---- STEER/AliQADataMakerRec.cxx | 8 ++-- STEER/AliQADataMakerSim.cxx | 6 +-- STEER/AliQAv1.cxx | 59 ++++++++++++++-------------- STEER/AliQAv1.h | 76 +++++++++++++++++++------------------ 5 files changed, 85 insertions(+), 81 deletions(-) diff --git a/STEER/AliQADataMaker.cxx b/STEER/AliQADataMaker.cxx index 1250f2c9ff5..3d4cfd9e0c8 100644 --- a/STEER/AliQADataMaker.cxx +++ b/STEER/AliQADataMaker.cxx @@ -130,8 +130,8 @@ Int_t AliQADataMaker::Add2List(TH1 * hist, const Int_t index, TObjArray ** list, TString className(classType->GetName()) ; if( ! className.BeginsWith("T") && ! classType->InheritsFrom("TH1") ) { AliError(Form("QA data Object must be a generic ROOT object and derive fom TH1 and not %s", className.Data())) ; - } else if ( index > 10000 ) { - AliError("Max number of authorized QA objects is 10000") ; + } else if ( index > AliQAv1::GetMaxQAObj() ) { + AliError(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ; } else { hist->SetDirectory(0) ; if (expert) @@ -191,7 +191,7 @@ void AliQADataMaker::Finish() const //____________________________________________________________________________ TObject * AliQADataMaker::GetData(TObjArray ** list, const Int_t index) { - // Returns the QA object at index. Limit is 100. + // Returns the QA object at index. Limit is AliQAv1::GetMaxQAObj() if ( ! list ) { AliError("Data list is NULL !!") ; return NULL ; @@ -200,12 +200,13 @@ TObject * AliQADataMaker::GetData(TObjArray ** list, const Int_t index) SetEventSpecie(fEventSpecie) ; Int_t esindex = AliRecoParam::AConvert(fEventSpecie) ; TH1 * histClone = NULL ; - if (list[esindex]) { - if ( index > 10000 ) { - AliError("Max number of authorized QA objects is 10000") ; + TObjArray * arr = list[esindex] ; + if (arr) { + if ( index > AliQAv1::GetMaxQAObj() ) { + AliError(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ; } else { - if ( list[esindex]->At(index) ) { - histClone = static_cast(list[esindex]->At(index)) ; + if ( arr->At(index) ) { + histClone = static_cast(arr->At(index)) ; } } } diff --git a/STEER/AliQADataMakerRec.cxx b/STEER/AliQADataMakerRec.cxx index 4b50678802b..3f5bbb0355c 100644 --- a/STEER/AliQADataMakerRec.cxx +++ b/STEER/AliQADataMakerRec.cxx @@ -295,7 +295,7 @@ TObjArray ** AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if (! fRawsQAList ) { fRawsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fRawsQAList[specie] = new TObjArray(1) ; + fRawsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fRawsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } @@ -304,7 +304,7 @@ TObjArray ** AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fDigitsQAList ) { fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fDigitsQAList[specie] = new TObjArray(1) ; + fDigitsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } @@ -313,7 +313,7 @@ TObjArray ** AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fRecPointsQAList ) { fRecPointsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fRecPointsQAList[specie] = new TObjArray(1) ; + fRecPointsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fRecPointsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } @@ -322,7 +322,7 @@ TObjArray ** AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fESDsQAList ) { fESDsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fESDsQAList[specie] = new TObjArray(1) ; + fESDsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fESDsQAList[specie]->SetName(Form("%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } diff --git a/STEER/AliQADataMakerSim.cxx b/STEER/AliQADataMakerSim.cxx index c9fbe496757..f7ffa1adc58 100644 --- a/STEER/AliQADataMakerSim.cxx +++ b/STEER/AliQADataMakerSim.cxx @@ -251,7 +251,7 @@ TObjArray ** AliQADataMakerSim::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fHitsQAList ) { fHitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fHitsQAList[specie] = new TObjArray(1) ; + fHitsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fHitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } @@ -260,7 +260,7 @@ TObjArray ** AliQADataMakerSim::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fSDigitsQAList ) { fSDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fSDigitsQAList[specie] = new TObjArray(1) ; + fSDigitsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fSDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } @@ -269,7 +269,7 @@ TObjArray ** AliQADataMakerSim::Init(AliQAv1::TASKINDEX_t task, Int_t cycles) if ( ! fDigitsQAList ) { fDigitsQAList = new TObjArray *[AliRecoParam::kNSpecies] ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - fDigitsQAList[specie] = new TObjArray(1) ; + fDigitsQAList[specie] = new TObjArray(AliQAv1::GetMaxQAObj()) ; fDigitsQAList[specie]->SetName(Form("%s_%s_%s", GetName(), AliQAv1::GetTaskName(task).Data(), AliRecoParam::GetEventSpecieName(specie))) ; } } diff --git a/STEER/AliQAv1.cxx b/STEER/AliQAv1.cxx index 07a3e3cc8a5..7ac6f47f651 100644 --- a/STEER/AliQAv1.cxx +++ b/STEER/AliQAv1.cxx @@ -47,35 +47,36 @@ ClassImp(AliQAv1) -AliQAv1 * AliQAv1::fgQA = 0x0 ; -TFile * AliQAv1::fgQADataFile = 0x0 ; -TString AliQAv1::fgQADataFileName = "QA" ; // will transform into Det.QA.run.root -TFile * AliQAv1::fgQARefFile = 0x0 ; -TString AliQAv1::fgQARefDirName = "" ; -TString AliQAv1::fgQARefFileName = "QA.root" ; -TFile * AliQAv1::fgQAResultFile = 0x0 ; -TString AliQAv1::fgQAResultDirName = "" ; -TString AliQAv1::fgQAResultFileName = "QA.root" ; -TString AliQAv1::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD", - "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global", "CORR"} ; -TString AliQAv1::fgGRPPath = "GRP/GRP/Data" ; -TString AliQAv1::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "DigitsR", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ; -const TString AliQAv1::fgkLabLocalFile = "file://" ; -const TString AliQAv1::fgkLabLocalOCDB = "local://" ; -const TString AliQAv1::fgkLabAliEnOCDB = "alien://" ; -const TString AliQAv1::fgkRefFileName = "QA.root" ; -const TString AliQAv1::fgkQAName = "QA" ; -const TString AliQAv1::fgkQACorrNtName = "CorrQA" ; -const TString AliQAv1::fgkRefOCDBDirName = "QA" ; -TString AliQAv1::fgRefDataDirName = "" ; -const TString AliQAv1::fgkQARefOCDBDefault = "alien://folder=/alice/QA/20" ; -const TString AliQAv1::fgkExpert = "Expert" ; -const UInt_t AliQAv1::fgkExpertBit = 0x40000 ; -const UInt_t AliQAv1::fgkQABit = 0x80000 ; -const UInt_t AliQAv1::fgkImageBit = 0x100000 ; -const Int_t AliQAv1::fgkQADebugLevel = 99 ; -const TString AliQAv1::fImageFileName = "QAImage" ; -const TString AliQAv1::fImageFileFormat = "eps" ; +AliQAv1 * AliQAv1::fgQA = 0x0 ; +TFile * AliQAv1::fgQADataFile = 0x0 ; +TString AliQAv1::fgQADataFileName = "QA" ; // will transform into Det.QA.run.root +TFile * AliQAv1::fgQARefFile = 0x0 ; +TString AliQAv1::fgQARefDirName = "" ; +TString AliQAv1::fgQARefFileName = "QA.root" ; +TFile * AliQAv1::fgQAResultFile = 0x0 ; +TString AliQAv1::fgQAResultDirName = "" ; +TString AliQAv1::fgQAResultFileName = "QA.root" ; +TString AliQAv1::fgDetNames[] = {"ITS", "TPC", "TRD", "TOF", "PHOS", "HMPID", "EMCAL", "MUON", "FMD", + "ZDC", "PMD", "T0", "VZERO", "ACORDE", "HLT", "Global", "CORR"} ; +TString AliQAv1::fgGRPPath = "GRP/GRP/Data" ; +TString AliQAv1::fgTaskNames[] = {"Raws", "Hits", "SDigits", "Digits", "DigitsR", "RecPoints", "TrackSegments", "RecParticles", "ESDs"} ; +const TString AliQAv1::fgkLabLocalFile = "file://" ; +const TString AliQAv1::fgkLabLocalOCDB = "local://" ; +const TString AliQAv1::fgkLabAliEnOCDB = "alien://" ; +const TString AliQAv1::fgkRefFileName = "QA.root" ; +const TString AliQAv1::fgkQAName = "QA" ; +const TString AliQAv1::fgkQACorrNtName = "CorrQA" ; +const TString AliQAv1::fgkRefOCDBDirName = "QA" ; +TString AliQAv1::fgRefDataDirName = "" ; +const TString AliQAv1::fgkQARefOCDBDefault = "alien://folder=/alice/QA/20" ; +const TString AliQAv1::fgkExpert = "Expert" ; +const UInt_t AliQAv1::fgkExpertBit = 0x40000 ; +const UInt_t AliQAv1::fgkQABit = 0x80000 ; +const UInt_t AliQAv1::fgkImageBit = 0x100000 ; +const Int_t AliQAv1::fgkQADebugLevel = 99 ; +const TString AliQAv1::fImageFileName = "QAImage" ; +const TString AliQAv1::fImageFileFormat = "eps" ; +const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ; //____________________________________________________________________________ AliQAv1::AliQAv1() : diff --git a/STEER/AliQAv1.h b/STEER/AliQAv1.h index 08afbbcc840..fb0bb1767fa 100644 --- a/STEER/AliQAv1.h +++ b/STEER/AliQAv1.h @@ -69,6 +69,7 @@ public: static Int_t GetQADebugLevel() { return fgkQADebugLevel ; } static const char * GetQAName() { return fgkQAName ; } static const char * GetQACorrName() { return fgkQACorrNtName ; } + static UShort_t GetMaxQAObj() { return fgkMaxQAObjects ; } static TFile * GetQAResultFile() ; static const char * GetQAResultFileName() { return (fgQAResultDirName + fgQAResultFileName).Data() ; } static const char * GetQARefDefaultStorage() { return fgkQARefOCDBDefault.Data() ; } @@ -119,43 +120,44 @@ private: void SetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ; void UnSetStatusBit(DETECTORINDEX_t det, ALITASK_t tsk, AliRecoParam::EventSpecie_t es, QABIT_t bit) ; - static AliQAv1 * fgQA ; // pointer to the instance of the singleton - Int_t fNdet ; // number of detectors - Int_t fNEventSpecies ; // number of Event Species (see AliRecoParam) - Int_t fLengthQA ; // Auxiliary length of fQA - ULong_t * fQA ; //[fLengthQA] the status word 4 bits for SIM, REC, ESD, ANA each - DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....) - ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA) - AliRecoParam::EventSpecie_t fEventSpecie ; //! the current event specie - static TString fgDetNames[] ; //! list of detector names - static TString fgGRPPath ; //! path of the GRP object in OCDB - static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results - static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results - static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results - static TString fgQARefDirName ; //! name of directory where to find the reference data file - static TString fgQARefFileName ; //! file name where to find the reference data - static TFile * fgQAResultFile ; //! File where to find the QA result - static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored - static TString fgQAResultFileName ; //! the output file where the QA results are stored - static TString fgRTNames[] ; //! list of Run Type names - static TString fgTaskNames[] ; //! list of tasks names - static const TString fgkExpert ; //! name for the expert directory - static const UInt_t fgkExpertBit ; //! TObject bit identifing the object as "expert" - static const UInt_t fgkImageBit ; //! TObject bit identifing the object to be plotted on the QA image - static const TString fgkLabLocalFile ; //! label to identify a file as local - static const TString fgkLabLocalOCDB ; //! label to identify a file as local OCDB - static const TString fgkLabAliEnOCDB ; //! label to identify a file as AliEn OCDB - static const TString fgkRefFileName ; //! name of Reference File Name - static const UInt_t fgkQABit ; //! bit in the QA data object which is set when Checker does not return 0 - static const Int_t fgkQADebugLevel ; //! debug level used for QA verbosity - static const TString fgkQAName ; //! name of QA object - static const TString fgkQACorrNtName ; //! name of QA Correlation Ntuple - static const TString fgkRefOCDBDirName ; //! name of Reference directory name in OCDB - static TString fgRefDataDirName ; //! name of Reference directory name in OCDB for data - static const TString fgkQARefOCDBDefault ; //! default storage for QA in OCDB - Bool_t * fEventSpecies ; //[fNEventSpecies] list of event species encountered in a run - static const TString fImageFileName ; //! name of the file that contains all the QA images - static const TString fImageFileFormat ; //! format of the file that contains all the QA images + static AliQAv1 * fgQA ; // pointer to the instance of the singleton + Int_t fNdet ; // number of detectors + Int_t fNEventSpecies ; // number of Event Species (see AliRecoParam) + Int_t fLengthQA ; // Auxiliary length of fQA + ULong_t * fQA ; //[fLengthQA] the status word 4 bits for SIM, REC, ESD, ANA each + DETECTORINDEX_t fDet ; //! the current detector (ITS, TPC, ....) + ALITASK_t fTask ; //! the current environment (SIM, REC, ESD, ANA) + AliRecoParam::EventSpecie_t fEventSpecie ; //! the current event specie + static TString fgDetNames[] ; //! list of detector names + static TString fgGRPPath ; //! path of the GRP object in OCDB + static TFile * fgQADataFile ; //! the output file where the quality assurance maker store their results + static TString fgQADataFileName ; //! the name of the file where the quality assurance maker store their results + static TFile * fgQARefFile ; //! the output file where the quality assurance maker store their results + static TString fgQARefDirName ; //! name of directory where to find the reference data file + static TString fgQARefFileName ; //! file name where to find the reference data + static TFile * fgQAResultFile ; //! File where to find the QA result + static TString fgQAResultDirName ; //! the location of the output file where the QA results are stored + static TString fgQAResultFileName ; //! the output file where the QA results are stored + static TString fgRTNames[] ; //! list of Run Type names + static TString fgTaskNames[] ; //! list of tasks names + static const TString fgkExpert ; //! name for the expert directory + static const UInt_t fgkExpertBit ; //! TObject bit identifing the object as "expert" + static const UInt_t fgkImageBit ; //! TObject bit identifing the object to be plotted on the QA image + static const TString fgkLabLocalFile ; //! label to identify a file as local + static const TString fgkLabLocalOCDB ; //! label to identify a file as local OCDB + static const TString fgkLabAliEnOCDB ; //! label to identify a file as AliEn OCDB + static const TString fgkRefFileName ; //! name of Reference File Name + static const UInt_t fgkQABit ; //! bit in the QA data object which is set when Checker does not return 0 + static const Int_t fgkQADebugLevel ; //! debug level used for QA verbosity + static const TString fgkQAName ; //! name of QA object + static const TString fgkQACorrNtName ; //! name of QA Correlation Ntuple + static const TString fgkRefOCDBDirName ; //! name of Reference directory name in OCDB + static TString fgRefDataDirName ; //! name of Reference directory name in OCDB for data + static const TString fgkQARefOCDBDefault ; //! default storage for QA in OCDB + Bool_t * fEventSpecies ; //[fNEventSpecies] list of event species encountered in a run + static const TString fImageFileName ; //! name of the file that contains all the QA images + static const TString fImageFileFormat ; //! format of the file that contains all the QA images + static const UShort_t fgkMaxQAObjects ;//! maximum number of QA objects allowed dor each task (Raws, digits,....) ClassDef(AliQAv1,3) //ALICE Quality Assurance Object }; -- 2.43.0