//__________________________________________________________________
-Double_t * AliTRDQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
+void AliTRDQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam* /*param*/)
{
// Super-basic check on the QA histograms on the input list:
- Double_t * test = new Double_t[AliRecoParam::kNSpecies];
+ if (!list) return;
for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) test[i] = 0.5;
//Int_t count[AliRecoParam::kNSpecies] = { 0 };
- if (index != AliQAv1::kREC) return test;
+ if (index != AliQAv1::kREC) return;
const Double_t lowAmp = 30;
const Double_t highAmp = 50;
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
-
- TH1D *hist = (TH1D*) list[specie]->At(12);
+
+ TObjArray * arr = list[specie];
+ if (!arr) continue;
+ TH1D *hist = (TH1D*) arr->At(12);
if (!hist) continue;
Double_t value = hist->Integral(hist->FindBin(lowAmp), hist->FindBin(highAmp));
- test[specie] = value / hist->GetSum();
+ if (hist->GetSum())
+ test[specie] = value / hist->GetSum();
}
- return test ;
}
//____________________________________________________________________________