]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONCheckItem.cxx
Net Particle fluctuation task including efficiency correction (by Jochen Thaeder)
[u/mrichter/AliRoot.git] / MUON / AliMUONCheckItem.cxx
index e51ab1256d59e82ebc6129d0e3ad960e07ecaee5..2aa5944a57a76c83947ecebe29396d233bc4b0df 100644 (file)
@@ -19,8 +19,8 @@
 
 #include "AliLog.h"
 #include "AliMpExMap.h"
+#include "AliMpExMapIterator.h"
 #include "Riostream.h"
-#include "AliMUONCheckItemIterator.h"
 
 //-----------------------------------------------------------------------------
 /// \class AliMUONCheckItem
@@ -33,6 +33,8 @@
 /// \author Laurent Aphecetche
 //-----------------------------------------------------------------------------
 
+using std::endl;
+using std::cout;
 /// \cond CLASSIMP
 ClassImp(AliMUONCheckItem)
 /// \endcond
@@ -109,12 +111,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 +123,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 +172,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);
     }