]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCheckItem.cxx
- Disentangle masks effect from trigger chamber efficiency estimation.
[u/mrichter/AliRoot.git] / MUON / AliMUONCheckItem.cxx
index 730bf4ae8a34063e8766146bf68c8ab66af978ba..10bd1bebfd692b384f681dc2b5c8349e96bd5ebf 100644 (file)
 
 #include "AliLog.h"
 #include "AliMpExMap.h"
+#include "AliMpExMapIterator.h"
 #include "Riostream.h"
-#include "AliMUONCheckItemIterator.h"
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONCheckItem
 ///
 /// A structure used to gather information at different levels (ch,manu,de,chamber)
@@ -30,6 +31,7 @@
 ///
 /// 
 /// \author Laurent Aphecetche
+//-----------------------------------------------------------------------------
 
 /// \cond CLASSIMP
 ClassImp(AliMUONCheckItem)
@@ -41,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.
@@ -107,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;
     }
@@ -120,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
@@ -161,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);
     }