//____________________________________________________________________________
AliPHOSQADataMakerSim::AliPHOSQADataMakerSim() :
- AliQADataMakerSim(AliQA::GetDetName(AliQA::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);
}
//__________________________________________________________________
}
//____________________________________________________________________________
-void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliPHOSQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
- AliQAChecker::Instance()->Run(AliQA::kPHOS, task, list) ;
+ AliQAChecker::Instance()->Run(AliQAv1::kPHOS, task, list) ;
}
//____________________________________________________________________________
void AliPHOSQADataMakerSim::InitHits()
{
// create Hits histograms in Hits subdir
- Bool_t expert = kTRUE ;
- TH1F * h0 = new TH1F("hPhosHits", "Hits energy distribution in PHOS", 100, 0., 100.) ;
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+ TH1F * h0 = new TH1F("hPhosHits", "Hits energy distribution in PHOS;Energy [MeV];Counts", 100, 0., 100.) ;
h0->Sumw2() ;
- Add2HitsList(h0, 0, !expert) ;
- TH1I * h1 = new TH1I("hPhosHitsMul", "Hits multiplicity distribution in PHOS", 500, 0., 10000) ;
+ Add2HitsList(h0, kHits, !expert, image) ;
+ TH1I * h1 = new TH1I("hPhosHitsMul", "Hits multiplicity distribution in PHOS;# of Hits;Entries", 500, 0., 10000) ;
h1->Sumw2() ;
- Add2HitsList(h1, 1, !expert) ;
+ Add2HitsList(h1, kHitsMul, !expert, image) ;
+ //
+ ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
}
//____________________________________________________________________________
void AliPHOSQADataMakerSim::InitDigits()
{
// create Digits histograms in Digits subdir
- Bool_t expert = kTRUE ;
- TH1I * h0 = new TH1I("hPhosDigits", "Digits amplitude distribution in PHOS", 500, 0, 5000) ;
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+ TH1I * h0 = new TH1I("hPhosDigits", "Digits amplitude distribution in PHOS;Amplitude [ADC counts];Counts", 500, 0, 1000) ;
h0->Sumw2() ;
- Add2DigitsList(h0, 0, !expert) ;
- TH1I * h1 = new TH1I("hPhosDigitsMul", "Digits multiplicity distribution in PHOS", 500, 0, 1000) ;
+ Add2DigitsList(h0, kDigits, !expert, image) ;
+ TH1I * h1 = new TH1I("hPhosDigitsMul", "Digits multiplicity distribution in PHOS;# of Digits;Entries", 2000, 0, 10000) ;
h1->Sumw2() ;
- Add2DigitsList(h1, 1, !expert) ;
+ Add2DigitsList(h1, kDigitsMul, !expert, image) ;
+ //
+ ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line
}
//____________________________________________________________________________
void AliPHOSQADataMakerSim::InitSDigits()
{
// create SDigits histograms in SDigits subdir
- Bool_t expert = kTRUE ;
- TH1F * h0 = new TH1F("hPhosSDigits", "SDigits energy distribution in PHOS", 100, 0., 100.) ;
+ const Bool_t expert = kTRUE ;
+ const Bool_t image = kTRUE ;
+ TH1F * h0 = new TH1F("hPhosSDigits", "SDigits energy distribution in PHOS; Energy [MeV];Counts", 500, 0., 1000.) ;
h0->Sumw2() ;
- Add2SDigitsList(h0, 0, !expert) ;
- TH1I * h1 = new TH1I("hPhosSDigitsMul", "SDigits multiplicity distribution in PHOS", 500, 0, 10000) ;
+ Add2SDigitsList(h0, kSDigits, !expert, image) ;
+ TH1I * h1 = new TH1I("hPhosSDigitsMul", "SDigits multiplicity distribution in PHOS;# of SDigits;Entries", 500, 0, 1000) ;
h1->Sumw2() ;
- Add2SDigitsList(h1, 1, !expert) ;
+ Add2SDigitsList(h1, kSDigitsMul, !expert, image) ;
+ //
+ ClonePerTrigClass(AliQAv1::kSDIGITS); // this should be the last line
}
//____________________________________________________________________________
{
//make QA data from Hits
- TIter next(fHits) ;
+ TIter next(fHitsArray) ;
AliPHOSHit * hit ;
while ( (hit = dynamic_cast<AliPHOSHit *>(next())) ) {
- GetHitsData(0)->Fill( hit->GetEnergy()) ;
+ FillHitsData(kHits, hit->GetEnergy()) ;
}
}
{
// 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) ;
- for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
- branch->GetEntry(ientry) ;
- nHits += fHits->GetEntriesFast();
- MakeHits() ;
- fHits->Clear();
- }
- GetHitsData(1)->Fill(nHits) ;
- }
+ if ( ! branch ) { AliWarning("PHOS branch in Hit Tree not found"); return;}
+ //
+ Int_t nHits = 0;
+ branch->SetAddress(&fHitsArray) ;
+ for (Int_t ientry = 0 ; ientry < branch->GetEntries() ; ientry++) {
+ branch->GetEntry(ientry) ;
+ nHits += fHitsArray->GetEntriesFast();
+ MakeHits() ;
+ fHitsArray->Clear();
+ }
+ FillHitsData(1,nHits) ;
+ //
+ IncEvCountCycleHits();
+ IncEvCountTotalHits();
+ //
}
//____________________________________________________________________________
-void AliPHOSQADataMakerSim::MakeDigits(TClonesArray * digits)
+void AliPHOSQADataMakerSim::MakeDigits()
{
// makes data from Digits
-
- GetDigitsData(1)->Fill(digits->GetEntriesFast()) ;
- TIter next(digits) ;
- AliPHOSDigit * digit ;
- while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
- GetDigitsData(0)->Fill( digit->GetEnergy()) ;
- }
+
+ FillDigitsData(1,fDigitsArray->GetEntriesFast()) ;
+ TIter next(fDigitsArray) ;
+ AliPHOSDigit * digit ;
+ while ( (digit = dynamic_cast<AliPHOSDigit *>(next())) ) {
+ FillDigitsData(kDigits, digit->GetEnergy()) ;
+ }
}
//____________________________________________________________________________
void AliPHOSQADataMakerSim::MakeDigits(TTree * digitTree)
{
- // makes data from Digit Tree
- TClonesArray * digits = new TClonesArray("AliPHOSDigit", 1000) ;
-
- TBranch * branch = digitTree->GetBranch("PHOS") ;
- if ( ! branch ) {
- AliWarning("PHOS branch in Digit Tree not found") ;
- } else {
- branch->SetAddress(&digits) ;
- branch->GetEntry(0) ;
- MakeDigits(digits) ;
- }
+ // makes data from Digit Tree
+ 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"); return;}
+ branch->SetAddress(&fDigitsArray) ;
+ branch->GetEntry(0) ;
+ MakeDigits() ;
+ //
+ IncEvCountCycleDigits();
+ IncEvCountTotalDigits();
+ //
}
//____________________________________________________________________________
-void AliPHOSQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
+void AliPHOSQADataMakerSim::MakeSDigits()
{
// makes data from SDigits
-
- GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ;
- TIter next(sdigits) ;
- AliPHOSDigit * sdigit ;
- while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
- GetSDigitsData(0)->Fill( sdigit->GetEnergy()) ;
- }
+
+ FillSDigitsData(1,fSDigitsArray->GetEntriesFast()) ;
+ TIter next(fSDigitsArray) ;
+ AliPHOSDigit * sdigit ;
+ while ( (sdigit = dynamic_cast<AliPHOSDigit *>(next())) ) {
+ FillSDigitsData(kSDigits, sdigit->GetEnergy()) ;
+ }
}
//____________________________________________________________________________
void AliPHOSQADataMakerSim::MakeSDigits(TTree * sdigitTree)
{
// makes data from SDigit Tree
- TClonesArray * sdigits = new TClonesArray("AliPHOSDigit", 1000) ;
-
- TBranch * branch = sdigitTree->GetBranch("PHOS") ;
- if ( ! branch ) {
- AliWarning("PHOS branch in SDigit Tree not found") ;
- } else {
- branch->SetAddress(&sdigits) ;
- branch->GetEntry(0) ;
- MakeSDigits(sdigits) ;
- }
+ 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"); return;}
+ branch->SetAddress(&fSDigitsArray) ;
+ branch->GetEntry(0) ;
+ MakeSDigits() ;
+ //
+ IncEvCountCycleSDigits();
+ IncEvCountTotalSDigits();
+ //
}
//____________________________________________________________________________