// $Id$
-///
+//-----------------------------------------------------------------------------
/// \class AliMUONTOTCAStoreIterator
///
/// An iterator to access TObject stored in a TObjArray of TClonesArray
///
-///
/// \author Laurent Aphecetche, Subatech
-///
+//-----------------------------------------------------------------------------
#include "AliMUONTOTCAStoreIterator.h"
+#include "AliLog.h"
#include <TClonesArray.h>
#include <TObjArray.h>
}
//_____________________________________________________________________________
-TIterator&
+AliMUONTOTCAStoreIterator&
AliMUONTOTCAStoreIterator::operator=(const TIterator& rhs)
{
/// Overriden operator= (imposed by Root's declaration of TIterator ?)
- if ( this != &rhs && rhs.IsA() == AliMUONTOTCAStoreIterator::Class() )
+ if ( this != &rhs )
{
- const AliMUONTOTCAStoreIterator& rhs1 =
- static_cast<const AliMUONTOTCAStoreIterator&>(rhs);
-
- rhs1.CopyTo(*this);
+ if ( rhs.IsA() != AliMUONTOTCAStoreIterator::Class() )
+ {
+ AliErrorGeneral("AliMUONTOTCAStoreIterator::operator=","Wrong type");
+ }
+ else
+ {
+ const AliMUONTOTCAStoreIterator& rhs1 =
+ static_cast<const AliMUONTOTCAStoreIterator&>(rhs);
+ rhs1.CopyTo(*this);
+ }
}
return *this;
}