From 6252ceeb59406d4f518422dfad532f414e0a23c4 Mon Sep 17 00:00:00 2001 From: hristov Date: Thu, 25 Jun 2009 10:36:07 +0000 Subject: [PATCH] Transfer of the initialisation of the QA Data objects in the framework; clean the use of TClonesArray ; setting of the eventspecie on request by detectors. Yves --- ACORDE/AliACORDEQADataMakerRec.cxx | 24 ++--- ACORDE/AliACORDEQADataMakerRec.h | 2 +- ACORDE/AliACORDEQADataMakerSim.cxx | 33 +++---- ACORDE/AliACORDEQADataMakerSim.h | 4 +- EMCAL/AliEMCALQADataMakerRec.cxx | 32 ++----- EMCAL/AliEMCALQADataMakerRec.h | 2 +- EMCAL/AliEMCALQADataMakerSim.cxx | 77 +++++++-------- EMCAL/AliEMCALQADataMakerSim.h | 6 +- FMD/AliFMDQADataMakerRec.cxx | 48 ++++------ FMD/AliFMDQADataMakerRec.h | 3 +- FMD/AliFMDQADataMakerSim.cxx | 81 +++++++--------- FMD/AliFMDQADataMakerSim.h | 9 +- HMPID/AliHMPIDQADataMakerRec.cxx | 95 +++++++------------ HMPID/AliHMPIDQADataMakerRec.h | 7 +- HMPID/AliHMPIDQADataMakerSim.cxx | 146 ++++++++++++----------------- HMPID/AliHMPIDQADataMakerSim.h | 10 +- ITS/AliITSQADataMakerRec.h | 2 +- ITS/AliITSQADataMakerSim.cxx | 26 ++--- ITS/AliITSQADataMakerSim.h | 6 +- ITS/AliITSQASDDDataMakerRec.h | 2 +- ITS/AliITSQASDDDataMakerSim.cxx | 19 ++-- ITS/AliITSQASDDDataMakerSim.h | 6 +- ITS/AliITSQASPDDataMakerRec.cxx | 9 -- ITS/AliITSQASPDDataMakerRec.h | 2 +- ITS/AliITSQASPDDataMakerSim.cxx | 20 ++-- ITS/AliITSQASPDDataMakerSim.h | 6 +- ITS/AliITSQASSDDataMakerRec.cxx | 13 +-- ITS/AliITSQASSDDataMakerRec.h | 2 +- ITS/AliITSQASSDDataMakerSim.cxx | 11 +-- ITS/AliITSQASSDDataMakerSim.h | 6 +- MUON/AliMUONQADataMakerRec.cxx | 17 +--- MUON/AliMUONQADataMakerRec.h | 2 +- MUON/AliMUONQADataMakerSim.cxx | 12 --- MUON/AliMUONQADataMakerSim.h | 6 +- PHOS/AliPHOSQADataMakerRec.cxx | 58 +++++------- PHOS/AliPHOSQADataMakerRec.h | 2 +- PHOS/AliPHOSQADataMakerSim.cxx | 77 +++++++-------- PHOS/AliPHOSQADataMakerSim.h | 10 +- PMD/AliPMDQADataMakerRec.cxx | 45 +++------ PMD/AliPMDQADataMakerRec.h | 2 +- PMD/AliPMDQADataMakerSim.cxx | 91 +++++++----------- PMD/AliPMDQADataMakerSim.h | 6 +- STEER/AliQACheckerBase.cxx | 6 +- STEER/AliQADataMaker.cxx | 43 ++++++++- STEER/AliQADataMaker.h | 15 +-- STEER/AliQADataMakerRec.cxx | 14 ++- STEER/AliQADataMakerRec.h | 15 +-- STEER/AliQADataMakerSim.cxx | 28 ++++-- STEER/AliQADataMakerSim.h | 13 ++- STEER/AliQAManager.cxx | 2 +- STEER/AliQAv1.cxx | 2 +- STEER/AliQAv1.h | 2 +- STEER/AliReconstruction.cxx | 1 + T0/AliT0QADataMakerRec.cxx | 20 +--- T0/AliT0QADataMakerRec.h | 2 +- T0/AliT0QADataMakerSim.cxx | 19 ++-- T0/AliT0QADataMakerSim.h | 4 +- TOF/AliTOFQADataMakerRec.cxx | 31 ++---- TOF/AliTOFQADataMakerRec.h | 2 +- TOF/AliTOFQADataMakerSim.cxx | 73 ++++++--------- TOF/AliTOFQADataMakerSim.h | 6 +- TPC/AliTPCQADataMakerRec.cxx | 23 ++--- TPC/AliTPCQADataMakerRec.h | 2 +- TPC/AliTPCQADataMakerSim.cxx | 7 -- TPC/AliTPCQADataMakerSim.h | 6 +- TRD/AliTRDQADataMakerRec.cxx | 24 ++--- TRD/AliTRDQADataMakerSim.cxx | 71 +++++++------- TRD/AliTRDQADataMakerSim.h | 9 +- VZERO/AliVZEROQADataMakerRec.cxx | 25 ++--- VZERO/AliVZEROQADataMakerRec.h | 4 +- VZERO/AliVZEROQADataMakerSim.cxx | 44 +++++---- VZERO/AliVZEROQADataMakerSim.h | 4 +- ZDC/AliZDCQADataMakerRec.h | 2 +- ZDC/AliZDCQADataMakerSim.cxx | 16 ++-- ZDC/AliZDCQADataMakerSim.h | 7 +- test/ppbench/sim.C | 2 +- 76 files changed, 659 insertions(+), 922 deletions(-) diff --git a/ACORDE/AliACORDEQADataMakerRec.cxx b/ACORDE/AliACORDEQADataMakerRec.cxx index b73d8e4a4a1..c7d2d392d76 100755 --- a/ACORDE/AliACORDEQADataMakerRec.cxx +++ b/ACORDE/AliACORDEQADataMakerRec.cxx @@ -146,10 +146,6 @@ void AliACORDEQADataMakerRec::MakeRaws(AliRawReader* rawReader) { //fills QA histos for RAW - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; - rawReader->Reset(); AliACORDERawStream rawStream(rawReader); size_t contSingle=0; @@ -213,21 +209,19 @@ if(rawStream.Next()) void AliACORDEQADataMakerRec::MakeDigits( TTree *digitsTree) { //fills QA histos for Digits - TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000); + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliACORDEdigit",1000); TBranch * branch = digitsTree->GetBranch("ACORDEdigit"); if (!branch) { AliWarning("ACORDE branch in Digits Tree not found"); } else { - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - branch->SetAddress(&digits); + branch->SetAddress(&fDigitsArray); for(Int_t track = 0 ; track < branch->GetEntries() ; track++) { branch->GetEntry(track); - for(Int_t idigit = 0 ; idigit < digits->GetEntriesFast() ; idigit++) { - AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit); + for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) { + AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit); if (!AcoDigit) { AliError("The unchecked digit doesn't exist"); continue ; @@ -243,10 +237,6 @@ void AliACORDEQADataMakerRec::MakeESDs(AliESDEvent * esd) { //fills QA histos for ESD - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; - AliESDACORDE * fESDACORDE= esd->GetACORDEData(); Int_t *fACORDEMultiMuon =fESDACORDE->GetACORDEMultiMuon(); Int_t *fACORDESingleMuon=fESDACORDE->GetACORDESingleMuon(); diff --git a/ACORDE/AliACORDEQADataMakerRec.h b/ACORDE/AliACORDEQADataMakerRec.h index 91826db0632..40673b0fcc0 100755 --- a/ACORDE/AliACORDEQADataMakerRec.h +++ b/ACORDE/AliACORDEQADataMakerRec.h @@ -40,7 +40,7 @@ private: virtual void InitRaws() ; //book Digit QA histo virtual void InitDigits() ; //book Digit QA histo virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo - virtual void MakeDigits(TClonesArray *) {} //Dummy for the moment + virtual void MakeDigits() {} //Dummy for the moment virtual void InitRecPoints(); //book cluster QA histo virtual void InitESDs() ; //book ESD QA histo virtual void MakeRaws(AliRawReader* rawReader) ; diff --git a/ACORDE/AliACORDEQADataMakerSim.cxx b/ACORDE/AliACORDEQADataMakerSim.cxx index d73a80daa6c..eb48840beb2 100755 --- a/ACORDE/AliACORDEQADataMakerSim.cxx +++ b/ACORDE/AliACORDEQADataMakerSim.cxx @@ -115,21 +115,19 @@ void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree) { // Here we fill the QA histos for Hits declared above - TClonesArray * hits = new TClonesArray("AliACORDEhit",1000); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliACORDEhit",1000); TBranch * branch = hitTree->GetBranch("ACORDE"); if (!branch) { AliWarning("ACORDE branch in Hit Tree not found"); } else { - - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - - branch->SetAddress(&hits); + branch->SetAddress(&fHitsArray); for(Int_t track = 0 ; track < branch->GetEntries() ; track++) { branch->GetEntry(track); - for(Int_t ihit=0 ; ihit < hits->GetEntriesFast() ; ihit++) { - AliACORDEhit *AcoHit = (AliACORDEhit*) hits->UncheckedAt(ihit); + for(Int_t ihit=0 ; ihit < fHitsArray->GetEntriesFast() ; ihit++) { + AliACORDEhit *AcoHit = (AliACORDEhit*) fHitsArray->UncheckedAt(ihit); if(!AcoHit) { AliError("The unchecked hit doesn't exist"); continue ; @@ -143,21 +141,20 @@ void AliACORDEQADataMakerSim::MakeHits(TTree *hitTree) void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree) { //fills QA histos for Digits - TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000); + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliACORDEdigit",1000); + TBranch * branch = digitsTree->GetBranch("ACORDEdigit"); if (!branch) { AliWarning("ACORDE branch in Digits Tree not found"); } else { - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - branch->SetAddress(&digits); + branch->SetAddress(&fDigitsArray); for(Int_t track = 0 ; track < branch->GetEntries() ; track++) { branch->GetEntry(track); - for(Int_t idigit = 0 ; idigit < digits->GetEntriesFast() ; idigit++) { - AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit); + for(Int_t idigit = 0 ; idigit < fDigitsArray->GetEntriesFast() ; idigit++) { + AliACORDEdigit *AcoDigit = (AliACORDEdigit*) fDigitsArray->UncheckedAt(idigit); if (!AcoDigit) { AliError("The unchecked digit doesn't exist"); continue ; diff --git a/ACORDE/AliACORDEQADataMakerSim.h b/ACORDE/AliACORDEQADataMakerSim.h index 96483f623fa..48a47da7720 100755 --- a/ACORDE/AliACORDEQADataMakerSim.h +++ b/ACORDE/AliACORDEQADataMakerSim.h @@ -40,9 +40,9 @@ private: virtual void InitHits() ; //book hit QA histo virtual void InitDigits() ; //book Digit QA histo virtual void MakeHits(TTree * hits) ; //Fill hit QA histo - virtual void MakeHits(TClonesArray *) {} //Dummy for the moment + virtual void MakeHits() {} //Dummy for the moment virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo - virtual void MakeDigits(TClonesArray *) {} //Dummy for the moment + virtual void MakeDigits() {} //Dummy for the moment virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; virtual void StartOfDetectorCycle() ; ClassDef(AliACORDEQADataMakerSim,1) // description diff --git a/EMCAL/AliEMCALQADataMakerRec.cxx b/EMCAL/AliEMCALQADataMakerRec.cxx index 62d4b1537c5..c1501e6cf13 100644 --- a/EMCAL/AliEMCALQADataMakerRec.cxx +++ b/EMCAL/AliEMCALQADataMakerRec.cxx @@ -210,11 +210,6 @@ void AliEMCALQADataMakerRec::MakeESDs(AliESDEvent * esd) { // make QA data from ESDs - - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(kESDCaloClusE) ) - InitESDs() ; - Int_t nTot = 0 ; for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) { AliESDCaloCluster * clu = esd->GetCaloCluster(index) ; @@ -252,10 +247,6 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader) // look at max vs min of the signal spextra, a la online usage in // AliCaloCalibPedestal - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(kSigLG) ) - InitRaws() ; - rawReader->Reset() ; AliCaloRawStreamV3 in(rawReader,"EMCAL"); @@ -398,16 +389,12 @@ void AliEMCALQADataMakerRec::MakeRaws(AliRawReader* rawReader) } //____________________________________________________________________________ -void AliEMCALQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliEMCALQADataMakerRec::MakeDigits() { // makes data from Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - GetDigitsData(1)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + GetDigitsData(1)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliEMCALDigit * digit ; while ( (digit = dynamic_cast(next())) ) { GetDigitsData(0)->Fill( digit->GetAmp()) ; @@ -419,15 +406,18 @@ void AliEMCALQADataMakerRec::MakeDigits(TClonesArray * digits) void AliEMCALQADataMakerRec::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliEMCALDigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; TBranch * branch = digitTree->GetBranch("EMCAL") ; if ( ! branch ) { AliWarning("EMCAL branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } @@ -441,10 +431,6 @@ void AliEMCALQADataMakerRec::MakeRecPoints(TTree * clustersTree) AliError("can't get the branch with the EMCAL clusters !"); return; } - - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(kRecPM) ) - InitRecPoints() ; TObjArray * emcrecpoints = new TObjArray(100) ; emcbranch->SetAddress(&emcrecpoints); diff --git a/EMCAL/AliEMCALQADataMakerRec.h b/EMCAL/AliEMCALQADataMakerRec.h index b0c7e4e27ae..2d2d32c53ff 100644 --- a/EMCAL/AliEMCALQADataMakerRec.h +++ b/EMCAL/AliEMCALQADataMakerRec.h @@ -54,7 +54,7 @@ private: virtual void InitRecPoints() ; virtual void InitRaws() ; virtual void MakeESDs(AliESDEvent * esd) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digTree) ; virtual void MakeRecPoints(TTree * recpoTree) ; virtual void MakeRaws(AliRawReader* rawReader) ; diff --git a/EMCAL/AliEMCALQADataMakerSim.cxx b/EMCAL/AliEMCALQADataMakerSim.cxx index 27b96552bdf..318bd2b3469 100644 --- a/EMCAL/AliEMCALQADataMakerSim.cxx +++ b/EMCAL/AliEMCALQADataMakerSim.cxx @@ -121,17 +121,12 @@ void AliEMCALQADataMakerSim::InitSDigits() } //____________________________________________________________________________ -void AliEMCALQADataMakerSim::MakeHits(TClonesArray * hits) +void AliEMCALQADataMakerSim::MakeHits() { //make QA data from Hits - - - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - - GetHitsData(1)->Fill(hits->GetEntriesFast()) ; - TIter next(hits) ; + + GetHitsData(1)->Fill(fHitsArray->GetEntriesFast()) ; + TIter next(fHitsArray) ; AliEMCALHit * hit ; while ( (hit = dynamic_cast(next())) ) { GetHitsData(0)->Fill( hit->GetEnergy()) ; @@ -144,41 +139,31 @@ void AliEMCALQADataMakerSim::MakeHits(TTree * hitTree) { // make QA data from Hit Tree - TClonesArray * hits = new TClonesArray("AliEMCALHit", 1000); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliEMCALHit", 1000); TBranch * branch = hitTree->GetBranch("EMCAL") ; if ( ! branch ) { AliWarning("EMCAL branch in Hit Tree not found") ; } else { - TClonesArray * tmp = new TClonesArray("AliEMCALHit", 1000) ; - branch->SetAddress(&tmp) ; - Int_t index = 0 ; + branch->SetAddress(&fHitsArray) ; for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { branch->GetEntry(ientry) ; - for (Int_t ihit = 0 ; ihit < tmp->GetEntries() ; ihit++) { - AliEMCALHit * hit = dynamic_cast (tmp->At(ihit)) ; - new((*hits)[index]) AliEMCALHit(*hit) ; - index++ ; - } - } - tmp->Delete() ; - delete tmp ; - MakeHits(hits) ; + MakeHits() ; + fHitsArray->Clear() ; + } } } //____________________________________________________________________________ -void AliEMCALQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliEMCALQADataMakerSim::MakeDigits() { // makes data from Digits - - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - GetDigitsData(1)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + + GetDigitsData(1)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliEMCALDigit * digit ; while ( (digit = dynamic_cast(next())) ) { GetDigitsData(0)->Fill( digit->GetAmp()) ; @@ -190,34 +175,33 @@ void AliEMCALQADataMakerSim::MakeDigits(TClonesArray * digits) void AliEMCALQADataMakerSim::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliEMCALDigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; TBranch * branch = digitTree->GetBranch("EMCAL") ; if ( ! branch ) { AliWarning("EMCAL branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } //____________________________________________________________________________ -void AliEMCALQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliEMCALQADataMakerSim::MakeSDigits() { // makes data from SDigits //Need a copy of the SDigitizer to calibrate the sdigit amplitude to //energy in GeV - - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - + AliEMCALSDigitizer* sDigitizer = new AliEMCALSDigitizer(); - GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ; - TIter next(sdigits) ; + GetSDigitsData(1)->Fill(fSDigitsArray->GetEntriesFast()) ; + TIter next(fSDigitsArray) ; AliEMCALDigit * sdigit ; while ( (sdigit = dynamic_cast(next())) ) { GetSDigitsData(0)->Fill( sDigitizer->Calibrate(sdigit->GetAmp())) ; @@ -230,15 +214,18 @@ void AliEMCALQADataMakerSim::MakeSDigits(TClonesArray * sdigits) void AliEMCALQADataMakerSim::MakeSDigits(TTree * sdigitTree) { // makes data from SDigit Tree - TClonesArray * sdigits = new TClonesArray("AliEMCALDigit", 1000) ; + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliEMCALDigit", 1000) ; TBranch * branch = sdigitTree->GetBranch("EMCAL") ; if ( ! branch ) { AliWarning("EMCAL branch in SDigit Tree not found") ; } else { - branch->SetAddress(&sdigits) ; + branch->SetAddress(&fSDigitsArray) ; branch->GetEntry(0) ; - MakeSDigits(sdigits) ; + MakeSDigits() ; } } diff --git a/EMCAL/AliEMCALQADataMakerSim.h b/EMCAL/AliEMCALQADataMakerSim.h index 2fc4f282033..cdb80ccb9e9 100644 --- a/EMCAL/AliEMCALQADataMakerSim.h +++ b/EMCAL/AliEMCALQADataMakerSim.h @@ -35,11 +35,11 @@ private: virtual void InitHits() ; virtual void InitDigits() ; virtual void InitSDigits() ; - virtual void MakeHits(TClonesArray * hits) ; + virtual void MakeHits() ; virtual void MakeHits(TTree * hitTree) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digitTree) ; - virtual void MakeSDigits(TClonesArray * sigits) ; + virtual void MakeSDigits() ; virtual void MakeSDigits(TTree * sigitTree) ; virtual void StartOfDetectorCycle() ; diff --git a/FMD/AliFMDQADataMakerRec.cxx b/FMD/AliFMDQADataMakerRec.cxx index a4bdf41a6b2..75b909f01af 100644 --- a/FMD/AliFMDQADataMakerRec.cxx +++ b/FMD/AliFMDQADataMakerRec.cxx @@ -52,7 +52,6 @@ ClassImp(AliFMDQADataMakerRec) AliFMDQADataMakerRec::AliFMDQADataMakerRec() : AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kFMD), "FMD Quality Assurance Data Maker"), - fDigitsArray("AliFMDDigit", 0), fRecPointsArray("AliFMDRecPoint", 1000) { // ctor @@ -63,7 +62,6 @@ AliFMDQADataMakerRec::AliFMDQADataMakerRec() : AliFMDQADataMakerRec::AliFMDQADataMakerRec(const AliFMDQADataMakerRec& qadm) : AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kFMD), "FMD Quality Assurance Data Maker"), - fDigitsArray(qadm.fDigitsArray), fRecPointsArray(qadm.fRecPointsArray) { // copy ctor @@ -74,7 +72,6 @@ AliFMDQADataMakerRec::AliFMDQADataMakerRec(const AliFMDQADataMakerRec& qadm) //_____________________________________________________________________ AliFMDQADataMakerRec& AliFMDQADataMakerRec::operator = (const AliFMDQADataMakerRec& qadm ) { - fDigitsArray = qadm.fDigitsArray; fRecPointsArray = qadm.fRecPointsArray; return *this; @@ -191,10 +188,6 @@ void AliFMDQADataMakerRec::MakeESDs(AliESDEvent * esd) AliESDFMD* fmd = esd->GetFMDData(); if (!fmd) return; - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; - for(UShort_t det=1;det<=3;det++) { for (UShort_t ir = 0; ir < 2; ir++) { Char_t ring = (ir == 0 ? 'I' : 'O'); @@ -214,21 +207,17 @@ void AliFMDQADataMakerRec::MakeESDs(AliESDEvent * esd) //_____________________________________________________________________ -void AliFMDQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliFMDQADataMakerRec::MakeDigits() { // makes data from Digits - if(!digits) { + if(!fDigitsArray) { AliError("FMD Digit object not found!!") ; return; } - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - for(Int_t i=0;iGetEntriesFast();i++) { + for(Int_t i=0;iGetEntriesFast();i++) { //Raw ADC counts - AliFMDDigit* digit = static_cast(digits->At(i)); + AliFMDDigit* digit = static_cast(fDigitsArray->At(i)); GetDigitsData(0)->Fill(digit->Counts()); } } @@ -237,28 +226,33 @@ void AliFMDQADataMakerRec::MakeDigits(TClonesArray * digits) void AliFMDQADataMakerRec::MakeDigits(TTree * digitTree) { - fDigitsArray.Clear(); + if (fDigitsArray) + fDigitsArray->Clear(); + else + fDigitsArray = new TClonesArray("AliFMDDigit", 1000); + TBranch* branch = digitTree->GetBranch("FMD"); if (!branch) { AliWarning("FMD branch in Digit Tree not found") ; return; } - TClonesArray* digitsAddress = &fDigitsArray; - branch->SetAddress(&digitsAddress); + branch->SetAddress(&fDigitsArray); branch->GetEntry(0); - MakeDigits(digitsAddress); + MakeDigits(); } //_____________________________________________________________________ void AliFMDQADataMakerRec::MakeRaws(AliRawReader* rawReader) { - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; + AliFMDRawReader fmdReader(rawReader,0); + + if (fDigitsArray) + fDigitsArray->Clear(); + else + fDigitsArray = new TClonesArray("AliFMDDigit", 1000); - AliFMDRawReader fmdReader(rawReader,0); - TClonesArray* digitsAddress = &fDigitsArray; + TClonesArray* digitsAddress = fDigitsArray; rawReader->Reset(); @@ -287,11 +281,7 @@ void AliFMDQADataMakerRec::MakeRecPoints(TTree* clustersTree) { // makes data from RecPoints - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; - - AliFMDParameters* pars = AliFMDParameters::Instance(); + AliFMDParameters* pars = AliFMDParameters::Instance(); fRecPointsArray.Clear(); TBranch *fmdbranch = clustersTree->GetBranch("FMD"); if (!fmdbranch) { diff --git a/FMD/AliFMDQADataMakerRec.h b/FMD/AliFMDQADataMakerRec.h index 7dbef41391f..b1461b8d530 100644 --- a/FMD/AliFMDQADataMakerRec.h +++ b/FMD/AliFMDQADataMakerRec.h @@ -32,14 +32,13 @@ private: virtual void InitRecPoints(); virtual void InitRaws(); virtual void MakeESDs(AliESDEvent * esd); - virtual void MakeDigits(TClonesArray * digits); + virtual void MakeDigits(); virtual void MakeDigits(TTree * digitTree); virtual void MakeRecPoints(TTree * recpoTree); virtual void MakeRaws(AliRawReader* rawReader); virtual void StartOfDetectorCycle(); Int_t GetHalfringIndex(UShort_t det, Char_t ring, UShort_t board, UShort_t monitor = 0); ClassDef(AliFMDQADataMakerRec,0) // description - TClonesArray fDigitsArray; TClonesArray fRecPointsArray; }; diff --git a/FMD/AliFMDQADataMakerSim.cxx b/FMD/AliFMDQADataMakerSim.cxx index 9a173631d66..4778f367c3e 100644 --- a/FMD/AliFMDQADataMakerSim.cxx +++ b/FMD/AliFMDQADataMakerSim.cxx @@ -47,10 +47,7 @@ ClassImp(AliFMDQADataMakerSim) //_____________________________________________________________________ AliFMDQADataMakerSim::AliFMDQADataMakerSim() : AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kFMD), - "FMD Quality Assurance Data Maker"), - fSDigitsArray("AliFMDSDigit", 1000), - fDigitsArray("AliFMDDigit", 1000), - fHitsArray("AliFMDHit", 10) + "FMD Quality Assurance Data Maker") { // ctor @@ -58,10 +55,7 @@ AliFMDQADataMakerSim::AliFMDQADataMakerSim() //_____________________________________________________________________ AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& qadm) - : AliQADataMakerSim(), - fSDigitsArray(qadm.fSDigitsArray), - fDigitsArray(qadm.fDigitsArray), - fHitsArray(qadm.fHitsArray) + : AliQADataMakerSim() { //copy ctor @@ -70,11 +64,8 @@ AliFMDQADataMakerSim::AliFMDQADataMakerSim(const AliFMDQADataMakerSim& qadm) } //_____________________________________________________________________ -AliFMDQADataMakerSim& AliFMDQADataMakerSim::operator = (const AliFMDQADataMakerSim& qadm ) +AliFMDQADataMakerSim& AliFMDQADataMakerSim::operator = (const AliFMDQADataMakerSim& ) { - fSDigitsArray = qadm.fSDigitsArray; - fDigitsArray = qadm.fDigitsArray; - fHitsArray = qadm.fHitsArray; return *this; } @@ -135,13 +126,13 @@ void AliFMDQADataMakerSim::InitDigits() } //_____________________________________________________________________ -void AliFMDQADataMakerSim::MakeHits(TClonesArray * hits) +void AliFMDQADataMakerSim::MakeHits() { // Check id histograms already created for this Event Specie if ( ! GetHitsData(0) ) InitHits() ; - TIter next(hits); + TIter next(fHitsArray); AliFMDHit * hit; while ((hit = static_cast(next()))) GetHitsData(0)->Fill(hit->Edep()/hit->Length()*0.032); @@ -152,38 +143,35 @@ void AliFMDQADataMakerSim::MakeHits(TTree * hitTree) { // make QA data from Hit Tree - fHitsArray.Clear(); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliFMDHit", 1000) ; TBranch * branch = hitTree->GetBranch("FMD") ; if (!branch) { AliWarning("FMD branch in Hit Tree not found") ; return; } - - TClonesArray* hitsAddress = &fHitsArray; - - branch->SetAddress(&hitsAddress) ; + + branch->SetAddress(&fHitsArray) ; for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { branch->GetEntry(ientry); - MakeHits(hitsAddress); //tmp); + MakeHits(); //tmp); + fHitsArray->Clear() ; } - } //_____________________________________________________________________ -void AliFMDQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliFMDQADataMakerSim::MakeDigits() { // makes data from Digits - if(!digits) return; - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - for(Int_t i = 0 ; i < digits->GetEntriesFast() ; i++) { + if(!fDigitsArray) return; + + for(Int_t i = 0 ; i < fDigitsArray->GetEntriesFast() ; i++) { //Raw ADC counts - AliFMDDigit* digit = static_cast(digits->At(i)); + AliFMDDigit* digit = static_cast(fDigitsArray->At(i)); GetDigitsData(0)->Fill(digit->Counts()); } } @@ -192,31 +180,30 @@ void AliFMDQADataMakerSim::MakeDigits(TClonesArray * digits) void AliFMDQADataMakerSim::MakeDigits(TTree * digitTree) { - fDigitsArray.Clear(); + if (fDigitsArray) + fDigitsArray->Clear(); + else + fDigitsArray = new TClonesArray("AliFMDDigit", 1000) ; + TBranch * branch = digitTree->GetBranch("FMD") ; if (!branch) { AliWarning("FMD branch in Digit Tree not found") ; return; } - TClonesArray* digitAddress = &fDigitsArray; - branch->SetAddress(&digitAddress) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digitAddress) ; + MakeDigits() ; } //_____________________________________________________________________ -void AliFMDQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliFMDQADataMakerSim::MakeSDigits() { // makes data from Digits - if(!sdigits) return; + if(!fSDigitsArray) return; - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - - for(Int_t i = 0 ; i < sdigits->GetEntriesFast() ; i++) { + for(Int_t i = 0 ; i < fSDigitsArray->GetEntriesFast() ; i++) { //Raw ADC counts - AliFMDSDigit* sdigit = static_cast(sdigits->At(i)); + AliFMDSDigit* sdigit = static_cast(fSDigitsArray->At(i)); GetSDigitsData(0)->Fill(sdigit->Counts()); } } @@ -225,16 +212,18 @@ void AliFMDQADataMakerSim::MakeSDigits(TClonesArray * sdigits) void AliFMDQADataMakerSim::MakeSDigits(TTree * sdigitTree) { - fSDigitsArray.Clear(); + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliFMDSDigit", 1000) ; TBranch * branch = sdigitTree->GetBranch("FMD") ; if (!branch) { AliWarning("FMD branch in SDigit Tree not found") ; return; } - TClonesArray* sdigitAddress = &fSDigitsArray; - branch->SetAddress(&sdigitAddress) ; + branch->SetAddress(&fSDigitsArray) ; branch->GetEntry(0) ; - MakeSDigits(sdigitAddress) ; + MakeSDigits() ; } //_____________________________________________________________________ diff --git a/FMD/AliFMDQADataMakerSim.h b/FMD/AliFMDQADataMakerSim.h index 951608cbdca..9c7785900da 100644 --- a/FMD/AliFMDQADataMakerSim.h +++ b/FMD/AliFMDQADataMakerSim.h @@ -34,17 +34,14 @@ class AliFMDQADataMakerSim: public AliQADataMakerSim { virtual void InitDigits(); // virtual void InitRaws() ; virtual void InitSDigits() ; - virtual void MakeHits(TClonesArray* hits) ; + virtual void MakeHits() ; virtual void MakeHits(TTree* hitTree) ; - virtual void MakeDigits(TClonesArray* digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree* digitTree) ; // virtual void MakeRaws(AliRawReader* rawReader) ; - virtual void MakeSDigits(TClonesArray * sigits) ; + virtual void MakeSDigits() ; virtual void MakeSDigits(TTree * sigitTree) ; virtual void StartOfDetectorCycle() ; - TClonesArray fSDigitsArray; - TClonesArray fDigitsArray; - TClonesArray fHitsArray; ClassDef(AliFMDQADataMakerSim,0) // description }; diff --git a/HMPID/AliHMPIDQADataMakerRec.cxx b/HMPID/AliHMPIDQADataMakerRec.cxx index 8af9a1fd772..be0da001a12 100644 --- a/HMPID/AliHMPIDQADataMakerRec.cxx +++ b/HMPID/AliHMPIDQADataMakerRec.cxx @@ -50,14 +50,14 @@ ClassImp(AliHMPIDQADataMakerRec) //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec() : - AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"),fEvtRaw(0) + AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"),fEvtRaw(0), fChannel(0) { // ctor } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AliHMPIDQADataMakerRec::AliHMPIDQADataMakerRec(const AliHMPIDQADataMakerRec& qadm) : - AliQADataMakerRec(),fEvtRaw(qadm.fEvtRaw) + AliQADataMakerRec(),fEvtRaw(qadm.fEvtRaw), fChannel(qadm.fChannel) { //copy ctor SetName((const char*)qadm.GetName()) ; @@ -205,10 +205,6 @@ void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader) // // Filling Raws QA histos // - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; - rawReader->Reset() ; AliHMPIDRawStream stream(rawReader); @@ -238,35 +234,23 @@ void AliHMPIDQADataMakerRec::MakeRaws(AliRawReader *rawReader) } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void AliHMPIDQADataMakerRec::MakeDigits(TClonesArray * data) +void AliHMPIDQADataMakerRec::MakeDigits() { // //filling QA histos for Digits // - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; + Int_t i = fChannel ; + GetDigitsData(0)->Fill(i,fDigitsArray->GetEntriesFast()/(48.*80.*6.)); + TIter next(fDigitsArray); + AliHMPIDDigit * digit; + while ( (digit = dynamic_cast(next())) ) { + GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.)); + GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY()); + GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q()); + } +} - TObjArray *chamber = dynamic_cast(data); - if ( !chamber) { - AliError("Wrong type of digits container") ; - } else { - for(Int_t i =0; i< chamber->GetEntries(); i++) - { - TClonesArray * digits = dynamic_cast(chamber->At(i)); - GetDigitsData(0)->Fill(i,digits->GetEntriesFast()/(48.*80.*6.)); - TIter next(digits); - AliHMPIDDigit * digit; - while ( (digit = dynamic_cast(next())) ) { - GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.)); - GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY()); - GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q()); - } - } - } -} - //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDQADataMakerRec::MakeDigits(TTree * data) { @@ -274,20 +258,18 @@ void AliHMPIDQADataMakerRec::MakeDigits(TTree * data) //Opening the Digit Tree // - TObjArray *pObjDig=new TObjArray(AliHMPIDParam::kMaxCh+1); - for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ - TClonesArray *pCA=new TClonesArray("AliHMPIDDigit"); - pObjDig->AddAt(pCA,iCh); - } - - pObjDig->SetOwner(kTRUE); + if(fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray=new TClonesArray("AliHMPIDDigit"); for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ - data->SetBranchAddress(Form("HMPID%i",iCh),&(*pObjDig)[iCh]); + fChannel = iCh ; + fDigitsArray->Clear() ; + data->SetBranchAddress(Form("HMPID%i",iCh),&fDigitsArray); + data->GetEntry(0); + MakeDigits(); } - data->GetEntry(0); - - MakeDigits((TClonesArray *)pObjDig); } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -297,20 +279,18 @@ void AliHMPIDQADataMakerRec::MakeRecPoints(TTree * clustersTree) //filling QA histos for clusters // AliHMPIDParam *pPar =AliHMPIDParam::Instance(); - - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; - - static TClonesArray *clusters; - if(!clusters) clusters = new TClonesArray("AliHMPIDCluster"); + + if (fRecPointsArray) + fRecPointsArray->Clear() ; + else + fRecPointsArray = new TClonesArray("AliHMPIDCluster"); for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ TBranch *branch = clustersTree->GetBranch(Form("HMPID%d",iCh)); - branch->SetAddress(&clusters); + branch->SetAddress(&fRecPointsArray); branch->GetEntry(0); - GetRecPointsData(0)->Fill(iCh,clusters->GetEntries()); - TIter next(clusters); + GetRecPointsData(0)->Fill(iCh,fRecPointsArray->GetEntries()); + TIter next(fRecPointsArray); AliHMPIDCluster *clu; while ( (clu = dynamic_cast(next())) ) { GetRecPointsData(1)->Fill(clu->Status(),iCh); @@ -318,14 +298,11 @@ void AliHMPIDQADataMakerRec::MakeRecPoints(TTree * clustersTree) if(clu->Q()>100) GetRecPointsData(2+iCh)->Fill(clu->Size()); else { GetRecPointsData(2+7+iCh)->Fill(clu->Size()); - GetRecPointsData(2+14+iCh*6+sect)->Fill(clu->Q()); + GetRecPointsData(2+14+iCh*6+sect)->Fill(clu->Q()); } GetRecPointsData(2+14+42+iCh*6+sect)->Fill(clu->Q()); } } - - clusters->Clear(); - } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ void AliHMPIDQADataMakerRec::MakeESDs(AliESDEvent * esd) @@ -333,11 +310,7 @@ void AliHMPIDQADataMakerRec::MakeESDs(AliESDEvent * esd) // //fills QA histos for ESD // - - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; - + for(Int_t iTrk = 0 ; iTrk < esd->GetNumberOfTracks() ; iTrk++){ AliESDtrack *pTrk = esd->GetTrack(iTrk) ; GetESDsData(0)->Fill(pTrk->GetP(),pTrk->GetHMPIDsignal()); @@ -375,7 +348,7 @@ void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA if(task==AliQAv1::kRAWS) { for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, histos) ) continue ; for(Int_t iddl=0;iddl<14;iddl++) { TH1F *h = (TH1F*)histos[specie]->At(14+iddl); //ddl histos scaled by the number of events @@ -383,8 +356,6 @@ void AliHMPIDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA } } } - AliQAChecker::Instance()->Run(AliQAv1::kHMPID, task, histos); - } diff --git a/HMPID/AliHMPIDQADataMakerRec.h b/HMPID/AliHMPIDQADataMakerRec.h index 45fb4ef6a93..7f22f5c2bb7 100644 --- a/HMPID/AliHMPIDQADataMakerRec.h +++ b/HMPID/AliHMPIDQADataMakerRec.h @@ -34,16 +34,17 @@ private: virtual void InitRecPoints(); //book cluster QA histo virtual void InitRaws(); //book raw QA histo virtual void InitESDs() ; //book ESD QA histo - virtual void MakeDigits(TClonesArray* digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digits) ; //Fill cluster QA histo virtual void MakeRecPoints(TTree * clusters) ; //Fill cluster QA histo virtual void MakeRaws(AliRawReader* rawReader); virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo virtual void StartOfDetectorCycle() ; virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** obj) ; - Int_t fEvtRaw; //internal event counter for raw + Int_t fEvtRaw; //!internal event counter for raw + Int_t fChannel ; //! - ClassDef(AliHMPIDQADataMakerRec,1) // description + ClassDef(AliHMPIDQADataMakerRec,2) // description }; diff --git a/HMPID/AliHMPIDQADataMakerSim.cxx b/HMPID/AliHMPIDQADataMakerSim.cxx index 8cb69659b4e..1ad28e16554 100644 --- a/HMPID/AliHMPIDQADataMakerSim.cxx +++ b/HMPID/AliHMPIDQADataMakerSim.cxx @@ -47,14 +47,14 @@ ClassImp(AliHMPIDQADataMakerSim) //____________________________________________________________________________ AliHMPIDQADataMakerSim::AliHMPIDQADataMakerSim() : - AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker") + AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kHMPID), "HMPID Quality Assurance Data Maker"), fChannel(0) { // ctor } //____________________________________________________________________________ AliHMPIDQADataMakerSim::AliHMPIDQADataMakerSim(const AliHMPIDQADataMakerSim& qadm) : - AliQADataMakerSim() + AliQADataMakerSim(),fChannel(0) { //copy ctor SetName((const char*)qadm.GetName()) ; @@ -123,114 +123,87 @@ void AliHMPIDQADataMakerSim::InitSDigits() //____________________________________________________________________________ -void AliHMPIDQADataMakerSim::MakeHits(TClonesArray * data) +void AliHMPIDQADataMakerSim::MakeHits() { // //filling QA histos for Hits // - TClonesArray * hits = dynamic_cast(data) ; - if (!hits){ - AliError("Wrong type of hits container") ; - } else { - - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - - TIter next(hits); - AliHMPIDHit * hit ; - while ( (hit = dynamic_cast(next())) ) { - if(hit->Pid()<500000) GetHitsData(0)->Fill(hit->Q()) ; - if(hit->Pid()<500000) GetHitsData(hit->Ch()+1)->Fill(hit->LorsX(),hit->LorsY()); - } - } + + TIter next(fHitsArray); + AliHMPIDHit * hit ; + while ( (hit = dynamic_cast(next())) ) { + if(hit->Pid()<500000) GetHitsData(0)->Fill(hit->Q()) ; + if(hit->Pid()<500000) GetHitsData(hit->Ch()+1)->Fill(hit->LorsX(),hit->LorsY()); + } +} -} //___________________________________________________________________________ void AliHMPIDQADataMakerSim::MakeHits(TTree * data) { // //Opening of the Hit TTree // - TClonesArray *pHits=new TClonesArray("AliHMPIDHit"); data->SetBranchAddress("HMPID",&pHits); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray=new TClonesArray("AliHMPIDHit"); + data->SetBranchAddress("HMPID",&fHitsArray); for(Int_t iEnt=0;iEntGetEntriesFast();iEnt++){//entries loop data->GetEntry(iEnt); - MakeHits(pHits); + MakeHits(); }//entries loop } -//____________________________________________________________________________ -void AliHMPIDQADataMakerSim::MakeDigits(TClonesArray * data) +//___________________________________________________________________________ +void AliHMPIDQADataMakerSim::MakeDigits() { - // - //filling QA histos for Digits - // - - TObjArray *chamber = dynamic_cast(data); - if ( !chamber) { - AliError("Wrong type of digits container") ; - } else { - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - for(Int_t i =0; i< chamber->GetEntries(); i++) - { - TClonesArray * digits = dynamic_cast(chamber->At(i)); - GetDigitsData(0)->Fill(i,digits->GetEntriesFast()/(48.*80.*6.)); - TIter next(digits); - AliHMPIDDigit * digit; - while ( (digit = dynamic_cast(next())) ) { - GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.)); - GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY()); - GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q()); - } - } - } -} + // + //filling QA histos for Digits + // + + Int_t i = fChannel ; + GetDigitsData(0)->Fill(i,fDigitsArray->GetEntriesFast()/(48.*80.*6.)); + TIter next(fDigitsArray); + AliHMPIDDigit * digit; + while ( (digit = dynamic_cast(next())) ) { + GetDigitsData(1)->Fill(10.*i+digit->Pc(),1./(48.*80.)); + GetDigitsData(2+i)->Fill(digit->PadChX(),digit->PadChY()); + GetDigitsData(9+i*6+digit->Pc())->Fill(digit->Q()); + } +} //___________________________________________________________________________ void AliHMPIDQADataMakerSim::MakeDigits(TTree * data) { -// -//Opening the Digit Tree -// - TObjArray *pObjDig=new TObjArray(AliHMPIDParam::kMaxCh+1); - for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ - TClonesArray *pCA=new TClonesArray("AliHMPIDDigit"); - pObjDig->AddAt(pCA,iCh); - } - - pObjDig->SetOwner(kTRUE); - + // + //Opening the Digit Tree + // + + if(fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray=new TClonesArray("AliHMPIDDigit"); + for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ - data->SetBranchAddress(Form("HMPID%i",iCh),&(*pObjDig)[iCh]); + fChannel = iCh ; + data->SetBranchAddress(Form("HMPID%i",iCh),&fDigitsArray); + data->GetEntry(0); + MakeDigits(); + fDigitsArray->Clear() ; } - data->GetEntry(0); - - MakeDigits((TClonesArray *)pObjDig); } + //____________________________________________________________________________ -void AliHMPIDQADataMakerSim::MakeSDigits(TClonesArray * data) +void AliHMPIDQADataMakerSim::MakeSDigits() { // //filling QA histos for SDigits // - TClonesArray * sdigits = dynamic_cast(data) ; - if (!sdigits) { - AliError("Wrong type of sdigits container") ; - } else { - - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - - TIter next(sdigits) ; - AliHMPIDDigit * sdigit ; - while ( (sdigit = dynamic_cast(next())) ) { - GetSDigitsData(0)->Fill(sdigit->Q()); - } - } + + TIter next(fSDigitsArray) ; + AliHMPIDDigit * sdigit ; + while ( (sdigit = dynamic_cast(next())) ) { + GetSDigitsData(0)->Fill(sdigit->Q()); + } } //___________________________________________________________________________ void AliHMPIDQADataMakerSim::MakeSDigits(TTree * data) @@ -238,16 +211,19 @@ void AliHMPIDQADataMakerSim::MakeSDigits(TTree * data) // // Opening the SDigit Tree // - TClonesArray * sdigits = new TClonesArray("AliHMPIDDigit", 1000) ; + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliHMPIDDigit", 1000) ; TBranch * branch = data->GetBranch("HMPID") ; if ( ! branch ) { AliError("HMPID SDigit Tree not found") ; return; } - branch->SetAddress(&sdigits) ; + branch->SetAddress(&fSDigitsArray) ; branch->GetEntry(0) ; - MakeSDigits(sdigits) ; + MakeSDigits() ; } //____________________________________________________________________________ void AliHMPIDQADataMakerSim::StartOfDetectorCycle() diff --git a/HMPID/AliHMPIDQADataMakerSim.h b/HMPID/AliHMPIDQADataMakerSim.h index 998604786e0..4361642c5db 100644 --- a/HMPID/AliHMPIDQADataMakerSim.h +++ b/HMPID/AliHMPIDQADataMakerSim.h @@ -39,15 +39,17 @@ private: virtual void InitHits() ; //book hit QA histo virtual void InitDigits() ; //book Digit QA histo virtual void InitSDigits() ; //book SDigits QA histo - virtual void MakeHits(TClonesArray * hits) ; //Fill hit QA histo + virtual void MakeHits() ; //Fill hit QA histo virtual void MakeHits(TTree * hits) ; // access to hit tree - virtual void MakeDigits(TClonesArray * digits) ; //Fill Digit QA histo + virtual void MakeDigits() ; //Fill Digit QA histo virtual void MakeDigits(TTree * digits) ; //access to digit tree - virtual void MakeSDigits(TClonesArray * sdigits) ; //Fill SDigit QA histo + virtual void MakeSDigits() ; //Fill SDigit QA histo virtual void MakeSDigits(TTree * sdigits) ; //access to SDigits tree virtual void StartOfDetectorCycle() ; + + Int_t fChannel ; //! - ClassDef(AliHMPIDQADataMakerSim,1) // description + ClassDef(AliHMPIDQADataMakerSim,2) // description }; diff --git a/ITS/AliITSQADataMakerRec.h b/ITS/AliITSQADataMakerRec.h index dee50fc4d3e..e6634e5ccd3 100644 --- a/ITS/AliITSQADataMakerRec.h +++ b/ITS/AliITSQADataMakerRec.h @@ -43,7 +43,7 @@ public: virtual void InitRecPoints(); virtual void InitESDs(); virtual void MakeRaws(AliRawReader *rawReader); - virtual void MakeDigits(TClonesArray * ){AliWarning("Signature not implemented. A TTree* of digits should be passed as input argument");} + virtual void MakeDigits(){AliWarning("Signature not implemented. A TTree* of digits should be passed as input argument");} virtual void MakeDigits(TTree *digitsTree); virtual void MakeRecPoints(TTree *clustersTree); virtual void MakeESDs(AliESDEvent *esd); diff --git a/ITS/AliITSQADataMakerSim.cxx b/ITS/AliITSQADataMakerSim.cxx index c6b3784386b..19b38533d53 100644 --- a/ITS/AliITSQADataMakerSim.cxx +++ b/ITS/AliITSQADataMakerSim.cxx @@ -116,6 +116,8 @@ void AliITSQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr { // launch the QA checking for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { + if (! IsValidEventSpecie(specie, list) ) + continue ; AliDebug(AliQAv1::GetQADebugLevel(),"AliITSDM instantiates checker with Run(AliQAv1::kITS, task, list)\n"); if(fSubDetector == 0 || fSubDetector == 1) fSPDDataMaker->EndOfDetectorCycle(task, list[specie]); if(fSubDetector == 0 || fSubDetector == 2) fSDDDataMaker->EndOfDetectorCycle(task, list[specie]); @@ -158,22 +160,22 @@ void AliITSQADataMakerSim::InitDigits() } //____________________________________________________________________________ -void AliITSQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliITSQADataMakerSim::MakeDigits() { // Fill QA for digits if(fSubDetector == 0 || fSubDetector == 1) { - Int_t rv = fSPDDataMaker->MakeDigits(digits) ; + Int_t rv = fSPDDataMaker->MakeDigits() ; if ( rv != 0 ) fSDDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } if(fSubDetector == 0 || fSubDetector == 2) { - Int_t rv = fSDDDataMaker->MakeDigits(digits) ; + Int_t rv = fSDDDataMaker->MakeDigits() ; if ( rv != 0 ) fSSDDataMaker->SetOffset(AliQAv1::kDIGITS, fDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } - if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(digits); + if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeDigits(); } //____________________________________________________________________________ @@ -214,22 +216,22 @@ void AliITSQADataMakerSim::InitSDigits() } //____________________________________________________________________________ -void AliITSQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliITSQADataMakerSim::MakeSDigits() { // Fill QA for recpoints if(fSubDetector == 0 || fSubDetector == 1){ - Int_t rv = fSPDDataMaker->MakeSDigits(sdigits) ; + Int_t rv = fSPDDataMaker->MakeSDigits() ; if ( rv != 0 ) fSDDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } if(fSubDetector == 0 || fSubDetector == 2) { - Int_t rv = fSDDDataMaker->MakeSDigits(sdigits) ; + Int_t rv = fSDDDataMaker->MakeSDigits() ; if ( rv != 0 ) fSSDDataMaker->SetOffset(AliQAv1::kSDIGITS, fSDigitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } - if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(sdigits); + if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeSDigits(); } //____________________________________________________________________________ @@ -270,22 +272,22 @@ void AliITSQADataMakerSim::InitHits() } //____________________________________________________________________________ -void AliITSQADataMakerSim::MakeHits(TClonesArray * hits) +void AliITSQADataMakerSim::MakeHits() { // Fill QA for hits if(fSubDetector == 0 || fSubDetector == 1) { - Int_t rv = fSPDDataMaker->MakeHits(hits) ; + Int_t rv = fSPDDataMaker->MakeHits() ; if ( rv != 0 ) fSDDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } if(fSubDetector == 0 || fSubDetector == 2) { - Int_t rv = fSDDDataMaker->MakeHits(hits) ; + Int_t rv = fSDDDataMaker->MakeHits() ; if ( rv != 0 ) fSSDDataMaker->SetOffset(AliQAv1::kHITS, fHitsQAList [AliRecoParam::AConvert(fEventSpecie)]->GetEntries()); } - if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(hits); + if(fSubDetector == 0 || fSubDetector == 3) fSSDDataMaker->MakeHits(); } //____________________________________________________________________________ diff --git a/ITS/AliITSQADataMakerSim.h b/ITS/AliITSQADataMakerSim.h index 8bf2d1672d3..525ac75cb3a 100644 --- a/ITS/AliITSQADataMakerSim.h +++ b/ITS/AliITSQADataMakerSim.h @@ -35,9 +35,9 @@ public: virtual void InitDigits(); virtual void InitSDigits(); virtual void InitHits(); - virtual void MakeDigits(TClonesArray * digits); - virtual void MakeSDigits(TClonesArray * sdigits); - virtual void MakeHits(TClonesArray * hits); + virtual void MakeDigits(); + virtual void MakeSDigits(); + virtual void MakeHits(); virtual void MakeDigits(TTree * digits); virtual void MakeSDigits(TTree * sdigits); virtual void MakeHits(TTree * hits); diff --git a/ITS/AliITSQASDDDataMakerRec.h b/ITS/AliITSQASDDDataMakerRec.h index f13aaecb63c..8e6a1f6ac23 100644 --- a/ITS/AliITSQASDDDataMakerRec.h +++ b/ITS/AliITSQASDDDataMakerRec.h @@ -30,7 +30,7 @@ public: virtual Int_t InitDigits(); virtual Int_t InitRecPoints(); virtual Int_t MakeRaws(AliRawReader *rawReader); - virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;} + virtual Int_t MakeDigits() {return 0;} virtual Int_t MakeDigits(TTree *clustersTree); virtual Int_t MakeRecPoints(TTree *clustersTree); virtual void StartOfDetectorCycle(); diff --git a/ITS/AliITSQASDDDataMakerSim.cxx b/ITS/AliITSQASDDDataMakerSim.cxx index 57e84672626..3cf366b7595 100644 --- a/ITS/AliITSQASDDDataMakerSim.cxx +++ b/ITS/AliITSQASDDDataMakerSim.cxx @@ -140,10 +140,7 @@ Int_t AliITSQASDDDataMakerSim::MakeDigits(TTree * digits) // Fill QA for DIGIT - SDD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) ) - rv = InitDigits() ; - + AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); TClonesArray *iITSdigits = fITS->DigitsAddress(1); @@ -204,9 +201,6 @@ Int_t AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits) { // Fill QA for SDIGIT - SDD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) ) - rv = InitSDigits() ; AliITSsegmentationSDD* seg = new AliITSsegmentationSDD(); Int_t nan=seg->Npz(); @@ -223,9 +217,11 @@ Int_t AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits) TBranch *brchSDigits = sdigits->GetBranch("ITS"); + static TClonesArray * sdig ; + if (! sdig ) + sdig = new TClonesArray( "AliITSpListItem",1000 ); for(Int_t id=0; id<260; id++){ Int_t nmod=id+240; - TClonesArray * sdig = new TClonesArray( "AliITSpListItem",1000 ); brchSDigits->SetAddress( &sdig ); brchSDigits->GetEvent(nmod); Int_t nsdig=sdig->GetEntries(); @@ -240,7 +236,7 @@ Int_t AliITSQASDDDataMakerSim::MakeSDigits(TTree * sdigits) fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffsetS)->Fill(it); fAliITSQADataMakerSim->GetSDigitsData(3+fGenOffsetS)->Fill(sig); } - delete sdig; + sdig->Clear(); } return rv ; } @@ -286,10 +282,7 @@ Int_t AliITSQASDDDataMakerSim::MakeHits(TTree * hits) { // Fill QA for HITS - SDD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) ) - rv = InitHits() ; - + AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); Int_t nmodules; diff --git a/ITS/AliITSQASDDDataMakerSim.h b/ITS/AliITSQASDDDataMakerSim.h index fda9b0ab3db..f9f1e45dc09 100644 --- a/ITS/AliITSQASDDDataMakerSim.h +++ b/ITS/AliITSQASDDDataMakerSim.h @@ -34,9 +34,9 @@ public: virtual Int_t InitDigits(); virtual Int_t InitSDigits(); virtual Int_t InitHits(); - virtual Int_t MakeDigits(TClonesArray * /*digits*/){return 0;} - virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){return 0;} - virtual Int_t MakeHits(TClonesArray * /*hits*/){return 0;} + virtual Int_t MakeDigits(){return 0;} + virtual Int_t MakeSDigits(){return 0;} + virtual Int_t MakeHits(){return 0;} virtual Int_t MakeDigits(TTree * digits); virtual Int_t MakeSDigits(TTree * sdigits); virtual Int_t MakeHits(TTree * hits); diff --git a/ITS/AliITSQASPDDataMakerRec.cxx b/ITS/AliITSQASPDDataMakerRec.cxx index 7324c961812..080f18af7db 100644 --- a/ITS/AliITSQASPDDataMakerRec.cxx +++ b/ITS/AliITSQASPDDataMakerRec.cxx @@ -188,9 +188,6 @@ Int_t AliITSQASPDDataMakerRec::MakeRaws(AliRawReader* rawReader) { // Fill QA for RAW - SPD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) ) - rv = InitRaws() ; rawReader->Reset(); AliITSRawStreamSPD *rawStreamSPD = new AliITSRawStreamSPD(rawReader); @@ -314,9 +311,6 @@ Int_t AliITSQASPDDataMakerRec::MakeDigits(TTree *digits) { // Fill QA for DIGIT - SPD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) ) - rv = InitDigits() ; // AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); // fITS->SetTreeAddress(); @@ -519,9 +513,6 @@ Int_t AliITSQASPDDataMakerRec::MakeRecPoints(TTree * clusterTree) AliError("can't get the branch with the ITS clusters !"); return rv; } - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) ) - rv = InitRecPoints() ; itsClusterBranch->SetAddress(&ITSCluster); Int_t nItsMods = (Int_t)clusterTree->GetEntries(); diff --git a/ITS/AliITSQASPDDataMakerRec.h b/ITS/AliITSQASPDDataMakerRec.h index f64b551c01c..fc2ddf2d7d9 100644 --- a/ITS/AliITSQASPDDataMakerRec.h +++ b/ITS/AliITSQASPDDataMakerRec.h @@ -33,7 +33,7 @@ public: virtual Int_t InitRecPoints(); virtual Int_t MakeRaws(AliRawReader *rawReader); virtual Int_t MakeRecPoints(TTree *clustersTree); - virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;} + virtual Int_t MakeDigits() {return 0;} virtual Int_t MakeDigits(TTree *clustersTree); virtual void StartOfDetectorCycle(); virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray * list); diff --git a/ITS/AliITSQASPDDataMakerSim.cxx b/ITS/AliITSQASPDDataMakerSim.cxx index c058c761c63..c9224a3c3a2 100644 --- a/ITS/AliITSQASPDDataMakerSim.cxx +++ b/ITS/AliITSQASPDDataMakerSim.cxx @@ -169,10 +169,7 @@ Int_t AliITSQASPDDataMakerSim::MakeDigits(TTree *digits) { // Fill QA for DIGIT - SPD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) ) - rv = InitDigits() ; - + AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); TClonesArray *iITSdigits = fITS->DigitsAddress(0); // 0->SPD @@ -247,13 +244,13 @@ Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits) { // Fill QA for SDIGIT - SPD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) ) - rv = InitSDigits() ; - + + static TClonesArray * sdig ; + if (! sdig ) + sdig = new TClonesArray( "AliITSpListItem",1000 ); + TBranch *brchSDigits = sdigits->GetBranch("ITS"); for (Int_t imod=0; imod<240; ++imod){ - TClonesArray * sdig = new TClonesArray( "AliITSpListItem",1000 ); brchSDigits->SetAddress( &sdig ); brchSDigits->GetEvent(imod); Int_t nsdig=sdig->GetEntries(); @@ -265,7 +262,7 @@ Int_t AliITSQASPDDataMakerSim::MakeSDigits(TTree *sdigits) fAliITSQADataMakerSim->GetSDigitsData(0+fGenOffsetS)->Fill(1,nsdig); fAliITSQADataMakerSim->GetSDigitsData(2+fGenOffsetS)->Fill(imod,nsdig); } - delete sdig; + sdig->Clear() ; } return rv ; } @@ -322,9 +319,6 @@ Int_t AliITSQASPDDataMakerSim::MakeHits(TTree *hits) { // Fill QA for HITS - SPD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) ) - rv = InitHits() ; AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); diff --git a/ITS/AliITSQASPDDataMakerSim.h b/ITS/AliITSQASPDDataMakerSim.h index e3e665f07e6..0688863d8a8 100644 --- a/ITS/AliITSQASPDDataMakerSim.h +++ b/ITS/AliITSQASPDDataMakerSim.h @@ -34,9 +34,9 @@ public: virtual Int_t InitDigits(); virtual Int_t InitSDigits(); virtual Int_t InitHits(); - virtual Int_t MakeDigits(TClonesArray * /*digits*/){return 0;} - virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){return 0;} - virtual Int_t MakeHits(TClonesArray * /*hits*/){return 0;} + virtual Int_t MakeDigits(){return 0;} + virtual Int_t MakeSDigits(){return 0;} + virtual Int_t MakeHits(){return 0;} virtual Int_t MakeDigits(TTree * digits); virtual Int_t MakeSDigits(TTree * sdigits); virtual Int_t MakeHits(TTree * hits); diff --git a/ITS/AliITSQASSDDataMakerRec.cxx b/ITS/AliITSQASSDDataMakerRec.cxx index 147b0b1d59d..7eb538a6d1d 100644 --- a/ITS/AliITSQASSDDataMakerRec.cxx +++ b/ITS/AliITSQASSDDataMakerRec.cxx @@ -648,9 +648,6 @@ Int_t AliITSQASSDDataMakerRec::InitRaws() { Int_t AliITSQASSDDataMakerRec::MakeRaws(AliRawReader* rawReader) { // Fill QA for RAW - SSD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetRawsData(fGenRawsOffset) ) - rv = InitRaws() ; Int_t gStripNumber; Int_t gHistPosition; @@ -932,10 +929,6 @@ Int_t AliITSQASSDDataMakerRec::MakeDigits(TTree *digits) { return rv; } - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetDigitsData(fGenDigitsOffset) ) - rv = InitDigits() ; - static TClonesArray statDigits("AliITSdigitSSD"); TClonesArray *iSSDdigits = &statDigits; branchD->SetAddress(&iSSDdigits); @@ -1246,11 +1239,7 @@ Int_t AliITSQASSDDataMakerRec::MakeRecPoints(TTree *clustersTree) AliError("can't get the branch with the ITS clusters !"); return rv; } - - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerRec->GetRecPointsData(fGenRecPointsOffset) ) - rv = InitRecPoints() ; - + static TClonesArray statRecpoints("AliITSRecPoint"); TClonesArray *recpoints = &statRecpoints; branchRecP->SetAddress(&recpoints); diff --git a/ITS/AliITSQASSDDataMakerRec.h b/ITS/AliITSQASSDDataMakerRec.h index 6f2dbada029..1f4086678cf 100644 --- a/ITS/AliITSQASSDDataMakerRec.h +++ b/ITS/AliITSQASSDDataMakerRec.h @@ -34,7 +34,7 @@ public: virtual Int_t InitDigits(); virtual Int_t InitRecPoints(); virtual Int_t MakeRaws(AliRawReader *rawReader); - virtual Int_t MakeDigits(TClonesArray* /*digits*/) {return 0;} + virtual Int_t MakeDigits() {return 0;} virtual Int_t MakeDigits(TTree *digitsTree); virtual Int_t MakeRecPoints(TTree *clustersTree); virtual void StartOfDetectorCycle(); diff --git a/ITS/AliITSQASSDDataMakerSim.cxx b/ITS/AliITSQASSDDataMakerSim.cxx index 4080a1bd087..cb5bcd5bd8f 100644 --- a/ITS/AliITSQASSDDataMakerSim.cxx +++ b/ITS/AliITSQASSDDataMakerSim.cxx @@ -131,10 +131,7 @@ Int_t AliITSQASSDDataMakerSim::InitDigits() { Int_t AliITSQASSDDataMakerSim::MakeDigits(TTree *digits) { // Fill QA for DIGIT - SSD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetDigitsData(fGenOffsetD) ) - rv = InitDigits() ; - + AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); TClonesArray *iSSDdigits = fITS->DigitsAddress(2); @@ -179,9 +176,6 @@ Int_t AliITSQASSDDataMakerSim::InitSDigits() { Int_t AliITSQASSDDataMakerSim::MakeSDigits(TTree *sdigits) { // Fill QA for SDIGIT - SSD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetSDigitsData(fGenOffsetS) ) - rv = InitSDigits() ; static TClonesArray iSSDEmpty("AliITSpListItem",10000); iSSDEmpty.Clear(); @@ -282,9 +276,6 @@ Int_t AliITSQASSDDataMakerSim::InitHits() { Int_t AliITSQASSDDataMakerSim::MakeHits(TTree *hits) { // Fill QA for HITS - SSD - Int_t rv = 0 ; - // Check id histograms already created for this Event Specie - if ( ! fAliITSQADataMakerSim->GetHitsData(fGenOffsetH) ) - rv = InitHits() ; AliITS *fITS = (AliITS*)gAlice->GetModule("ITS"); fITS->SetTreeAddress(); diff --git a/ITS/AliITSQASSDDataMakerSim.h b/ITS/AliITSQASSDDataMakerSim.h index 753be5d2d13..03cc15e95aa 100644 --- a/ITS/AliITSQASSDDataMakerSim.h +++ b/ITS/AliITSQASSDDataMakerSim.h @@ -32,9 +32,9 @@ public: virtual Int_t InitDigits(); virtual Int_t InitSDigits(); virtual Int_t InitHits(); - virtual Int_t MakeDigits(TClonesArray * /*digits*/){return 0;} - virtual Int_t MakeSDigits(TClonesArray * /*sdigits*/){return 0;} - virtual Int_t MakeHits (TClonesArray * /*hits*/){return 0;} + virtual Int_t MakeDigits(){return 0;} + virtual Int_t MakeSDigits(){return 0;} + virtual Int_t MakeHits (){return 0;} virtual Int_t MakeDigits(TTree * digits); virtual Int_t MakeSDigits(TTree * sdigits); virtual Int_t MakeHits(TTree * hits); diff --git a/MUON/AliMUONQADataMakerRec.cxx b/MUON/AliMUONQADataMakerRec.cxx index 34a89229096..c58790f2098 100644 --- a/MUON/AliMUONQADataMakerRec.cxx +++ b/MUON/AliMUONQADataMakerRec.cxx @@ -185,7 +185,7 @@ void AliMUONQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjAr for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, list) ) continue ; SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; if ( task == AliQAv1::kRAWS && fTrackerDataMaker ) @@ -985,9 +985,6 @@ void AliMUONQADataMakerRec::MakeRaws(AliRawReader* rawReader) { /// make QA for rawdata - if ( ! GetRawsData(kTriggerScalersBP) ) - InitRaws() ; - if ( ! fIsInitRaws ) { AliWarningStream() << "Skipping function due to a failure in Init" << endl; @@ -1097,10 +1094,6 @@ void AliMUONQADataMakerRec::MakeDigits(TTree* digitsTree) { /// makes data from Digits - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - if (!fDigitStore) fDigitStore = AliMUONVDigitStore::Create(*digitsTree); fDigitStore->Connect(*digitsTree, false); @@ -1122,10 +1115,6 @@ void AliMUONQADataMakerRec::MakeRecPoints(TTree* clustersTree) { /// Fill histograms from treeR - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(kTrackerNumberOfClustersPerChamber) ) - InitRecPoints() ; - if (fIsInitRecPointsTracker) MakeRecPointsTracker(clustersTree); if (fIsInitRecPointsTrigger) MakeRecPointsTrigger(clustersTree); } @@ -1236,10 +1225,6 @@ void AliMUONQADataMakerRec::MakeESDs(AliESDEvent* esd) { /// make QA data from ESDs - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(kESDnTracks) ) - InitESDs() ; - if ( ! fIsInitESDs ) { AliWarningStream() << "Skipping function due to a failure in Init" << endl; diff --git a/MUON/AliMUONQADataMakerRec.h b/MUON/AliMUONQADataMakerRec.h index 990f04e83af..f444f09f862 100644 --- a/MUON/AliMUONQADataMakerRec.h +++ b/MUON/AliMUONQADataMakerRec.h @@ -42,7 +42,7 @@ protected: virtual void MakeRaws(AliRawReader* rawReader); virtual void MakeDigits(TTree* dig); - virtual void MakeDigits(TClonesArray* /*digits*/) {return;} + virtual void MakeDigits() {return;} virtual void MakeRecPoints(TTree* recpo); virtual void MakeESDs(AliESDEvent* esd) ; diff --git a/MUON/AliMUONQADataMakerSim.cxx b/MUON/AliMUONQADataMakerSim.cxx index b6da089c041..0d2f9b32cd5 100644 --- a/MUON/AliMUONQADataMakerSim.cxx +++ b/MUON/AliMUONQADataMakerSim.cxx @@ -149,10 +149,6 @@ void AliMUONQADataMakerSim::InitDigits() void AliMUONQADataMakerSim::MakeHits(TTree* hitsTree) { /// makes data from Hits - - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; if (!fHitStore) fHitStore = AliMUONVHitStore::Create(*hitsTree); @@ -177,10 +173,6 @@ void AliMUONQADataMakerSim::MakeSDigits(TTree* sdigitsTree) { /// makes data from SDigits - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - if (!fDigitStore) fDigitStore = AliMUONVDigitStore::Create(*sdigitsTree); fDigitStore->Connect(*sdigitsTree, false); @@ -202,10 +194,6 @@ void AliMUONQADataMakerSim::MakeDigits(TTree* digitsTree) { /// makes data from Digits - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - if (!fDigitStore) fDigitStore = AliMUONVDigitStore::Create(*digitsTree); fDigitStore->Connect(*digitsTree, false); diff --git a/MUON/AliMUONQADataMakerSim.h b/MUON/AliMUONQADataMakerSim.h index eafdcad7ee8..67e3f1b7312 100644 --- a/MUON/AliMUONQADataMakerSim.h +++ b/MUON/AliMUONQADataMakerSim.h @@ -38,15 +38,15 @@ private: virtual void InitDigits(); /// make hits QA from Array (not implemented) - virtual void MakeHits(TClonesArray* /*hits*/) {return;} + virtual void MakeHits() {return;} /// make hits QA from tree virtual void MakeHits(TTree* hitsTree); /// make SDigits QA from Array (not implemented) - virtual void MakeSDigits(TClonesArray* /*sigits*/) {return;} + virtual void MakeSDigits() {return;} /// make SDigits QA from Tree virtual void MakeSDigits(TTree* sigitsTree); /// make Digits QA from Array (not implemented) - virtual void MakeDigits(TClonesArray* /*digits*/) {return;} + virtual void MakeDigits() {return;} /// make SDigits QA from Tree virtual void MakeDigits(TTree* digitsTree); diff --git a/PHOS/AliPHOSQADataMakerRec.cxx b/PHOS/AliPHOSQADataMakerRec.cxx index 519791b98d5..934f8af0129 100644 --- a/PHOS/AliPHOSQADataMakerRec.cxx +++ b/PHOS/AliPHOSQADataMakerRec.cxx @@ -79,16 +79,21 @@ AliPHOSQADataMakerRec& AliPHOSQADataMakerRec::operator = (const AliPHOSQADataMak void AliPHOSQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) { //Detector specific actions at end of cycle - if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1)) - GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ; - if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2)) - GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ; - if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3)) - GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ; - if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4)) - GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ; - if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5)) - GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ; + for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { + if (! IsValidEventSpecie(specie, list)) + continue ; + SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; + if(GetRawsData(kHGqualMod1) && GetRawsData(kHGmod1)) + GetRawsData(kHGqualMod1)->Divide( GetRawsData(kHGmod1) ) ; + if(GetRawsData(kHGqualMod2) && GetRawsData(kHGmod2)) + GetRawsData(kHGqualMod2)->Divide( GetRawsData(kHGmod2) ) ; + if(GetRawsData(kHGqualMod3) && GetRawsData(kHGmod3)) + GetRawsData(kHGqualMod3)->Divide( GetRawsData(kHGmod3) ) ; + if(GetRawsData(kHGqualMod4) && GetRawsData(kHGmod4)) + GetRawsData(kHGqualMod4)->Divide( GetRawsData(kHGmod4) ) ; + if(GetRawsData(kHGqualMod5) && GetRawsData(kHGmod5)) + GetRawsData(kHGqualMod5)->Divide( GetRawsData(kHGmod5) ) ; + } // do the QA checking AliQAChecker::Instance()->Run(AliQAv1::kPHOS, task, list) ; } @@ -346,11 +351,7 @@ void AliPHOSQADataMakerRec::InitRaws() void AliPHOSQADataMakerRec::MakeESDs(AliESDEvent * esd) { // make QA data from ESDs - - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(kESDSpec) ) - InitESDs() ; - + Int_t nTot = 0 ; Double_t eTot = 0 ; for ( Int_t index = 0; index < esd->GetNumberOfCaloClusters() ; index++ ) { @@ -372,10 +373,6 @@ void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader) { //Fill prepared histograms with Raw digit properties - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(kLGpedRMS) ) - InitRaws() ; - rawReader->Reset() ; AliPHOSRawDecoder * decoder ; if(strcmp(GetRecoParam()->EMCDecoderVersion(),"v1")==0) @@ -486,19 +483,15 @@ void AliPHOSQADataMakerRec::MakeRaws(AliRawReader* rawReader) } //____________________________________________________________________________ -void AliPHOSQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliPHOSQADataMakerRec::MakeDigits() { // makes data from Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(kDigits) ) - InitDigits() ; TH1 * hist = GetDigitsData(kDigitsMul) ; if ( ! hist ) InitDigits() ; - GetDigitsData(kDigitsMul)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + GetDigitsData(kDigitsMul)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliPHOSDigit * digit ; while ( (digit = dynamic_cast(next())) ) { GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ; @@ -509,15 +502,18 @@ void AliPHOSQADataMakerRec::MakeDigits(TClonesArray * digits) void AliPHOSQADataMakerRec::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliPHOSDigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliPHOSDigit", 1000) ; TBranch * branch = digitTree->GetBranch("PHOS") ; if ( ! branch ) { AliWarning("PHOS branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } @@ -532,10 +528,6 @@ void AliPHOSQADataMakerRec::MakeRecPoints(TTree * clustersTree) return; } - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(kRPSpec) ) - InitRecPoints() ; - TObjArray * emcrecpoints = new TObjArray(100) ; emcbranch->SetAddress(&emcrecpoints); emcbranch->GetEntry(0); diff --git a/PHOS/AliPHOSQADataMakerRec.h b/PHOS/AliPHOSQADataMakerRec.h index 32c79f52610..1f8fcf13f24 100644 --- a/PHOS/AliPHOSQADataMakerRec.h +++ b/PHOS/AliPHOSQADataMakerRec.h @@ -62,7 +62,7 @@ private: virtual void InitRecPoints() ; virtual void InitRaws() ; virtual void MakeESDs(AliESDEvent * esd) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * recpoTree) ; virtual void MakeRecPoints(TTree * recpoTree) ; virtual void MakeRaws(AliRawReader* rawReader) ; diff --git a/PHOS/AliPHOSQADataMakerSim.cxx b/PHOS/AliPHOSQADataMakerSim.cxx index db89779fc7e..b825c52663a 100644 --- a/PHOS/AliPHOSQADataMakerSim.cxx +++ b/PHOS/AliPHOSQADataMakerSim.cxx @@ -44,22 +44,18 @@ ClassImp(AliPHOSQADataMakerSim) //____________________________________________________________________________ AliPHOSQADataMakerSim::AliPHOSQADataMakerSim() : - AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kPHOS), "PHOS Quality Assurance Data Maker"), - fHits(0x0) + AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kPHOS), "PHOS Quality Assurance Data Maker") { // ctor - fHits = new TClonesArray("AliPHOSHit", 1000); } //____________________________________________________________________________ AliPHOSQADataMakerSim::AliPHOSQADataMakerSim(const AliPHOSQADataMakerSim& qadm) : - AliQADataMakerSim(), - fHits(0x0) + AliQADataMakerSim() { //copy ctor SetName((const char*)qadm.GetName()) ; SetTitle((const char*)qadm.GetTitle()); - fHits = new TClonesArray("AliPHOSHit", 1000); } //__________________________________________________________________ @@ -127,12 +123,7 @@ void AliPHOSQADataMakerSim::MakeHits() { //make QA data from Hits - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(kHits) ) - InitHits() ; - - - TIter next(fHits) ; + TIter next(fHitsArray) ; AliPHOSHit * hit ; while ( (hit = dynamic_cast(next())) ) { GetHitsData(kHits)->Fill( hit->GetEnergy()) ; @@ -144,67 +135,66 @@ void AliPHOSQADataMakerSim::MakeHits(TTree * hitTree) { // make QA data from Hit Tree + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliPHOSHit", 1000); + TBranch * branch = hitTree->GetBranch("PHOS") ; if ( ! branch ) { AliWarning("PHOS branch in Hit Tree not found") ; } else { Int_t nHits = 0; - branch->SetAddress(&fHits) ; + branch->SetAddress(&fHitsArray) ; for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { branch->GetEntry(ientry) ; - nHits += fHits->GetEntriesFast(); + nHits += fHitsArray->GetEntriesFast(); MakeHits() ; - fHits->Clear(); + fHitsArray->Clear(); } GetHitsData(1)->Fill(nHits) ; } } //____________________________________________________________________________ -void AliPHOSQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliPHOSQADataMakerSim::MakeDigits() { // makes data from Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(kDigits) ) - InitDigits() ; - - GetDigitsData(1)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; - AliPHOSDigit * digit ; - while ( (digit = dynamic_cast(next())) ) { - GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ; - } + + GetDigitsData(1)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; + AliPHOSDigit * digit ; + while ( (digit = dynamic_cast(next())) ) { + GetDigitsData(kDigits)->Fill( digit->GetEnergy()) ; + } } //____________________________________________________________________________ void AliPHOSQADataMakerSim::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliPHOSDigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliPHOSDigit", 1000) ; TBranch * branch = digitTree->GetBranch("PHOS") ; if ( ! branch ) { AliWarning("PHOS branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } //____________________________________________________________________________ -void AliPHOSQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliPHOSQADataMakerSim::MakeSDigits() { // makes data from SDigits - - - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(kSDigits) ) - InitSDigits() ; - GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ; - TIter next(sdigits) ; + GetSDigitsData(1)->Fill(fSDigitsArray->GetEntriesFast()) ; + TIter next(fSDigitsArray) ; AliPHOSDigit * sdigit ; while ( (sdigit = dynamic_cast(next())) ) { GetSDigitsData(kSDigits)->Fill( sdigit->GetEnergy()) ; @@ -215,15 +205,18 @@ void AliPHOSQADataMakerSim::MakeSDigits(TClonesArray * sdigits) void AliPHOSQADataMakerSim::MakeSDigits(TTree * sdigitTree) { // makes data from SDigit Tree - TClonesArray * sdigits = new TClonesArray("AliPHOSDigit", 1000) ; - + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliPHOSDigit", 1000) ; + TBranch * branch = sdigitTree->GetBranch("PHOS") ; if ( ! branch ) { AliWarning("PHOS branch in SDigit Tree not found") ; } else { - branch->SetAddress(&sdigits) ; + branch->SetAddress(&fSDigitsArray) ; branch->GetEntry(0) ; - MakeSDigits(sdigits) ; + MakeSDigits() ; } } diff --git a/PHOS/AliPHOSQADataMakerSim.h b/PHOS/AliPHOSQADataMakerSim.h index ffe05d6a088..7adb8391230 100644 --- a/PHOS/AliPHOSQADataMakerSim.h +++ b/PHOS/AliPHOSQADataMakerSim.h @@ -40,18 +40,14 @@ private: virtual void InitHits() ; virtual void InitDigits() ; virtual void InitSDigits() ; - using AliQADataMakerSim::MakeHits; - void MakeHits() ; + virtual void MakeHits() ; virtual void MakeHits(TTree * hitTree) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digitTree) ; - virtual void MakeSDigits(TClonesArray * sigits) ; + virtual void MakeSDigits() ; virtual void MakeSDigits(TTree * sigitTree) ; virtual void StartOfDetectorCycle() ; -private: - TClonesArray * fHits; //!Array of PHOS hits - ClassDef(AliPHOSQADataMakerSim,2) // description }; diff --git a/PMD/AliPMDQADataMakerRec.cxx b/PMD/AliPMDQADataMakerRec.cxx index 760dff09bc2..00f80976f1a 100644 --- a/PMD/AliPMDQADataMakerRec.cxx +++ b/PMD/AliPMDQADataMakerRec.cxx @@ -409,10 +409,6 @@ void AliPMDQADataMakerRec::MakeRaws(AliRawReader* rawReader) { //Fill prepared histograms with Raw digit properties - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; - TObjArray *pmdddlcont = 0x0; pmdddlcont = new TObjArray(); AliPMDRawStream stream(rawReader); @@ -491,17 +487,13 @@ void AliPMDQADataMakerRec::MakeRaws(AliRawReader* rawReader) } //____________________________________________________________________________ -void AliPMDQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliPMDQADataMakerRec::MakeDigits() { // makes data from Digits - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - Int_t cpvmul = 0, premul = 0; + Int_t cpvmul = 0, premul = 0; - TIter next(digits) ; + TIter next(fDigitsArray) ; AliPMDdigit * digit ; while ( (digit = dynamic_cast(next())) ) { @@ -528,10 +520,13 @@ void AliPMDQADataMakerRec::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliPMDdigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliPMDdigit", 1000) ; TBranch * branch = digitTree->GetBranch("PMDDigit") ; - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; if ( ! branch ) { @@ -542,7 +537,7 @@ void AliPMDQADataMakerRec::MakeDigits(TTree * digitTree) for (Int_t ient = 0; ient < branch->GetEntries(); ient++) { branch->GetEntry(ient) ; - MakeDigits(digits) ; + MakeDigits() ; } } @@ -553,20 +548,18 @@ void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree) { // makes data from RecPoints - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; - Int_t multDdl0 = 0, multDdl1 = 0, multDdl2 = 0; Int_t multDdl3 = 0, multDdl4 = 0, multDdl5 = 0; AliPMDrecpoint1 * recpoint; - TClonesArray * recpoints = 0x0; - recpoints = new TClonesArray("AliPMDrecpoint1", 1000) ; + if (fRecPointsArray) + fRecPointsArray->Clear() ; + else + fRecPointsArray = new TClonesArray("AliPMDrecpoint1", 1000) ; TBranch * branch = clustersTree->GetBranch("PMDRecpoint") ; - branch->SetAddress(&recpoints) ; + branch->SetAddress(&fRecPointsArray) ; if ( ! branch ) { @@ -578,7 +571,7 @@ void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree) { branch->GetEntry(imod) ; - TIter next(recpoints) ; + TIter next(fRecPointsArray) ; while ( (recpoint = dynamic_cast(next())) ) { @@ -631,10 +624,6 @@ void AliPMDQADataMakerRec::MakeRecPoints(TTree * clustersTree) GetRecPointsData(6)->Fill(multDdl0,multDdl1); GetRecPointsData(7)->Fill(multDdl2,multDdl3); GetRecPointsData(8)->Fill(multDdl4,multDdl5); - - recpoints->Delete() ; - delete recpoints; - } //____________________________________________________________________________ @@ -643,10 +632,6 @@ void AliPMDQADataMakerRec::MakeESDs(AliESDEvent * esd) { // make QA data from ESDs - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; - Int_t premul = 0, cpvmul = 0; for (Int_t icl = 0; icl < esd->GetNumberOfPmdTracks(); icl++) diff --git a/PMD/AliPMDQADataMakerRec.h b/PMD/AliPMDQADataMakerRec.h index 66d98dafeb6..f10bbd32b3d 100644 --- a/PMD/AliPMDQADataMakerRec.h +++ b/PMD/AliPMDQADataMakerRec.h @@ -36,7 +36,7 @@ class AliPMDQADataMakerRec: public AliQADataMakerRec { virtual void InitRecPoints() ; virtual void InitESDs() ; virtual void MakeRaws(AliRawReader* rawReader) ; - virtual void MakeDigits(TClonesArray* digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * recpoTree) ; virtual void MakeRecPoints(TTree * recpoTree) ; virtual void MakeESDs(AliESDEvent * esd) ; diff --git a/PMD/AliPMDQADataMakerSim.cxx b/PMD/AliPMDQADataMakerSim.cxx index fa9c133977a..8bc636738b1 100644 --- a/PMD/AliPMDQADataMakerSim.cxx +++ b/PMD/AliPMDQADataMakerSim.cxx @@ -141,17 +141,13 @@ void AliPMDQADataMakerSim::InitDigits() } //____________________________________________________________________________ -void AliPMDQADataMakerSim::MakeHits(TClonesArray *hits) +void AliPMDQADataMakerSim::MakeHits() { //make QA data from Hits - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - Int_t premul = 0, cpvmul = 0; Float_t edepkev = 0.; - TIter next(hits); + TIter next(fHitsArray); AliPMDhit * hit; while ( (hit = dynamic_cast(next())) ) @@ -202,41 +198,28 @@ void AliPMDQADataMakerSim::MakeHits(TTree * hitTree) return; } - static TClonesArray statichits("AliPMDhit", 1000); - statichits.Clear(); - TClonesArray *hits = &statichits; - static TClonesArray staticdummy("AliPMDhit", 1000); - staticdummy.Clear(); - TClonesArray *dummy = &staticdummy; - branch->SetAddress(&dummy); - Int_t index = 0 ; - - for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { - branch->GetEntry(ientry) ; - for (Int_t ihit = 0 ; ihit < dummy->GetEntries() ; ihit++) { - AliPMDhit * hit = dynamic_cast (dummy->At(ihit)) ; - new((*hits)[index]) AliPMDhit(*hit) ; + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliPMDhit", 1000); - index++ ; - } - } - - MakeHits(hits); + branch->SetAddress(&fHitsArray); + for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { + branch->GetEntry(ientry) ; + MakeHits(); + fHitsArray->Clear() ; + } } //____________________________________________________________________________ -void AliPMDQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliPMDQADataMakerSim::MakeSDigits() { // makes data from SDigits - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - Int_t cpvmul = 0, premul = 0; Float_t edepkev = 0.; - TIter next(sdigits) ; + TIter next(fSDigitsArray) ; AliPMDsdigit * sdigit ; while ( (sdigit = dynamic_cast(next())) ) { @@ -264,37 +247,30 @@ void AliPMDQADataMakerSim::MakeSDigits(TTree * sdigitTree) { // makes data from SDigit Tree - TClonesArray * sdigits = new TClonesArray("AliPMDsdigit", 1000) ; + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliPMDsdigit", 1000) ; TBranch * branch = sdigitTree->GetBranch("PMDSDigit") ; - branch->SetAddress(&sdigits) ; + branch->SetAddress(&fSDigitsArray) ; - if ( ! branch ) - { - AliWarning("PMD branch in SDigit Tree not found") ; - } - else - { - for (Int_t ient = 0; ient < branch->GetEntries(); ient++) - { - branch->GetEntry(ient) ; - MakeSDigits(sdigits) ; - } + if ( ! branch ){ + AliWarning("PMD branch in SDigit Tree not found") ; + } else { + branch->GetEntry(0) ; + MakeSDigits() ; } } //____________________________________________________________________________ -void AliPMDQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliPMDQADataMakerSim::MakeDigits() { // makes data from Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; Int_t cpvmul = 0, premul = 0; - TIter next(digits) ; + TIter next(fDigitsArray) ; AliPMDdigit * digit ; while ( (digit = dynamic_cast(next())) ) { @@ -321,10 +297,13 @@ void AliPMDQADataMakerSim::MakeDigits(TTree * digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliPMDdigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliPMDdigit", 1000) ; TBranch * branch = digitTree->GetBranch("PMDDigit") ; - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; if ( ! branch ) { @@ -334,10 +313,12 @@ void AliPMDQADataMakerSim::MakeDigits(TTree * digitTree) { for (Int_t ient = 0; ient < branch->GetEntries(); ient++) { - branch->GetEntry(ient) ; - MakeDigits(digits) ; + branch->GetEntry(ient) ; + MakeDigits() ; + fDigitsArray->Clear() ; + } - + } } diff --git a/PMD/AliPMDQADataMakerSim.h b/PMD/AliPMDQADataMakerSim.h index 03ce0debb05..460be3b050e 100644 --- a/PMD/AliPMDQADataMakerSim.h +++ b/PMD/AliPMDQADataMakerSim.h @@ -34,11 +34,11 @@ private: virtual void InitSDigits(); virtual void InitDigits(); - virtual void MakeHits(TClonesArray * hits); + virtual void MakeHits(); virtual void MakeHits(TTree * hitTree) ; - virtual void MakeSDigits(TClonesArray * sigits) ; + virtual void MakeSDigits() ; virtual void MakeSDigits(TTree * sigitTree) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digitTree) ; virtual void StartOfDetectorCycle() ; virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; diff --git a/STEER/AliQACheckerBase.cxx b/STEER/AliQACheckerBase.cxx index eda65bb1f7a..f7270049f56 100644 --- a/STEER/AliQACheckerBase.cxx +++ b/STEER/AliQACheckerBase.cxx @@ -171,7 +171,7 @@ Double_t * AliQACheckerBase::Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** li for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { test[specie] = 1.0 ; - if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) + if ( !AliQAv1::Instance()->IsEventSpecieSet(specie)) continue ; if (list[specie]->GetEntries() == 0) test[specie] = 0. ; // nothing to check @@ -231,8 +231,8 @@ Double_t AliQACheckerBase::DiffC(const TH1 * href, const TH1 * hin) const Double_t AliQACheckerBase::DiffK(const TH1 * href, const TH1 * hin) const { // compares two histograms using the Kolmogorov test - if ( hin->Integral() == 0 ) { - AliDebug(AliQAv1::GetQADebugLevel(), Form("Spectrum %s is empty", hin->GetName())) ; + if ( hin->Integral() == 0 || href->Integral() == 0) { + AliDebug(AliQAv1::GetQADebugLevel(), Form("Spectrum %s or its reference is empty", hin->GetName())) ; return 0. ; } diff --git a/STEER/AliQADataMaker.cxx b/STEER/AliQADataMaker.cxx index 3d4cfd9e0c8..2b9923228dc 100644 --- a/STEER/AliQADataMaker.cxx +++ b/STEER/AliQADataMaker.cxx @@ -71,7 +71,8 @@ AliQADataMaker::AliQADataMaker(const Char_t * name, const Char_t * title) : fRun(0), fEventSpecie(AliRecoParam::kDefault), fImage(new TCanvas*[AliRecoParam::kNSpecies]), - fPrintImage(kTRUE) + fPrintImage(kTRUE), + fDigitsArray(NULL) { // ctor fDetectorDirName = GetName() ; @@ -95,8 +96,8 @@ AliQADataMaker::AliQADataMaker(const AliQADataMaker& qadm) : fRun(qadm.fRun), fEventSpecie(qadm.fEventSpecie), fImage(qadm.fImage), - fPrintImage(kTRUE) - + fPrintImage(kTRUE), + fDigitsArray(NULL) { //copy ctor fDetectorDirName = GetName() ; @@ -117,6 +118,11 @@ AliQADataMaker::~AliQADataMaker() } delete[] fImage ; delete[] fParameterList ; + + if (fDigitsArray) { + fDigitsArray->Clear() ; + delete fDigitsArray ; + } } //____________________________________________________________________________ @@ -202,6 +208,24 @@ TObject * AliQADataMaker::GetData(TObjArray ** list, const Int_t index) TH1 * histClone = NULL ; TObjArray * arr = list[esindex] ; if (arr) { + if ( ! arr->GetEntriesFast() ) { + // Initializes the histograms + TString arrName(arr->GetName()) ; + if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kRAWS))) + InitRaws() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kHITS))) + InitHits() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kSDIGITS))) + InitSDigits() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kDIGITS))) + InitDigits() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kDIGITSR))) + InitSDigits() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kRECPOINTS))) + InitRecPoints() ; + else if (arrName.Contains(AliQAv1::GetTaskName(AliQAv1::kESDS))) + InitESDs() ; + } if ( index > AliQAv1::GetMaxQAObj() ) { AliError(Form("Max number of authorized QA objects is %d", AliQAv1::GetMaxQAObj())) ; } else { @@ -221,6 +245,17 @@ TObjArray* AliQADataMaker::Init(AliQAv1::TASKINDEX_t task, AliRecoParam::EventS return ar[AliRecoParam::AConvert(es)] ; } +//____________________________________________________________________________ +Bool_t AliQADataMaker::IsValidEventSpecie(Int_t eventSpecieIndex, TObjArray ** list) +{ + // check if event specie was present in current run or + // if histograms of this event specie have been created + if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(eventSpecieIndex)) || ! list[eventSpecieIndex]->GetEntriesFast() ) + return kFALSE ; + else + return kTRUE ; +} + //____________________________________________________________________________ void AliQADataMaker::MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, const Char_t * mode) { @@ -236,7 +271,7 @@ void AliQADataMaker::MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, nImages++; } if ( nImages == 0 ) { - AliWarning(Form("No histogram will be plotted for %s %s\n", GetName(), AliQAv1::GetTaskName(task).Data())) ; + AliDebug(AliQAv1::GetQADebugLevel(), Form("No histogram will be plotted for %s %s\n", GetName(), AliQAv1::GetTaskName(task).Data())) ; } else { AliDebug(AliQAv1::GetQADebugLevel(), Form("%d histograms will be plotted for %s %s\n", nImages, GetName(), AliQAv1::GetTaskName(task).Data())) ; for (Int_t esIndex = 0 ; esIndex < AliRecoParam::kNSpecies ; esIndex++) { diff --git a/STEER/AliQADataMaker.h b/STEER/AliQADataMaker.h index 164ffa5acef..937cd184f40 100644 --- a/STEER/AliQADataMaker.h +++ b/STEER/AliQADataMaker.h @@ -67,7 +67,9 @@ public: virtual TObjArray** Init(AliQAv1::TASKINDEX_t, Int_t cycles = -1) = 0 ; TObjArray* Init(AliQAv1::TASKINDEX_t, AliRecoParam::EventSpecie_t es, Int_t cycles = -1) ; virtual void Init(AliQAv1::TASKINDEX_t, TObjArray ** list, Int_t run, Int_t cycles = -1) = 0 ; + virtual void InitRaws() = 0 ; Bool_t IsCycleDone() const { return fCycleCounter > fCycle ? kTRUE : kFALSE ; } + Bool_t IsValidEventSpecie(Int_t eventSpecieIndex, TObjArray ** list) ; virtual void MakeImage(AliQAv1::TASKINDEX_t task) = 0 ; void Reset() { fCycleCounter = 0 ; } void SetCycle(Int_t nevts) { fCycle = nevts ; } @@ -95,18 +97,17 @@ protected: virtual void InitHits() = 0 ; //virtual void InitRecParticles() = 0 ; virtual void InitRecPoints() = 0 ; - virtual void InitRaws() = 0 ; virtual void InitSDigits() = 0 ; //virtual void InitTrackSegments() = 0 ; virtual void MakeESDs(AliESDEvent * ) = 0 ; - virtual void MakeHits(TClonesArray * ) = 0 ; + virtual void MakeHits() = 0 ; virtual void MakeHits(TTree * ) = 0 ; - virtual void MakeDigits(TClonesArray * ) = 0 ; + virtual void MakeDigits() = 0 ; virtual void MakeDigits(TTree * ) = 0 ; - //virtual void MakeRecParticles(TClonesArray * ) = 0 ; + //virtual void MakeRecParticles( ) = 0 ; virtual void MakeRaws(AliRawReader *) = 0 ; virtual void MakeRecPoints(TTree * ) = 0 ; - virtual void MakeSDigits(TClonesArray * ) = 0 ; + virtual void MakeSDigits() = 0 ; virtual void MakeSDigits(TTree * ) = 0 ; //virtual void MakeTrackSegments(TTree * ) = 0 ; virtual void MakeTheImage( TObjArray ** list, AliQAv1::TASKINDEX_t task, const Char_t * mode) ; @@ -125,11 +126,13 @@ protected: AliRecoParam::EventSpecie_t fEventSpecie ; //! event specie, see AliRecoParam TCanvas ** fImage ; //[AliRecoParam::kNSpecies] Bool_t fPrintImage ; //! flag to print the images or not + TClonesArray * fDigitsArray ; //! array to hold the sdigits + private: AliQADataMaker& operator = (const AliQADataMaker& /*qadm*/); // Not implemented - ClassDef(AliQADataMaker,2) // description + ClassDef(AliQADataMaker,3) // description }; diff --git a/STEER/AliQADataMakerRec.cxx b/STEER/AliQADataMakerRec.cxx index 3f5bbb0355c..b5a9b593d9a 100644 --- a/STEER/AliQADataMakerRec.cxx +++ b/STEER/AliQADataMakerRec.cxx @@ -53,7 +53,8 @@ AliQADataMakerRec::AliQADataMakerRec(const char * name, const char * title) : fRawsQAList(NULL), fRecPointsQAList(NULL), fCorrNt(NULL), - fRecoParam(NULL) + fRecoParam(NULL), + fRecPointsArray(NULL) { // ctor fDetectorDirName = GetName() ; @@ -67,7 +68,8 @@ AliQADataMakerRec::AliQADataMakerRec(const AliQADataMakerRec& qadm) : fRawsQAList(qadm.fRawsQAList), fRecPointsQAList(qadm.fRecPointsQAList), fCorrNt(qadm.fCorrNt), - fRecoParam(qadm.fRecoParam) + fRecoParam(qadm.fRecoParam), + fRecPointsArray(NULL) { //copy ctor SetName(qadm.GetName()) ; @@ -115,6 +117,10 @@ AliQADataMakerRec::~AliQADataMakerRec() } delete[] fRecPointsQAList ; } + if (fRecPointsArray) { + fRecPointsArray->Clear() ; + delete fRecPointsArray ; + } } //__________________________________________________________________ @@ -165,8 +171,8 @@ void AliQADataMakerRec::EndOfCycle(AliQAv1::TASKINDEX_t task) if (!subDir) subDir = fDetectorDir->mkdir(AliQAv1::GetTaskName(task)) ; subDir->cd() ; - for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { // skip Default + if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) || AliRecoParam::ConvertIndex(specie) == AliRecoParam::kDefault) continue ; TDirectory * eventSpecieDir = subDir->GetDirectory(AliRecoParam::GetEventSpecieName(specie)) ; if (!eventSpecieDir) diff --git a/STEER/AliQADataMakerRec.h b/STEER/AliQADataMakerRec.h index fd67aaa67b3..112424eb618 100644 --- a/STEER/AliQADataMakerRec.h +++ b/STEER/AliQADataMakerRec.h @@ -50,13 +50,14 @@ public: virtual TH1 * GetESDsData(const Int_t index) { return dynamic_cast(GetData(fESDsQAList, index)) ; } virtual TH1 * GetHitsData(const Int_t /*index*/) { return NULL ; } virtual const AliDetectorRecoParam * GetRecoParam() { return fRecoParam ; } - + virtual TH1 * GetRecPointsData(const Int_t index) { return dynamic_cast(GetData(fRecPointsQAList, index)) ; } virtual TH1 * GetRawsData(const Int_t index) { return dynamic_cast(GetData(fRawsQAList, index)) ; } virtual TH1 * GetSDigitsData(const Int_t /*index*/) { return NULL ; } virtual void MakeImage(AliQAv1::TASKINDEX_t task) ; virtual TObjArray** Init(AliQAv1::TASKINDEX_t task, Int_t cycles = -1) ; virtual void Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ; + virtual void InitRaws() {AliInfo("To be implemented by detectors");} virtual void StartOfCycle(Int_t run = -1) ; virtual void StartOfCycle(AliQAv1::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ; virtual void SetRecoParam(const AliDetectorRecoParam *param) { fRecoParam = param; } @@ -69,18 +70,17 @@ protected: virtual void InitHits() {AliWarning("Call not valid") ; } //virtual void InitRecParticles() {AliInfo("To be implemented by detectors");} virtual void InitRecPoints() {AliInfo("To be implemented by detectors");} - virtual void InitRaws() {AliInfo("To be implemented by detectors");} virtual void InitSDigits() {AliWarning("Call not valid") ; } //virtual void InitTrackSegments() {AliInfo("To ne implemented by detectors");} virtual void MakeESDs(AliESDEvent * ) {AliInfo("To be implemented by detectors");} - virtual void MakeHits(TClonesArray * ) {AliWarning("Call not valid") ; } + virtual void MakeHits() {AliWarning("Call not valid") ; } virtual void MakeHits(TTree * ) {AliWarning("Call not valid") ; } - virtual void MakeDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");} + virtual void MakeDigits() {AliInfo("To be implemented by detectors");} virtual void MakeDigits(TTree * ) {AliInfo("To be implemented by detectors");} - //virtual void MakeRecParticles(TClonesArray * ) {AliInfo("To be implemented by detectors");} + //virtual void MakeRecParticles() {AliInfo("To be implemented by detectors");} virtual void MakeRaws(AliRawReader *) {AliInfo("To be implemented by detectors");} virtual void MakeRecPoints(TTree * ) {AliInfo("To be implemented by detectors");} - virtual void MakeSDigits(TClonesArray * ) {AliWarning("Call not valid") ; } + virtual void MakeSDigits() {AliWarning("Call not valid") ; } virtual void MakeSDigits(TTree * ) {AliWarning("Call not valid") ; } virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");} @@ -88,8 +88,9 @@ protected: TObjArray * * fESDsQAList ; //! list of the ESDs QA data objects TObjArray * * fRawsQAList ; //! list of the raws QA data objects TObjArray * * fRecPointsQAList ; //! list of the RecPoints QA data objects - TNtupleD ** fCorrNt ; //! This is used by Corr only to hold its Ntuple. + TNtupleD ** fCorrNt ; //! This is used by Corr only to hold its Ntuple. const AliDetectorRecoParam *fRecoParam; //! const pointer to the reco parameters to be used in the reco QA + TClonesArray * fRecPointsArray; //! Array that contains the RecPoints ClassDef(AliQADataMakerRec,4) // description diff --git a/STEER/AliQADataMakerSim.cxx b/STEER/AliQADataMakerSim.cxx index f7ffa1adc58..76fbdae4e8c 100644 --- a/STEER/AliQADataMakerSim.cxx +++ b/STEER/AliQADataMakerSim.cxx @@ -42,7 +42,9 @@ AliQADataMakerSim::AliQADataMakerSim(const char * name, const char * title) : AliQADataMaker(name, title), fDigitsQAList(NULL), fHitsQAList(NULL), - fSDigitsQAList(NULL) + fSDigitsQAList(NULL), + fHitsArray(NULL), + fSDigitsArray(NULL) { // ctor fDetectorDirName = GetName() ; @@ -53,7 +55,9 @@ AliQADataMakerSim::AliQADataMakerSim(const AliQADataMakerSim& qadm) : AliQADataMaker(qadm.GetName(), qadm.GetTitle()), fDigitsQAList(qadm.fDigitsQAList), fHitsQAList(qadm.fHitsQAList), - fSDigitsQAList(qadm.fSDigitsQAList) + fSDigitsQAList(qadm.fSDigitsQAList), + fHitsArray(NULL), + fSDigitsArray(NULL) { //copy ctor fDetectorDirName = GetName() ; @@ -84,6 +88,14 @@ AliQADataMakerSim::~AliQADataMakerSim() } delete[] fSDigitsQAList ; } + if (fHitsArray) { + fHitsArray->Clear() ; + delete fHitsArray ; + } + if (fSDigitsArray) { + fSDigitsArray->Clear() ; + delete fSDigitsArray ; + } } //__________________________________________________________________ @@ -167,8 +179,8 @@ void AliQADataMakerSim::Exec(AliQAv1::TASKINDEX_t task, TObject * data) if ( task == AliQAv1::kHITS ) { AliDebug(AliQAv1::GetQADebugLevel(), "Processing Hits QA") ; if (strcmp(data->ClassName(), "TClonesArray") == 0) { - TClonesArray * arr = static_cast(data) ; - MakeHits(arr) ; + fHitsArray = static_cast(data) ; + MakeHits() ; } else if (strcmp(data->ClassName(), "TTree") == 0) { TTree * tree = static_cast(data) ; MakeHits(tree) ; @@ -178,8 +190,8 @@ void AliQADataMakerSim::Exec(AliQAv1::TASKINDEX_t task, TObject * data) } else if ( task == AliQAv1::kSDIGITS ) { AliDebug(AliQAv1::GetQADebugLevel(), "Processing SDigits QA") ; if (strcmp(data->ClassName(), "TClonesArray") == 0) { - TClonesArray * arr = static_cast(data) ; - MakeSDigits(arr) ; + fSDigitsArray = static_cast(data) ; + MakeSDigits() ; } else if (strcmp(data->ClassName(), "TTree") == 0) { TTree * tree = static_cast(data) ; MakeSDigits(tree) ; @@ -189,8 +201,8 @@ void AliQADataMakerSim::Exec(AliQAv1::TASKINDEX_t task, TObject * data) } else if ( task == AliQAv1::kDIGITS ) { AliDebug(AliQAv1::GetQADebugLevel(), "Processing Digits QA") ; if (strcmp(data->ClassName(), "TClonesArray") == 0) { - TClonesArray * arr = static_cast(data) ; - MakeDigits(arr) ; + fDigitsArray = static_cast(data) ; + MakeDigits() ; } else if (strcmp(data->ClassName(), "TTree") == 0) { TTree * tree = static_cast(data) ; MakeDigits(tree) ; diff --git a/STEER/AliQADataMakerSim.h b/STEER/AliQADataMakerSim.h index d389e5eb751..3b3d2f5ade7 100644 --- a/STEER/AliQADataMakerSim.h +++ b/STEER/AliQADataMakerSim.h @@ -53,6 +53,7 @@ public: virtual TH1 * GetSDigitsData(const Int_t index) { return dynamic_cast(GetData(fSDigitsQAList, index)) ; } virtual TObjArray** Init(AliQAv1::TASKINDEX_t task, Int_t cycles = -1) ; virtual void Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t run, Int_t cycles = -1) ; + virtual void InitRaws() {AliWarning("Call not valid") ; } virtual void MakeImage(AliQAv1::TASKINDEX_t task) ; virtual void StartOfCycle(Int_t run = -1) ; virtual void StartOfCycle(AliQAv1::TASKINDEX_t task, Int_t run, const Bool_t sameCycle = kFALSE) ; @@ -63,24 +64,26 @@ protected: virtual void InitESDs() {AliWarning("Call not valid") ; } virtual void InitHits() {AliInfo("To be implemented by detectors");} virtual void InitRecPoints() {AliWarning("Call not valid") ; } - virtual void InitRaws() {AliWarning("Call not valid") ; } virtual void InitSDigits() {AliInfo("To be implemented by detectors");} virtual void MakeESDs(AliESDEvent * ) {AliWarning("Call not valid") ; } - virtual void MakeHits(TClonesArray * ) {AliInfo("To be implemented by detectors");} + virtual void MakeHits() {AliInfo("To be implemented by detectors");} virtual void MakeHits(TTree * ) {AliInfo("To be implemented by detectors");} - virtual void MakeDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");} + virtual void MakeDigits() {AliInfo("To be implemented by detectors");} virtual void MakeDigits(TTree * ) {AliInfo("To be implemented by detectors");} virtual void MakeRaws(AliRawReader *) {AliWarning("Call not valid") ; } virtual void MakeRecPoints(TTree * ) {AliWarning("Call not valid") ; } - virtual void MakeSDigits(TClonesArray * ) {AliInfo("To be implemented by detectors");} + virtual void MakeSDigits() {AliInfo("To be implemented by detectors");} virtual void MakeSDigits(TTree * ) {AliInfo("To be implemented by detectors");} virtual void StartOfDetectorCycle() {AliInfo("To be implemented by detectors");} TObjArray * * fDigitsQAList ; //! list of the digits QA data objects TObjArray * * fHitsQAList ; //! list of the hits QA data objects TObjArray * * fSDigitsQAList ; //! list of the sdigits QA data objects + TClonesArray * fHitsArray ; //! array to hold the hits + TClonesArray * fSDigitsArray ; //! array to hold the digits + - ClassDef(AliQADataMakerSim,1) // description + ClassDef(AliQADataMakerSim,2) // description }; diff --git a/STEER/AliQAManager.cxx b/STEER/AliQAManager.cxx index b68be818ab2..323674e5df2 100644 --- a/STEER/AliQAManager.cxx +++ b/STEER/AliQAManager.cxx @@ -471,7 +471,7 @@ AliQADataMaker * AliQAManager::GetQADataMaker(const Int_t iDet) if ( AliRecoParam::Convert(qadm->GetRecoParam()->GetEventSpecie()) != AliRecoParam::kDefault) qadm->SetEventSpecie(qadm->GetRecoParam()->GetEventSpecie()) ; - } else if ( iDet != AliQAv1::kCORR ) { + } else if ( iDet < AliQAv1::kHLT ) { // load the QA data maker object TPluginManager* pluginManager = gROOT->GetPluginManager() ; diff --git a/STEER/AliQAv1.cxx b/STEER/AliQAv1.cxx index 7ac6f47f651..572b9ebe2b0 100644 --- a/STEER/AliQAv1.cxx +++ b/STEER/AliQAv1.cxx @@ -75,7 +75,7 @@ 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 TString AliQAv1::fImageFileFormat = "pdf" ; const UShort_t AliQAv1::fgkMaxQAObjects = 10000 ; //____________________________________________________________________________ diff --git a/STEER/AliQAv1.h b/STEER/AliQAv1.h index fb0bb1767fa..4cc9d6b8b8a 100644 --- a/STEER/AliQAv1.h +++ b/STEER/AliQAv1.h @@ -90,7 +90,7 @@ public: void Set(QABIT_t bit, AliRecoParam::EventSpecie_t es) ; void Set(QABIT_t bit, Int_t es) ; void SetEventSpecie(AliRecoParam::EventSpecie_t es) - {Int_t ibit=0; while(es!=1<SetRecoParam(par); if (fRunQA) { AliQAManager::QAManager()->SetRecoParam(iDet, par) ; + AliQAManager::QAManager()->SetEventSpecie(AliRecoParam::Convert(par->GetEventSpecie())) ; } } } diff --git a/T0/AliT0QADataMakerRec.cxx b/T0/AliT0QADataMakerRec.cxx index a57e8561560..19bda4c13f5 100644 --- a/T0/AliT0QADataMakerRec.cxx +++ b/T0/AliT0QADataMakerRec.cxx @@ -87,9 +87,9 @@ void AliT0QADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArra // do the QA checking AliQAChecker::Instance()->Run(AliQAv1::kT0, task, list) ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, list)) continue ; - SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; + SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; if ( task == AliQAv1::kRAWS ) { const Char_t *triggers[6] = {"mean", "vertex","ORA","ORC","central","semi-central"}; for (Int_t itr=0; itr<6; itr++) { @@ -283,10 +283,6 @@ void AliT0QADataMakerRec::InitESDs() //____________________________________________________________________________ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader) { - - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; rawReader->Reset() ; //fills QA histos for RAW @@ -419,10 +415,6 @@ void AliT0QADataMakerRec::MakeRaws( AliRawReader* rawReader) void AliT0QADataMakerRec::MakeDigits( TTree *digitsTree) { //fills QA histos for Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; TArrayI *digCFD = new TArrayI(24); TArrayI *digLED = new TArrayI(24); @@ -480,10 +472,6 @@ void AliT0QADataMakerRec::MakeRecPoints(TTree * clustersTree) AliError(Form("EXEC Branch T0 rec not found ")); return; } - - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; brRec->GetEntry(0); @@ -504,10 +492,6 @@ void AliT0QADataMakerRec::MakeESDs(AliESDEvent * esd) { //fills QA histos for ESD - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; - GetESDsData(0) -> Fill(esd->GetT0()); GetESDsData(1)-> Fill(esd->GetT0zVertex()); diff --git a/T0/AliT0QADataMakerRec.h b/T0/AliT0QADataMakerRec.h index 1085ca2b5d4..5cb0180fcec 100644 --- a/T0/AliT0QADataMakerRec.h +++ b/T0/AliT0QADataMakerRec.h @@ -37,7 +37,7 @@ private: virtual void InitESDs() ; //book ESD QA histo virtual void MakeRaws(AliRawReader* rawReader) ; virtual void MakeRecPoints(TTree * clusters) ; //Fill cluster QA histo - virtual void MakeDigits(TClonesArray * /*digits*/) {;} + virtual void MakeDigits() {;} virtual void MakeDigits(TTree * digTree); virtual void MakeESDs(AliESDEvent * esd) ; //Fill hit QA histo virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; diff --git a/T0/AliT0QADataMakerSim.cxx b/T0/AliT0QADataMakerSim.cxx index 655eb2e99bc..d6eb86cb1a6 100644 --- a/T0/AliT0QADataMakerSim.cxx +++ b/T0/AliT0QADataMakerSim.cxx @@ -131,7 +131,10 @@ void AliT0QADataMakerSim::InitDigits() void AliT0QADataMakerSim::MakeHits(TTree *hitTree) { //fills QA histos for Hits - TClonesArray * hits = new TClonesArray("AliT0hit", 1000); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliT0hit", 1000); TBranch * branch = hitTree->GetBranch("T0") ; if ( ! branch ) { @@ -139,7 +142,7 @@ void AliT0QADataMakerSim::MakeHits(TTree *hitTree) } else { if (branch) { - branch->SetAddress(&hits); + branch->SetAddress(&fHitsArray); }else{ AliError("Branch T0 hit not found"); exit(111); @@ -149,16 +152,12 @@ void AliT0QADataMakerSim::MakeHits(TTree *hitTree) if (ntracks<=0) return; // Start loop on tracks in the hits containers - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - for (Int_t track=0; trackGetEntry(track); - Int_t nhits = hits->GetEntriesFast(); + Int_t nhits = fHitsArray->GetEntriesFast(); for (Int_t ihit=0;ihitUncheckedAt(ihit); + AliT0hit * startHit = (AliT0hit*) fHitsArray->UncheckedAt(ihit); if (!startHit) { AliError("The unchecked hit doesn't exist"); continue; @@ -192,10 +191,6 @@ void AliT0QADataMakerSim::MakeDigits( TTree *digitsTree) return; } - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - digitsTree->GetEvent(0); digitsTree->GetEntry(0); brDigits->GetEntry(0); diff --git a/T0/AliT0QADataMakerSim.h b/T0/AliT0QADataMakerSim.h index b1adf8092c7..08bc9fc0c07 100644 --- a/T0/AliT0QADataMakerSim.h +++ b/T0/AliT0QADataMakerSim.h @@ -34,9 +34,9 @@ private: virtual void InitHits() ; //book hit QA histo virtual void InitDigits() ; //book Digit QA histo virtual void MakeHits(TTree * hits) ; //Fill hit QA histo - virtual void MakeHits(TClonesArray *) {} //Dummy for the moment + virtual void MakeHits() {} //Dummy for the moment virtual void MakeDigits(TTree* digitsTree) ; //Fill Digit QA histo - virtual void MakeDigits(TClonesArray *) {} //Dummy for the moment + virtual void MakeDigits() {} //Dummy for the moment virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; virtual void StartOfDetectorCycle() ; ClassDef(AliT0QADataMakerSim,1) // description diff --git a/TOF/AliTOFQADataMakerRec.cxx b/TOF/AliTOFQADataMakerRec.cxx index 0da99374cd3..574756913f0 100644 --- a/TOF/AliTOFQADataMakerRec.cxx +++ b/TOF/AliTOFQADataMakerRec.cxx @@ -200,10 +200,6 @@ void AliTOFQADataMakerRec::MakeRaws(AliRawReader* rawReader) // makes data from Raws // - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; - Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3; Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3; @@ -250,7 +246,7 @@ void AliTOFQADataMakerRec::MakeRaws(AliRawReader* rawReader) } //____________________________________________________________________________ -void AliTOFQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliTOFQADataMakerRec::MakeDigits() { // // makes data from Digits @@ -261,14 +257,14 @@ void AliTOFQADataMakerRec::MakeDigits(TClonesArray * digits) Int_t in[5]; Int_t out[5]; - Int_t nentries=digits->GetEntriesFast(); + Int_t nentries=fDigitsArray->GetEntriesFast(); if(nentries<=0){ GetDigitsData(0)->Fill(-1.) ; }else{ GetDigitsData(0)->Fill(TMath::Log10(nentries)) ; } - TIter next(digits) ; + TIter next(fDigitsArray) ; AliTOFdigit * digit ; while ( (digit = dynamic_cast(next())) ) { @@ -291,20 +287,20 @@ void AliTOFQADataMakerRec::MakeDigits(TTree * digitTree) // // makes data from Digit Tree // - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - TClonesArray * digits = new TClonesArray("AliTOFdigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliTOFdigit", 1000) ; TBranch * branch = digitTree->GetBranch("TOF") ; if ( ! branch ) { AliError("TOF branch in Digit Tree not found") ; return; } - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } //____________________________________________________________________________ @@ -313,11 +309,7 @@ void AliTOFQADataMakerRec::MakeRecPoints(TTree * clustersTree) // // Make data from Clusters // - - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; - + Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3; Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3; @@ -370,9 +362,6 @@ void AliTOFQADataMakerRec::MakeESDs(AliESDEvent * esd) // // make QA data from ESDs // - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; Int_t ntrk = esd->GetNumberOfTracks() ; Int_t ntof=0; diff --git a/TOF/AliTOFQADataMakerRec.h b/TOF/AliTOFQADataMakerRec.h index d67e82e72d4..913e862ee94 100644 --- a/TOF/AliTOFQADataMakerRec.h +++ b/TOF/AliTOFQADataMakerRec.h @@ -29,7 +29,7 @@ private: virtual void MakeESDs(AliESDEvent * esd) ; virtual void MakeRecPoints(TTree * recTree) ; virtual void MakeDigits(TTree * recTree) ; - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeRaws(AliRawReader* rawReader) ; virtual void StartOfDetectorCycle() ; virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) ; diff --git a/TOF/AliTOFQADataMakerSim.cxx b/TOF/AliTOFQADataMakerSim.cxx index 9715bf363cc..98e4e10a79e 100644 --- a/TOF/AliTOFQADataMakerSim.cxx +++ b/TOF/AliTOFQADataMakerSim.cxx @@ -155,26 +155,22 @@ void AliTOFQADataMakerSim::InitSDigits() } //____________________________________________________________________________ -void AliTOFQADataMakerSim::MakeHits(TClonesArray * hits) +void AliTOFQADataMakerSim::MakeHits() { // //make QA data from Hits // - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - Int_t in[5]; Int_t out[5]; - Int_t nentries=hits->GetEntriesFast(); + Int_t nentries= fHitsArray->GetEntriesFast(); if(nentries<=0) { GetHitsData(0)->Fill(-1.) ; } else{ GetHitsData(0)->Fill(TMath::Log10(nentries)) ; } - TIter next(hits) ; + TIter next(fHitsArray) ; AliTOFhitT0 * hit ; while ( (hit = dynamic_cast(next())) ) { @@ -189,7 +185,6 @@ void AliTOFQADataMakerSim::MakeHits(TClonesArray * hits) GetMapIndeces(in,out); GetHitsData(3)->Fill( out[0],out[1]) ;//hit map } - } @@ -211,51 +206,39 @@ void AliTOFQADataMakerSim::MakeHits(TTree * hitTree) return; } - static TClonesArray statichits("AliTOFhitT0", 1000); - statichits.Clear(); - TClonesArray *hits = &statichits; - static TClonesArray staticdummy("AliTOFhitT0", 1000); - staticdummy.Clear(); - TClonesArray *dummy = &staticdummy; - branch->SetAddress(&dummy); - Int_t index = 0 ; + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliTOFhitT0", 1000) ; + + branch->SetAddress(&fHitsArray); for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) { branch->GetEntry(ientry) ; - for (Int_t ihit = 0 ; ihit < dummy->GetEntries() ; ihit++) { - AliTOFhitT0 * hit = dynamic_cast (dummy->At(ihit)) ; - new((*hits)[index]) AliTOFhitT0(*hit) ; - index++ ; - } + MakeHits() ; + fHitsArray->Clear() ; } - - MakeHits(hits) ; - } //____________________________________________________________________________ -void AliTOFQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliTOFQADataMakerSim::MakeDigits() { // // makes data from Digits // - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3; Double_t tot2ns=AliTOFGeometry::ToTBinWidth()*1E-3; Int_t in[5]; Int_t out[5]; - Int_t nentries=digits->GetEntriesFast(); + Int_t nentries=fDigitsArray->GetEntriesFast(); if(nentries<=0){ GetDigitsData(0)->Fill(-1.) ; }else{ GetDigitsData(0)->Fill(TMath::Log10(nentries)) ; } - TIter next(digits) ; + TIter next(fDigitsArray) ; AliTOFdigit * digit ; while ( (digit = dynamic_cast(next())) ) { @@ -280,41 +263,40 @@ void AliTOFQADataMakerSim::MakeDigits(TTree * digitTree) // // makes data from Digit Tree // - TClonesArray * digits = new TClonesArray("AliTOFdigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliTOFdigit", 1000) ; TBranch * branch = digitTree->GetBranch("TOF") ; if ( ! branch ) { AliError("TOF branch in Digit Tree not found") ; return; } - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } //____________________________________________________________________________ -void AliTOFQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliTOFQADataMakerSim::MakeSDigits() { // // makes data from SDigits // - - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; Double_t tdc2ns=AliTOFGeometry::TdcBinWidth()*1E-3; Int_t in[5]; Int_t out[5]; - Int_t nentries=sdigits->GetEntriesFast(); + Int_t nentries=fSDigitsArray->GetEntriesFast(); if(nentries<=0){ GetSDigitsData(0)->Fill(-1.) ; }else{ GetSDigitsData(0)->Fill(TMath::Log10(nentries)) ; } - TIter next(sdigits) ; + TIter next(fSDigitsArray) ; AliTOFSDigit * sdigit ; while ( (sdigit = dynamic_cast(next())) ) { @@ -338,16 +320,19 @@ void AliTOFQADataMakerSim::MakeSDigits(TTree * sdigitTree) // // makes data from SDigit Tree // - TClonesArray * sdigits = new TClonesArray("AliTOFSDigit", 1000) ; + if (fSDigitsArray) + fSDigitsArray->Clear() ; + else + fSDigitsArray = new TClonesArray("AliTOFSDigit", 1000) ; TBranch * branch = sdigitTree->GetBranch("TOF") ; if ( ! branch ) { AliError("TOF branch in SDigit Tree not found") ; return; } - branch->SetAddress(&sdigits) ; + branch->SetAddress(&fSDigitsArray) ; branch->GetEntry(0) ; - MakeSDigits(sdigits) ; + MakeSDigits() ; } //____________________________________________________________________________ diff --git a/TOF/AliTOFQADataMakerSim.h b/TOF/AliTOFQADataMakerSim.h index ca83267093f..03bda3bc2f0 100644 --- a/TOF/AliTOFQADataMakerSim.h +++ b/TOF/AliTOFQADataMakerSim.h @@ -25,11 +25,11 @@ private: virtual void InitHits() ; virtual void InitDigits() ; virtual void InitSDigits() ; - virtual void MakeHits(TClonesArray * hits) ; + virtual void MakeHits() ; virtual void MakeHits(TTree * hitTree); - virtual void MakeDigits(TClonesArray * digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree * digTree); - virtual void MakeSDigits(TClonesArray * sdigits) ; + virtual void MakeSDigits() ; virtual void MakeSDigits(TTree * sdigTree); virtual void StartOfDetectorCycle() ; virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) ; diff --git a/TPC/AliTPCQADataMakerRec.cxx b/TPC/AliTPCQADataMakerRec.cxx index 9f805784e2b..6d9c19e4436 100644 --- a/TPC/AliTPCQADataMakerRec.cxx +++ b/TPC/AliTPCQADataMakerRec.cxx @@ -378,10 +378,6 @@ void AliTPCQADataMakerRec::MakeESDs(AliESDEvent * esd) { // make QA data from ESDs - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(KClusters) ) - InitESDs() ; - const Int_t nESDTracks = esd->GetNumberOfTracks(); Int_t nTPCtracks = 0; for(Int_t i = 0; i < nESDTracks; i++) { @@ -409,21 +405,19 @@ void AliTPCQADataMakerRec::MakeRaws(AliRawReader* rawReader) // To make QA for the RAW data we use the TPC Calibration framework // to handle the data and then in the end extract the data // - if ( ! GetRawsData(kOccupancy) ) - InitRaws() ; rawReader->Reset() ; - fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)]->ProcessEvent(rawReader); - } + if (! fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)] ) { + AliError("Something unexpected here!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") ; + } else { + fTPCdataQA[AliRecoParam::AConvert(fEventSpecie)]->ProcessEvent(rawReader); + } +} //____________________________________________________________________________ void AliTPCQADataMakerRec::MakeDigits(TTree* digitTree) { - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(kDigitsADC) ) - InitDigits() ; - + TBranch* branch = digitTree->GetBranch("Segment"); AliSimDigits* digArray = 0; branch->SetAddress(&digArray); @@ -446,9 +440,6 @@ void AliTPCQADataMakerRec::MakeDigits(TTree* digitTree) //____________________________________________________________________________ void AliTPCQADataMakerRec::MakeRecPoints(TTree* recTree) { - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(kQmaxShort) ) - InitRecPoints() ; AliTPCClustersRow *clrow = new AliTPCClustersRow(); clrow->SetClass("AliTPCclusterMI"); diff --git a/TPC/AliTPCQADataMakerRec.h b/TPC/AliTPCQADataMakerRec.h index 07f139322af..19b7f89f36f 100644 --- a/TPC/AliTPCQADataMakerRec.h +++ b/TPC/AliTPCQADataMakerRec.h @@ -53,7 +53,7 @@ private: // Digits QA virtual void InitDigits(); - virtual void MakeDigits(TClonesArray* /*digits*/) {return;} + virtual void MakeDigits() {return;} virtual void MakeDigits(TTree *digTree); // RecPoints QA diff --git a/TPC/AliTPCQADataMakerSim.cxx b/TPC/AliTPCQADataMakerSim.cxx index 194e186a9da..9fcd7f77b9b 100644 --- a/TPC/AliTPCQADataMakerSim.cxx +++ b/TPC/AliTPCQADataMakerSim.cxx @@ -136,9 +136,6 @@ void AliTPCQADataMakerSim::InitHits() //____________________________________________________________________________ void AliTPCQADataMakerSim::MakeDigits(TTree* digitTree) { - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(kDigitsADC) ) - InitDigits() ; TBranch* branch = digitTree->GetBranch("Segment"); AliSimDigits* digArray = 0; @@ -164,10 +161,6 @@ void AliTPCQADataMakerSim::MakeHits(TTree * hitTree) { // make QA data from Hit Tree - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(kNhits) ) - InitHits() ; - const Int_t nTracks = hitTree->GetEntries(); TBranch* branch = hitTree->GetBranch("TPC2"); AliTPCv2* tpc = (AliTPCv2*)gAlice->GetDetector("TPC"); diff --git a/TPC/AliTPCQADataMakerSim.h b/TPC/AliTPCQADataMakerSim.h index bce2afb67c0..26ab0e82bba 100644 --- a/TPC/AliTPCQADataMakerSim.h +++ b/TPC/AliTPCQADataMakerSim.h @@ -44,17 +44,17 @@ private: // Digits QA virtual void InitDigits(); virtual void MakeDigits(TTree *digitTree); - virtual void MakeDigits(TClonesArray *) {AliWarning("Method not implemented\n");} + virtual void MakeDigits() {AliWarning("Method not implemented\n");} // Hits QA virtual void InitHits(); virtual void MakeHits(TTree *hitTree); - virtual void MakeHits(TClonesArray *) {AliWarning("Method not implemented\n");} + virtual void MakeHits() {AliWarning("Method not implemented\n");} // SDigits QA (empty) virtual void InitSDigits() {} virtual void MakeSDigits(TTree* ) {AliWarning("Method not implemented\n");} - virtual void MakeSDigits(TClonesArray* ) {AliWarning("Method not implemented\n");} + virtual void MakeSDigits() {AliWarning("Method not implemented\n");} ClassDef(AliTPCQADataMakerSim,1) // TPC Sim Quality Assurance Data Maker }; diff --git a/TRD/AliTRDQADataMakerRec.cxx b/TRD/AliTRDQADataMakerRec.cxx index 9dd3849cb42..db41f6dc035 100644 --- a/TRD/AliTRDQADataMakerRec.cxx +++ b/TRD/AliTRDQADataMakerRec.cxx @@ -100,9 +100,9 @@ void AliTRDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr // loop over event types for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, list)) continue ; - //list[specie]->Print(); + //list[specie]->Print(); // fill detector map; for(Int_t i = 0 ; i < 540 ; i++) { @@ -230,9 +230,9 @@ void AliTRDQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArr // create ratios for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, list)) continue ; - for(Int_t type = 0 ; type < 2 ; type++) { + for(Int_t type = 0 ; type < 2 ; type++) { for(Int_t i = 0 ; i < knRatio ; i++) { TH1D *ratio = (TH1D*)list[specie]->At(19 + 2*i + type); TH1D *histN = (TH1D*)list[specie]->At(3 + 2*kN[i] + type); @@ -496,10 +496,6 @@ void AliTRDQADataMakerRec::MakeESDs(AliESDEvent * esd) // // Make QA data from ESDs // - - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(0) ) - InitESDs() ; Int_t nTracks = esd->GetNumberOfTracks(); GetESDsData(0)->Fill(nTracks); @@ -700,11 +696,7 @@ void AliTRDQADataMakerRec::MakeRaws(AliRawReader* rawReader) // AliInfo("Execution of QA for Raw data"); - - // Check id histograms already created for this Event Specie - if ( ! GetRawsData(0) ) - InitRaws() ; - + //printf("Execution of QA for Raw data\n"); // create raw reader TB @@ -867,11 +859,7 @@ void AliTRDQADataMakerRec::MakeRecPoints(TTree * clustersTree) // // Info("MakeRecPoints", "making"); - - // Check id histograms already created for this Event Specie - if ( ! GetRecPointsData(0) ) - InitRecPoints() ; - + Int_t nsize = Int_t(clustersTree->GetTotBytes() / (sizeof(AliTRDcluster))); TObjArray *clusterArray = new TObjArray(nsize+1000); diff --git a/TRD/AliTRDQADataMakerSim.cxx b/TRD/AliTRDQADataMakerSim.cxx index 3e5a3b2d3c5..5501c33484c 100644 --- a/TRD/AliTRDQADataMakerSim.cxx +++ b/TRD/AliTRDQADataMakerSim.cxx @@ -55,7 +55,8 @@ ClassImp(AliTRDQADataMakerSim) //____________________________________________________________________________ AliTRDQADataMakerSim::AliTRDQADataMakerSim() : - AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kTRD), "TRD Quality Assurance Data Maker") + AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kTRD), "TRD Quality Assurance Data Maker"), + fTmpHits(NULL) { // // Default constructor @@ -63,7 +64,8 @@ ClassImp(AliTRDQADataMakerSim) //____________________________________________________________________________ AliTRDQADataMakerSim::AliTRDQADataMakerSim(const AliTRDQADataMakerSim& qadm) : - AliQADataMakerSim() + AliQADataMakerSim(), + fTmpHits(NULL) { // // Copy constructor @@ -87,6 +89,15 @@ AliTRDQADataMakerSim& AliTRDQADataMakerSim::operator=(const AliTRDQADataMakerSim } +//____________________________________________________________________________ +AliTRDQADataMakerSim::~AliTRDQADataMakerSim() +{ + if (fTmpHits) { + fTmpHits->Clear() ; + delete fTmpHits ; + } +} + //____________________________________________________________________________ void AliTRDQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list) { @@ -174,17 +185,13 @@ void AliTRDQADataMakerSim::InitSDigits() } //____________________________________________________________________________ -void AliTRDQADataMakerSim::MakeHits(TClonesArray * hits) +void AliTRDQADataMakerSim::MakeHits() { // // Make QA data from Hits // - - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - - TIter next(hits); + + TIter next(fHitsArray); AliTRDhit * hit; while ( (hit = dynamic_cast(next())) ) { @@ -211,41 +218,31 @@ void AliTRDQADataMakerSim::MakeHits(TTree * hitTree) if (!CheckPointer(branch, "TRD hits branch")) return; Int_t nhits = (Int_t)(hitTree->GetTotBytes()/sizeof(AliTRDhit)); - TClonesArray *hits = new TClonesArray("AliTRDhit", nhits+1000); - TClonesArray *tmp = new TClonesArray("AliTRDhit", 1000); - branch->SetAddress(&tmp); - + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliTRDhit", nhits+1000); + Int_t index = 0; Int_t nEntries = (Int_t)branch->GetEntries(); for(Int_t i = 0; i < nEntries; i++) { branch->GetEntry(i); - Int_t nHits = (Int_t)tmp->GetEntries(); - for(Int_t j=0; jAt(j); - new((*hits)[index++]) AliTRDhit(*hit); - } + MakeHits(); + fHitsArray->Clear() ; } - - tmp->Delete(); - delete tmp; - MakeHits(hits); - hits->Delete(); - delete hits; - } //____________________________________________________________________________ -void AliTRDQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliTRDQADataMakerSim::MakeDigits() { // // Makes data from Digits // - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; + if (!fDigitsArray) + return ; - TIter next(digits) ; + TIter next(fDigitsArray) ; AliTRDdigit * digit ; // Info("Make digits", "From the arrya"); @@ -265,9 +262,6 @@ void AliTRDQADataMakerSim::MakeDigits(TTree * digits) // // Makes data from digits tree // - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; // Info("Make digits", "From a tree"); AliTRDdigitsManager *digitsManager = new AliTRDdigitsManager(); @@ -311,17 +305,16 @@ void AliTRDQADataMakerSim::MakeDigits(TTree * digits) } //____________________________________________________________________________ -void AliTRDQADataMakerSim::MakeSDigits(TClonesArray * sdigits) +void AliTRDQADataMakerSim::MakeSDigits() { // // Makes data from Digits // - // Check id histograms already created for this Event Specie - if ( ! GetSDigitsData(0) ) - InitSDigits() ; - - TIter next(sdigits) ; + if (!fSDigitsArray) + return ; + + TIter next(fSDigitsArray) ; AliTRDdigit * digit ; while ( (digit = dynamic_cast(next())) ) { GetDigitsData(0)->Fill(digit->GetDetector()); diff --git a/TRD/AliTRDQADataMakerSim.h b/TRD/AliTRDQADataMakerSim.h index e770a12306f..efa6c72946d 100644 --- a/TRD/AliTRDQADataMakerSim.h +++ b/TRD/AliTRDQADataMakerSim.h @@ -31,7 +31,7 @@ class AliTRDQADataMakerSim: public AliQADataMakerSim { AliTRDQADataMakerSim() ; // ctor AliTRDQADataMakerSim(const AliTRDQADataMakerSim& qadm) ; AliTRDQADataMakerSim& operator = (const AliTRDQADataMakerSim& qadm) ; - virtual ~AliTRDQADataMakerSim() {;} // dtor + virtual ~AliTRDQADataMakerSim() ; // dtor private: @@ -41,16 +41,17 @@ class AliTRDQADataMakerSim: public AliQADataMakerSim { virtual void InitSDigits() ; virtual void MakeHits(TTree * hitTree); - virtual void MakeHits(TClonesArray * hits); + virtual void MakeHits(); virtual void MakeSDigits(TTree *sdigitTree); - virtual void MakeSDigits(TClonesArray * sigits); + virtual void MakeSDigits(); virtual void MakeDigits(TTree *digitTree); - virtual void MakeDigits(TClonesArray * digits); + virtual void MakeDigits(); virtual void StartOfDetectorCycle() ; Int_t CheckPointer(TObject *obj, const char *name); + TClonesArray *fTmpHits ; ClassDef(AliTRDQADataMakerSim,1) // Creates the TRD QA data diff --git a/VZERO/AliVZEROQADataMakerRec.cxx b/VZERO/AliVZEROQADataMakerRec.cxx index 28439aa81ee..882f7de6489 100644 --- a/VZERO/AliVZEROQADataMakerRec.cxx +++ b/VZERO/AliVZEROQADataMakerRec.cxx @@ -127,7 +127,7 @@ void AliVZEROQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjA AliQAChecker::Instance()->Run(AliQAv1::kVZERO, task, list) ; for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) { - if (! AliQAv1::Instance(AliQAv1::GetDetIndex(GetName()))->IsEventSpecieSet(AliRecoParam::ConvertIndex(specie)) ) + if (! IsValidEventSpecie(specie, list)) continue ; SetEventSpecie(AliRecoParam::ConvertIndex(specie)) ; if(task == AliQAv1::kRAWS){ @@ -450,16 +450,12 @@ void AliVZEROQADataMakerRec::InitDigits() } //____________________________________________________________________________ -void AliVZEROQADataMakerRec::MakeDigits(TClonesArray * digits) +void AliVZEROQADataMakerRec::MakeDigits() { // makes data from Digits - - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - GetDigitsData(0)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + GetDigitsData(0)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliVZEROdigit *VZERODigit ; while ( (VZERODigit = dynamic_cast(next())) ) { Int_t PMNumber = VZERODigit->PMNumber(); @@ -474,15 +470,18 @@ void AliVZEROQADataMakerRec::MakeDigits(TTree *digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliVZEROdigit", 1000) ; + if ( fDigitsArray ) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliVZEROdigit", 1000) ; TBranch * branch = digitTree->GetBranch("VZERODigit") ; if ( ! branch ) { AliWarning("VZERO branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } @@ -492,10 +491,6 @@ void AliVZEROQADataMakerRec::MakeESDs(AliESDEvent * esd) { // Creates QA data from ESDs - // Check id histograms already created for this Event Specie - if ( ! GetESDsData(kCellMultiV0A) ) - InitESDs() ; - UInt_t eventType = esd->GetEventType(); switch (eventType){ diff --git a/VZERO/AliVZEROQADataMakerRec.h b/VZERO/AliVZEROQADataMakerRec.h index 7054750dbb5..f199b27d6b6 100644 --- a/VZERO/AliVZEROQADataMakerRec.h +++ b/VZERO/AliVZEROQADataMakerRec.h @@ -47,6 +47,7 @@ public: AliVZEROQADataMakerRec& operator = (const AliVZEROQADataMakerRec& qadm) ; virtual ~AliVZEROQADataMakerRec() {;} // destructor AliVZEROCalibData *GetCalibData() const; + virtual void InitRaws() ; protected: AliVZEROCalibData *fCalibData; //! calibration data @@ -54,11 +55,10 @@ protected: private: virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list) ; virtual void InitESDs() ; - virtual void InitRaws() ; virtual void InitDigits(); virtual void MakeESDs(AliESDEvent * esd) ; virtual void MakeRaws(AliRawReader* rawReader) ; - virtual void MakeDigits(TClonesArray* digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree* digitTree) ; virtual void StartOfDetectorCycle() ; diff --git a/VZERO/AliVZEROQADataMakerSim.cxx b/VZERO/AliVZEROQADataMakerSim.cxx index a5148c9fcc0..ac5fd06667f 100644 --- a/VZERO/AliVZEROQADataMakerSim.cxx +++ b/VZERO/AliVZEROQADataMakerSim.cxx @@ -129,19 +129,15 @@ void AliVZEROQADataMakerSim::InitDigits() //____________________________________________________________________________ -void AliVZEROQADataMakerSim::MakeHits(TClonesArray * hits) +void AliVZEROQADataMakerSim::MakeHits() { //make QA data from Hits - // Check id histograms already created for this Event Specie - if ( ! GetHitsData(0) ) - InitHits() ; - - GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity - Int_t nhits = hits->GetEntriesFast(); + Int_t nhits = fHitsArray->GetEntriesFast(); + GetHitsData(0)->Fill(nhits) ; // fills Hit multiplicity for (Int_t ihit=0;ihitUncheckedAt(ihit); + AliVZEROhit * VZEROHit = (AliVZEROhit*) fHitsArray->UncheckedAt(ihit); if (!VZEROHit) { AliError("The unchecked hit doesn't exist"); break; @@ -156,7 +152,10 @@ void AliVZEROQADataMakerSim::MakeHits(TClonesArray * hits) void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree) { //fills QA histos for Hits - TClonesArray * hits = new TClonesArray("AliVZEROhit", 1000); + if (fHitsArray) + fHitsArray->Clear() ; + else + fHitsArray = new TClonesArray("AliVZEROhit", 1000); TBranch * branch = hitTree->GetBranch("VZERO") ; if ( ! branch ) { @@ -164,7 +163,7 @@ void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree) } else { if (branch) { - branch->SetAddress(&hits); + branch->SetAddress(&fHitsArray); }else{ AliError("Branch VZERO hit not found"); exit(111); @@ -179,11 +178,11 @@ void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree) // Start loop on tracks in the hits containers for (Int_t track=0; trackGetEntry(track); - GetHitsData(0)->Fill(hits->GetEntriesFast()) ; // fills Hit multiplicity - Int_t nhits = hits->GetEntriesFast(); + Int_t nhits = fHitsArray->GetEntriesFast(); + GetHitsData(0)->Fill(nhits) ; // fills Hit multiplicity for (Int_t ihit=0;ihitUncheckedAt(ihit); + AliVZEROhit * VZEROHit = (AliVZEROhit*) fHitsArray->UncheckedAt(ihit); if (!VZEROHit) { AliError("The unchecked hit doesn't exist"); break; @@ -196,16 +195,12 @@ void AliVZEROQADataMakerSim::MakeHits(TTree *hitTree) //____________________________________________________________________________ -void AliVZEROQADataMakerSim::MakeDigits(TClonesArray * digits) +void AliVZEROQADataMakerSim::MakeDigits() { // makes data from Digits - // Check id histograms already created for this Event Specie - if ( ! GetDigitsData(0) ) - InitDigits() ; - - GetDigitsData(0)->Fill(digits->GetEntriesFast()) ; - TIter next(digits) ; + GetDigitsData(0)->Fill(fDigitsArray->GetEntriesFast()) ; + TIter next(fDigitsArray) ; AliVZEROdigit *VZERODigit ; while ( (VZERODigit = dynamic_cast(next())) ) { Int_t PMNumber = VZERODigit->PMNumber(); @@ -220,15 +215,18 @@ void AliVZEROQADataMakerSim::MakeDigits(TTree *digitTree) { // makes data from Digit Tree - TClonesArray * digits = new TClonesArray("AliVZEROdigit", 1000) ; + if (fDigitsArray) + fDigitsArray->Clear() ; + else + fDigitsArray = new TClonesArray("AliVZEROdigit", 1000) ; TBranch * branch = digitTree->GetBranch("VZERODigit") ; if ( ! branch ) { AliWarning("VZERO branch in Digit Tree not found") ; } else { - branch->SetAddress(&digits) ; + branch->SetAddress(&fDigitsArray) ; branch->GetEntry(0) ; - MakeDigits(digits) ; + MakeDigits() ; } } diff --git a/VZERO/AliVZEROQADataMakerSim.h b/VZERO/AliVZEROQADataMakerSim.h index 81f154588bb..514e127e606 100644 --- a/VZERO/AliVZEROQADataMakerSim.h +++ b/VZERO/AliVZEROQADataMakerSim.h @@ -33,9 +33,9 @@ class AliVZEROQADataMakerSim: public AliQADataMakerSim { virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t, TObjArray ** list); virtual void InitHits(); virtual void InitDigits(); - virtual void MakeHits(TClonesArray* hits) ; + virtual void MakeHits() ; virtual void MakeHits(TTree* hitTree) ; - virtual void MakeDigits(TClonesArray* digits) ; + virtual void MakeDigits() ; virtual void MakeDigits(TTree* digitTree) ; virtual void StartOfDetectorCycle() ; diff --git a/ZDC/AliZDCQADataMakerRec.h b/ZDC/AliZDCQADataMakerRec.h index c20b533362a..27b17287454 100644 --- a/ZDC/AliZDCQADataMakerRec.h +++ b/ZDC/AliZDCQADataMakerRec.h @@ -29,7 +29,7 @@ private: virtual void InitRecPoints() {;} virtual void InitRaws(); virtual void MakeDigits(TTree * /*recTree*/) ; - virtual void MakeDigits(TClonesArray* /*digits*/) {return;} + virtual void MakeDigits() {return;} virtual void MakeRecPoints(TTree * /*recTree*/) {;} virtual void MakeRaws(AliRawReader* rawReader) ; virtual void MakeESDs(AliESDEvent * esd) ; diff --git a/ZDC/AliZDCQADataMakerSim.cxx b/ZDC/AliZDCQADataMakerSim.cxx index cdeb682cd1c..7892e9a1981 100644 --- a/ZDC/AliZDCQADataMakerSim.cxx +++ b/ZDC/AliZDCQADataMakerSim.cxx @@ -35,7 +35,6 @@ ClassImp(AliZDCQADataMakerSim) //____________________________________________________________________________ AliZDCQADataMakerSim::AliZDCQADataMakerSim() : AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kZDC), "ZDC Quality Assurance Data Maker"), - fHits(0), fDigit(0) { // ctor @@ -44,7 +43,6 @@ ClassImp(AliZDCQADataMakerSim) //____________________________________________________________________________ AliZDCQADataMakerSim::AliZDCQADataMakerSim(const AliZDCQADataMakerSim& qadm) : AliQADataMakerSim(), - fHits(0), fDigit(0) { //copy ctor @@ -148,7 +146,7 @@ void AliZDCQADataMakerSim::InitDigits() } //____________________________________________________________________________ -void AliZDCQADataMakerSim::MakeHits(TClonesArray * /*data*/) +void AliZDCQADataMakerSim::MakeHits() { //filling QA histos for Hits // @@ -157,7 +155,7 @@ void AliZDCQADataMakerSim::MakeHits(TClonesArray * /*data*/) if ( ! GetHitsData(0) ) InitHits() ; - TIter next(fHits); + TIter next(fHitsArray); AliZDCHit * hit; while((hit = dynamic_cast(next()))){ if(hit->GetVolume(0)==1) GetHitsData(0)->Fill(hit->GetXImpact(),hit->GetYImpact()); @@ -185,13 +183,15 @@ void AliZDCQADataMakerSim::MakeHits(TTree * hitTree) return; } else{ + if (fHitsArray) + fHitsArray->Clear() ; char** add = (char**) (branch->GetAddress()); if(add){ - fHits = (TClonesArray*)(*add); + fHitsArray = (TClonesArray*)(*add); } else{ - if(!fHits) fHits = new TClonesArray("AliZDCHit", 1000); - branch->SetAddress(&fHits); + if(!fHitsArray) fHitsArray = new TClonesArray("AliZDCHit", 1000); + branch->SetAddress(&fHitsArray); } Int_t ntracks = (Int_t) hitTree->GetEntries(); //printf("\n\t *** no.track %d\n",ntracks); @@ -206,7 +206,7 @@ void AliZDCQADataMakerSim::MakeHits(TTree * hitTree) //printf("\n"); // MakeHits(); - fHits->Clear(); + fHitsArray->Clear(); } } } diff --git a/ZDC/AliZDCQADataMakerSim.h b/ZDC/AliZDCQADataMakerSim.h index 1e7cf0771c4..a7a7e7ce505 100644 --- a/ZDC/AliZDCQADataMakerSim.h +++ b/ZDC/AliZDCQADataMakerSim.h @@ -25,16 +25,15 @@ private: virtual void InitHits(); virtual void InitDigits(); virtual void InitSDigits() {;} - virtual void MakeHits(TClonesArray * hits = 0); + virtual void MakeHits(); virtual void MakeHits(TTree * hitTree); - virtual void MakeDigits(TClonesArray * /*digits*/){;} + virtual void MakeDigits(){;} virtual void MakeDigits(TTree * digTree); - virtual void MakeSDigits(TClonesArray * /*sdigits*/) {;} + virtual void MakeSDigits() {;} virtual void MakeSDigits(TTree * /*sdigTree*/) {;} virtual void StartOfDetectorCycle(); virtual void EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list); // - TClonesArray *fHits; //! Array containing ZDC hits AliZDCDigit *fDigit; //! Pointer to digit in tree ClassDef(AliZDCQADataMakerSim,2) // description diff --git a/test/ppbench/sim.C b/test/ppbench/sim.C index c88e6d90e0d..65f92346097 100644 --- a/test/ppbench/sim.C +++ b/test/ppbench/sim.C @@ -1,4 +1,4 @@ -void sim(Int_t nev=20) { +void sim(Int_t nev=1) { if (gSystem->Getenv("EVENT")) nev = atoi(gSystem->Getenv("EVENT")) ; -- 2.43.0