]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVQADataMakerRec.cxx
Mega commit of many changes to PWGLFforward
[u/mrichter/AliRoot.git] / MUON / AliMUONVQADataMakerRec.cxx
index e864736512ead495ffe9b943f6f3524e2c87c532..c7b37b6801cd259291f4f6aaf138ee51467528f4 100644 (file)
@@ -28,9 +28,9 @@
 ClassImp(AliMUONVQADataMakerRec)
 /// \endcond
 
-#include "AliQADataMakerRec.h"
 #include "AliMUONRecoParam.h"
 #include "AliCDBManager.h"
+#include "TH1.h"
 
 //_____________________________________________________________________________
 AliMUONVQADataMakerRec::AliMUONVQADataMakerRec(AliQADataMakerRec* master)
@@ -77,6 +77,15 @@ AliMUONVQADataMakerRec::Add2RawsList(TH1 * hist, const Int_t index, const Bool_t
   return fMaster ? fMaster->Add2RawsList(hist,index,expert,image,saveForCorr) : -1;
 }
 
+//_____________________________________________________________________________
+void AliMUONVQADataMakerRec::ClonePerTrigClass(AliQAv1::TASKINDEX_t task)
+{
+  // RS: alias to QADataMaker per-trigger-class histo clonning
+  if (!fMaster) return;
+  fMaster->ClonePerTrigClass(task);
+}
+
+
 //_____________________________________________________________________________
 AliRecoParam::EventSpecie_t 
 AliMUONVQADataMakerRec::CurrentEventSpecie() const
@@ -94,35 +103,33 @@ AliMUONVQADataMakerRec::GetRecoParam() const
 }
 
 //_____________________________________________________________________________
-TH1* 
-AliMUONVQADataMakerRec::GetDigitsData(Int_t index) const
+void 
+AliMUONVQADataMakerRec::ResetDetector(const TObjArray* list)
 {
-  /// fwd
-  return fMaster ? fMaster->GetDigitsData(index) : 0x0;
-}
-
-//_____________________________________________________________________________
-TH1* 
-AliMUONVQADataMakerRec::GetESDsData(Int_t index) const
-{
-  /// fwd
-  return fMaster ? fMaster->GetESDsData(index) : 0x0;
-}
-
-//_____________________________________________________________________________
-TH1* 
-AliMUONVQADataMakerRec::GetRecPointsData(Int_t index) const
-{
-  /// fwd
-  return fMaster ? fMaster->GetRecPointsData(index) : 0x0;
-}
-
-//_____________________________________________________________________________
-TH1* 
-AliMUONVQADataMakerRec::GetRawsData(Int_t index) const
-{
-  /// fwd
-  return fMaster ? fMaster->GetRawsData(index) : 0x0;
+  /// Reset all histograms found in list, that match either trigger or tracker
+  
+  TString cn(ClassName());
+  TString pattern;
+  
+  if ( cn.Contains("Trigger") ) pattern = "Trigger";
+  if ( cn.Contains("Tracker") ) pattern = "Tracker";
+  
+  TIter next(list); 
+  TObject* o;
+  while ( (o = next()) ) 
+  {
+    // RS: Check if this is a histo or array of histos
+    TString hcn(o->GetName());
+    if ( !hcn.Contains(pattern) ) continue;
+    if ( !o->TestBit(AliQAv1::GetClonedBit()) ) { // not cloned, this is orig. histo
+      ((TH1*)o)->Reset();
+      continue;
+    }
+    // histo was cloned, so we are dealing with TObjArray
+    TIter nextCl( (TObjArray*)o );
+    TH1* hclone = 0;
+    while ( (hclone = (TH1*) nextCl()) ) hclone->Reset();
+  }
 }
 
 //_____________________________________________________________________________