ClassImp(AliACORDEQADataMakerSim)
//____________________________________________________________________________
-AliACORDEQADataMakerSim::AliACORDEQADataMakerSim():AliQADataMakerSim(AliQA::GetDetName(AliQA::kACORDE), "ACORDE Quality Assurance Data Maker")
+AliACORDEQADataMakerSim::AliACORDEQADataMakerSim():AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kACORDE), "ACORDE Quality Assurance Data Maker")
{
}
//____________________________________________________________________________
return *this;
}
//____________________________________________________________________________
-void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliACORDEQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
{
//Detector specific actions at end of cycle
// do the QA checking
- printf("ACORDE---->Detector specific actions at END of cycle\n................\n");
+ AliInfo("ACORDE---->Detector specific actions at END of cycle\n................\n");
- AliQAChecker::Instance()->Run(AliQA::kACORDE, task, list) ;
+ AliQAChecker::Instance()->Run(AliQAv1::kACORDE, task, list) ;
}
//____________________________________________________________________________
void AliACORDEQADataMakerSim::StartOfDetectorCycle()
{
//Detector specific actions at start of cycle
- printf("ACORDE---->Detector specific actions at START of cycle\n................\n");
+ AliInfo("ACORDE---->Detector specific actions at START of cycle\n................\n");
}
//____________________________________________________________________________
void AliACORDEQADataMakerSim::InitHits()
TClonesArray * hits = new TClonesArray("AliACORDEhit",1000);
TBranch * branch = hitTree->GetBranch("ACORDE");
- if (!branch)
- {
+ if (!branch) {
AliWarning("ACORDE branch in Hit Tree not found");
- }else
- {
- if (branch)
- {
- branch->SetAddress(&hits);
- }else
- {
- AliError("Branch ACORDE hit not found");
- exit(111);
- }
- Int_t ntracks = (Int_t)hitTree->GetEntries();
- if (ntracks<=0) return;
- for(Int_t track=0;track<ntracks;track++)
- {
+ } else {
+ branch->SetAddress(&hits);
+ for(Int_t track = 0 ; track < branch->GetEntries() ; track++) {
branch->GetEntry(track);
- Int_t nhits = hits->GetEntriesFast();
- for(Int_t ihit=1;ihit<=nhits;ihit++)
- {
+ for(Int_t ihit=0 ; ihit < hits->GetEntriesFast() ; ihit++) {
AliACORDEhit *AcoHit = (AliACORDEhit*) hits->UncheckedAt(ihit);
- if(!AcoHit)
- {
+ if(!AcoHit) {
AliError("The unchecked hit doesn't exist");
- break;
+ continue ;
}
GetHitsData(0)->Fill(AcoHit->GetModule()-1);
- }
- }
- }
-
+ }
+ }
+ }
}
//____________________________________________________________________________
void AliACORDEQADataMakerSim::MakeDigits( TTree *digitsTree)
{
//fills QA histos for Digits
-
-
- TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
- TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
- if (!branch)
- {
- AliWarning("ACORDE branch in Digits Tree not found");
- }else
- {
- if (branch)
- {
- branch->SetAddress(&digits);
- }else
- {
- AliError("Branch ACORDE digit not found");
- exit(111);
- }
- Int_t ntracks = (Int_t)digitsTree->GetEntries();
- if (ntracks<=0) return;
- printf("Entries in DigitsTree:%d\n",ntracks);
- for(Int_t track=0;track<ntracks;track++)
- {
- branch->GetEntry(track);
- Int_t ndigits = digits->GetEntriesFast();
- for(Int_t idigit=0;idigit<ndigits;idigit++)
- {
- AliACORDEdigit *AcoDigit = (AliACORDEdigit*) digits->UncheckedAt(idigit);
- if (!AcoDigit)
- {
- AliError("The unchecked digit doesn't exist");
- break;
- }
- GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
- }
- }
-
-
+ TClonesArray * digits = new TClonesArray("AliACORDEdigit",1000);
+ TBranch * branch = digitsTree->GetBranch("ACORDEdigit");
+ if (!branch) {
+ AliWarning("ACORDE branch in Digits Tree not found");
+ } else {
+ branch->SetAddress(&digits);
+ 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);
+ if (!AcoDigit) {
+ AliError("The unchecked digit doesn't exist");
+ continue ;
}
-
+ GetDigitsData(0)->Fill(AcoDigit->GetModule()-1);
+ }
+ }
+ }
}