]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONVQADataMakerRec.cxx
In AliMUONReconstructor:
[u/mrichter/AliRoot.git] / MUON / AliMUONVQADataMakerRec.cxx
index e864736512ead495ffe9b943f6f3524e2c87c532..1746612bfc5e42ad0f8de49ea5a091ec80775b6e 100644 (file)
@@ -31,6 +31,7 @@ ClassImp(AliMUONVQADataMakerRec)
 #include "AliQADataMakerRec.h"
 #include "AliMUONRecoParam.h"
 #include "AliCDBManager.h"
+#include "TH1.h"
 
 //_____________________________________________________________________________
 AliMUONVQADataMakerRec::AliMUONVQADataMakerRec(AliQADataMakerRec* master)
@@ -125,6 +126,34 @@ AliMUONVQADataMakerRec::GetRawsData(Int_t index) const
   return fMaster ? fMaster->GetRawsData(index) : 0x0;
 }
 
+//_____________________________________________________________________________
+void 
+AliMUONVQADataMakerRec::ResetDetector(TObjArray* list)
+{
+  /// 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()) ) 
+  {
+    TH1* h = dynamic_cast<TH1*>(o);
+    if ( h ) 
+    {
+      TString hcn(h->ClassName());
+      if ( hcn.Contains(pattern) ) 
+      {
+        h->Reset();
+      }
+    }
+  }
+}
+
 //_____________________________________________________________________________
 Int_t 
 AliMUONVQADataMakerRec::RunNumber() const