]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONDigitStoreV1Iterator.cxx
new format to select counters to be printed out or displayed: "rubric1:[any-]key1...
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreV1Iterator.cxx
index 47c99f4b2127eb633b96dce6cde2b0eda21cf610..2c003c07bd3c000317209a188b0927d92527f1d8 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "AliMUONDigitStoreV1Iterator.h"
 
+#include "AliLog.h"
 #include "AliMpDEManager.h"
 #include "AliMUONVDigit.h"
 #include "TObjArray.h"
@@ -61,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;
 }
@@ -85,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;