]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliQADataMakerRec.cxx
Fix for report #64208 Missing OCDB (GRP/Calib/MeanVertex) object in GRP
[u/mrichter/AliRoot.git] / STEER / AliQADataMakerRec.cxx
index 7cc48d72fefd2bfd5e56107415ba7a8e44a18be5..04d9423e14f8e7efd4862424e9f1363ab3dfd5f3 100644 (file)
@@ -327,6 +327,7 @@ void AliQADataMakerRec::Init(AliQAv1::TASKINDEX_t task, TObjArray ** list, Int_t
 //____________________________________________________________________________
 void AliQADataMakerRec::InitRecoParams() 
 {
+  // Get the recoparam form the OCDB 
   if (!fRecoParam) {
     AliDebug(AliQAv1::GetQADebugLevel(), Form("Loading reconstruction parameter objects for detector %s", GetName()));
     AliCDBPath path(GetName(),"Calib","RecoParam");
@@ -362,6 +363,37 @@ void AliQADataMakerRec::InitRecoParams()
   }
 }
 
+//____________________________________________________________________________ 
+void AliQADataMakerRec::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::kRAWS ) {
+               list = fRawsQAList ;     
+       } else if ( task == AliQAv1::kDIGITSR ) {
+               list = fDigitsQAList ; 
+       } else if ( task == AliQAv1::kRECPOINTS ) {
+               list = fRecPointsQAList ; 
+       } else if ( task == AliQAv1::kESDS ) {
+               list = fESDsQAList ; 
+       }
+    //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 AliQADataMakerRec::StartOfCycle(Int_t run) 
 {