]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMakerSim.cxx
fix codding violation in AliTRDseedV1 class
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerSim.cxx
index aaef43b314f5ca5740167050f652de2b3ab4cc6d..503be71a80a204f8b00112927c6bbd659f97b18a 100644 (file)
@@ -68,21 +68,18 @@ AliQADataMakerSim::~AliQADataMakerSim()
        //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 ;
@@ -269,6 +266,35 @@ void AliQADataMakerSim::Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t
        } 
 }
 
+//____________________________________________________________________________ 
+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) 
 {