]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCheckItem.cxx
AliTriggerAnalysis: added switch to disable FMD histograms (runs much faster) (consta...
[u/mrichter/AliRoot.git] / MUON / AliMUONCheckItem.cxx
index ccef5212f3623c8c6fe3d238764f2c8898cf8cba..10bd1bebfd692b384f681dc2b5c8349e96bd5ebf 100644 (file)
@@ -19,8 +19,8 @@
 
 #include "AliLog.h"
 #include "AliMpExMap.h"
+#include "AliMpExMapIterator.h"
 #include "Riostream.h"
-#include "AliMUONCheckItemIterator.h"
 
 //-----------------------------------------------------------------------------
 /// \class AliMUONCheckItem
@@ -43,7 +43,7 @@ TNamed(name,name),
 fID(id),
 fDead(-1),
 fMaximum(maxNumber),
-fMissing(new AliMpExMap(kTRUE))
+fMissing(new AliMpExMap)
 {
   /// ctor. id is the number of that item, maxNumber is the maximum number
   /// of sub-item it can contains, and name is a label, e.g. de, chamber, manu.
@@ -109,12 +109,11 @@ AliMUONCheckItem::ComputeDead() const
   }
   else
   {
-    AliMUONCheckItemIterator it(*this);
+      TIter next(CreateIterator());
     AliMUONCheckItem* item;
-    it.First();
     Int_t ndead(0);
     fDead=0;
-    while ( ( item = dynamic_cast<AliMUONCheckItem*>(it.Next()) ) )
+    while ( ( item = dynamic_cast<AliMUONCheckItem*>(next()) ) )
     {
       if ( item->IsDead() ) ++ndead;
     }
@@ -122,6 +121,14 @@ AliMUONCheckItem::ComputeDead() const
   }
 }
 
+//_____________________________________________________________________________
+TIterator*
+AliMUONCheckItem::CreateIterator() const
+{
+    /// Create iterator on this item
+    return fMissing->CreateIterator();
+}
+
 //_____________________________________________________________________________
 TObject* 
 AliMUONCheckItem::GetItem(Int_t id) const
@@ -163,11 +170,9 @@ AliMUONCheckItem::Print(Option_t* opt) const
   {
     TObject* object(0x0);
   
-    AliMUONCheckItemIterator it(*this);
-  
-    it.First();
+      TIter next(CreateIterator());
   
-    while ( ( object = it.Next() ) )
+    while ( ( object = next() ) )
     {
       object->Print(opt);
     }