//dtor: delete the TObjArray and thei content
if ( fDigitsQAList ) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if ( fDigitsQAList[specie]->IsOwner() )
fDigitsQAList[specie]->Delete() ;
}
delete[] fDigitsQAList ;
}
if ( fHitsQAList ) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if ( fHitsQAList[specie]->IsOwner() )
fHitsQAList[specie]->Delete() ;
}
delete[] fHitsQAList ;
}
if ( fSDigitsQAList ) {
for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
- if ( fSDigitsQAList[specie]->IsOwner() )
fSDigitsQAList[specie]->Delete() ;
}
delete[] fSDigitsQAList ;
}
}
+//____________________________________________________________________________
+void AliQADataMakerSim::ResetDetector(AliQAv1::TASKINDEX_t task)
+{
+ // default reset that resets all the QA objects.
+ // to be overloaded by detectors, if necessary
+
+ TObjArray ** list = NULL ;
+ if ( task == AliQAv1::kHITS ) {
+ list = fHitsQAList ;
+ } else if ( task == AliQAv1::kSDIGITS ) {
+ list = fSDigitsQAList ;
+ } else if ( task == AliQAv1::kDIGITS ) {
+ list = fDigitsQAList ;
+ }
+ //list was not initialized, skip
+ if (!list)
+ return ;
+
+ for (int spec = 0; spec < AliRecoParam::kNSpecies; spec++) {
+ if (!AliQAv1::Instance()->IsEventSpecieSet(AliRecoParam::ConvertIndex(spec)))
+ continue;
+ TIter next(list[spec]) ;
+ TH1 * histo = NULL ;
+ while ( (histo = dynamic_cast<TH1*> (next())) ) {
+ histo->Reset() ;
+ }
+ }
+}
+
//____________________________________________________________________________
void AliQADataMakerSim::StartOfCycle(Int_t run)
{