X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONDigitStoreV1Iterator.cxx;h=2c003c07bd3c000317209a188b0927d92527f1d8;hb=d879a92d8819d5646170437ebee8b54790925aef;hp=7664956fd545716b4b793b8cda0bd0679d5336df;hpb=3d1463c8f7148e36069c24f20cde34e096d5d6a9;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONDigitStoreV1Iterator.cxx b/MUON/AliMUONDigitStoreV1Iterator.cxx index 7664956fd54..2c003c07bd3 100644 --- a/MUON/AliMUONDigitStoreV1Iterator.cxx +++ b/MUON/AliMUONDigitStoreV1Iterator.cxx @@ -26,8 +26,10 @@ #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(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(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;