]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDigitStoreVImplIterator.cxx
Adding the ShowConfig function
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreVImplIterator.cxx
index 4f525085de913029874731cf194c936b90a61cc5..76aedbd6aafe66c57b1aa8d061b4646910761abb 100644 (file)
 
 // $Id$
 
+//-----------------------------------------------------------------------------
 /// \class AliMUONDigitStoreVImplIterator
 ///
 /// Implementation of AliMUONVDataIterator for AliMUONDigitStoreVImpl
 ///
 /// \author Laurent Aphecetche, Subatech
 ///
+//-----------------------------------------------------------------------------
 
 #include "AliMUONDigitStoreVImplIterator.h"
 
@@ -38,7 +40,7 @@ ClassImp(AliMUONDigitStoreVImplIterator)
 //_____________________________________________________________________________
 AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImpl* store)
 : TIterator(),
-fStore(store),
+fkStore(store),
 fFirstDetElemId(100),
 fLastDetElemId(1417),
 fCathode(2),
@@ -51,11 +53,11 @@ fCurrentCalibParamIndex(-1)
 
 //_____________________________________________________________________________
 AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImpl* store,
-                                                         Int_t firstDE,
-                                                         Int_t lastDE,
-                                                         Int_t cathode)
+                                                               Int_t firstDE,
+                                                               Int_t lastDE,
+                                                               Int_t cathode)
 : TIterator(),
-fStore(store),
+fkStore(store),
 fFirstDetElemId(firstDE),
 fLastDetElemId(lastDE),
 fCathode(cathode),
@@ -66,35 +68,11 @@ fCurrentCalibParamIndex(-1)
   /// ctor for partial iteration
 }
 
-//_____________________________________________________________________________
-AliMUONDigitStoreVImplIterator::AliMUONDigitStoreVImplIterator(const AliMUONDigitStoreVImplIterator& rhs)
-: TIterator(rhs),
-fStore(rhs.fStore),
-fFirstDetElemId(rhs.fFirstDetElemId),
-fLastDetElemId(rhs.fLastDetElemId),
-fCathode(rhs.fCathode),
-fStoreIterator(0x0),
-fCurrentCalibParam(0x0),
-fCurrentCalibParamIndex(-1)
-{
-  /// copy ctor
-  Fatal("AliMUONDigitStoreVImplIterator::copy tor","Not implementeable"); // because there's no clone in TIterator :-(
-}
-
 //_____________________________________________________________________________
 AliMUONDigitStoreVImplIterator&
-AliMUONDigitStoreVImplIterator::operator=(const AliMUONDigitStoreVImplIterator&)
-{
-  /// assignment operator
-  Fatal("AliMUONDigitStoreVImplIterator::operator=","Not implementeable"); // because there's no clone in TIterator :-(
-  return *this;
-}
-
-//_____________________________________________________________________________
-TIterator&
 AliMUONDigitStoreVImplIterator::operator=(const TIterator&)
 {
-  /// overriden assignment operator (imposed by Root's declaration of Titerator ?)
+  // overriden assignment operator (imposed by Root's declaration of Titerator ?)
   Fatal("TIterator::operator=","Not implementeable"); // because there's no clone in TIterator :-(
   return *this;
 }
@@ -117,7 +95,7 @@ AliMUONDigitStoreVImplIterator::Next()
     fCurrentCalibParamIndex = 0;
     if ( !fCurrentCalibParam ) return 0x0;
   }
-
+  
   Int_t ix(-1);
   AliMUONVDigit* d(0x0);
   
@@ -130,26 +108,35 @@ AliMUONDigitStoreVImplIterator::Next()
     
     if (ix>=0)
     {
-      d = static_cast<AliMUONVDigit*>(fStore->fDigits->UncheckedAt(ix));
+      d = static_cast<AliMUONVDigit*>(fkStore->fDigits->UncheckedAt(ix));
     }  
   }
   else
   {
-  while ( fCurrentCalibParamIndex < 64 )
-  {
-    ix = fCurrentCalibParam->ValueAsInt(fCurrentCalibParamIndex++);
-    if (ix>=0)
+    while ( d == 0x0 ) 
     {
-      d = static_cast<AliMUONVDigit*>(fStore->fDigits->UncheckedAt(ix));
+      while ( fCurrentCalibParamIndex < 64 && ix < 0 )
+      {
+        ix = fCurrentCalibParam->ValueAsInt(fCurrentCalibParamIndex++);
+      };
     
-      if (  fCathode == 2 || d->Cathode() == fCathode ) 
+      if (ix>=0)
+      {
+        d = static_cast<AliMUONVDigit*>(fkStore->fDigits->UncheckedAt(ix));
+        
+        if (  fCathode == 2 || d->Cathode() == fCathode ) 
+        {
+          break;
+        }
+        d = 0x0;
+        ix = -1;
+      }
+      else
       {
         break;
       }
-      d = 0x0;
     }
   }
-  }
   
   if (ix<0) 
   {