]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDigitStoreV1Iterator.cxx
updated vertex selection
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreV1Iterator.cxx
index 7664956fd545716b4b793b8cda0bd0679d5336df..2c003c07bd3c000317209a188b0927d92527f1d8 100644 (file)
 
 #include "AliMUONDigitStoreV1Iterator.h"
 
+#include "AliLog.h"
 #include "AliMpDEManager.h"
 #include "AliMUONVDigit.h"
+#include "TObjArray.h"
 
 /// \cond CLASSIMP
 ClassImp(AliMUONDigitStoreV1Iterator)
@@ -60,19 +62,24 @@ AliMUONDigitStoreV1Iterator::AliMUONDigitStoreV1Iterator(const AliMUONDigitStore
 }
 
 //_____________________________________________________________________________
-TIterator& 
+AliMUONDigitStoreV1Iterator& 
 AliMUONDigitStoreV1Iterator::operator=(const TIterator& rhs)
 {
   /// overriden assignment operator (imposed by Root's definition of TIterator ?)
-  if ( this != &rhs && rhs.IsA() == AliMUONDigitStoreV1Iterator::Class()) 
+  
+  if ( this != &rhs )
   {
-    const AliMUONDigitStoreV1Iterator& rhs1 = 
-    static_cast<const AliMUONDigitStoreV1Iterator&>(rhs);
-    
-    fArray = rhs1.fArray;
-    fFirstDetElemId = rhs1.fFirstDetElemId;
-    fLastDetElemId = rhs1.fLastDetElemId;
-    fCathode = rhs1.fCathode;
+    if ( rhs.IsA() != AliMUONDigitStoreV1Iterator::Class() )
+    {
+      AliErrorGeneral("AliMUONDigitStoreV1Iterator::operator=","Wrong type");
+    }
+    else
+    {
+      const AliMUONDigitStoreV1Iterator& rhs1 = 
+      static_cast<const AliMUONDigitStoreV1Iterator&>(rhs);
+      
+      AliMUONDigitStoreV1Iterator::operator=(rhs1);
+    }
   }
   return *this;
 }
@@ -84,6 +91,7 @@ AliMUONDigitStoreV1Iterator::operator=(const AliMUONDigitStoreV1Iterator& rhs)
   /// assignement operator
   if ( this != &rhs ) 
   {
+    TIterator::operator=(rhs);
     fArray = rhs.fArray;
     fFirstDetElemId = rhs.fFirstDetElemId;
     fLastDetElemId = rhs.fLastDetElemId;