+++ /dev/null
-/**************************************************************************
-* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
-* *
-* Author: The ALICE Off-line Project. *
-* Contributors are mentioned in the code where appropriate. *
-* *
-* Permission to use, copy, modify and distribute this software and its *
-* documentation strictly for non-commercial purposes is hereby granted *
-* without fee, provided that the above copyright notice appears in all *
-* copies and that both the copyright notice and this permission notice *
-* appear in the supporting documentation. The authors make no claims *
-* about the suitability of this software for any purpose. It is *
-* provided "as is" without express or implied warranty. *
-**************************************************************************/
-
-// $Id$
-
-//-----------------------------------------------------------------------------
-/// \class AliMUON1DMapIterator
-/// Implementation of TIterator for 1Dmaps
-///
-/// A simple implementation of iterator for 1Dmaps.
-///
-/// \author Laurent Aphecetche
-//-----------------------------------------------------------------------------
-
-#include "AliMUON1DMapIterator.h"
-#include "AliMpExMap.h"
-
-/// \cond CLASSIMP
-ClassImp(AliMUON1DMapIterator)
-/// \endcond
-
-//_____________________________________________________________________________
-AliMUON1DMapIterator::AliMUON1DMapIterator(const AliMpExMap& theMap)
-: TIterator(),
- fkMap(&theMap),
- fCurrentI(-1)
-{
- /// default ctor
-}
-
-//_____________________________________________________________________________
-AliMUON1DMapIterator::AliMUON1DMapIterator(const AliMUON1DMapIterator& rhs)
-: TIterator(rhs),
- fkMap(rhs.fkMap),
- fCurrentI(rhs.fCurrentI)
-{
- /// copy ctor
-}
-
-//_____________________________________________________________________________
-AliMUON1DMapIterator&
-AliMUON1DMapIterator::operator=(const AliMUON1DMapIterator& rhs)
-{
- /// assignment operator
- if ( this != &rhs )
- {
- fkMap = rhs.fkMap;
- fCurrentI = rhs.fCurrentI;
- }
- return *this;
-}
-
-//_____________________________________________________________________________
-TIterator&
-AliMUON1DMapIterator::operator=(const TIterator& rhs)
-{
- /// overriden operator= (imposed by Root definition of TIterator::operator= ?)
-
- if ( this != &rhs && rhs.IsA() == AliMUON1DMapIterator::Class() )
- {
- const AliMUON1DMapIterator& rhs1 = static_cast<const AliMUON1DMapIterator&>(rhs);
- fkMap = rhs1.fkMap;
- fCurrentI = rhs1.fCurrentI;
- }
- return *this;
-}
-
-
-//_____________________________________________________________________________
-AliMUON1DMapIterator::~AliMUON1DMapIterator()
-{
- /// dtor
-}
-
-//_____________________________________________________________________________
-TObject*
-AliMUON1DMapIterator::Next()
-{
- /// Return next object in iteration
- return (++fCurrentI < fkMap->GetSize()) ? fkMap->GetObjectFast(fCurrentI) : 0x0;
-}
-
-//_____________________________________________________________________________
-void
-AliMUON1DMapIterator::Reset()
-{
- /// rewind the iterator
- fCurrentI = -1;
-}
+++ /dev/null
-#ifndef ALIMUON1DMAPITERATOR_H
-#define ALIMUON1DMAPITERATOR_H
-
-/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
-* See cxx source for full Copyright notice */
-
-// $Id$
-
-/// \ingroup core
-/// \class AliMUON1DMapIterator
-/// \brief Implementation of TIterator for 1D maps
-///
-// Author Laurent Aphecetche
-
-#ifndef ROOT_TObject
-# include "TObject.h"
-#endif
-#ifndef ROOT_TExMap
-# include "TExMap.h"
-#endif
-#ifndef ROOT_TIterator
-# include "TIterator.h"
-#endif
-
-class AliMpExMap;
-
-//_____________________________________________________________________________
-class AliMUON1DMapIterator : public TIterator
-{
-public:
- AliMUON1DMapIterator(const AliMpExMap& theMap);
- AliMUON1DMapIterator(const AliMUON1DMapIterator&);
- AliMUON1DMapIterator& operator=(const AliMUON1DMapIterator& rhs);
- TIterator& operator=(const TIterator& iterator);
- virtual ~AliMUON1DMapIterator();
-
- /** The returned object must not be deleted by the user ! */
- virtual TObject* Next();
-
- virtual void Reset();
-
- /// Return 0 as we're not really dealing with a TCollection
- virtual const TCollection* GetCollection() const { return 0x0; }
-
-private:
- const AliMpExMap* fkMap; ///< Top map we iterate upon
- Int_t fCurrentI; ///< Current position in fMap
-
- ClassDef(AliMUON1DMapIterator,0) // VDataIterator for 1D maps
-};
-
-
-#endif
#include "AliMUONDigitStoreV1Iterator.h"
+#include "AliLog.h"
#include "AliMpDEManager.h"
#include "AliMUONVDigit.h"
#include "TObjArray.h"
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);
-
- AliMUONDigitStoreV1Iterator::operator=(rhs1);
+ if ( rhs.IsA() != AliMUONDigitStoreV1Iterator::Class() )
+ {
+ AliErrorGeneral("AliMUONDigitStoreV1Iterator::operator=","Wrong type");
+ }
+ else
+ {
+ const AliMUONDigitStoreV1Iterator& rhs1 =
+ static_cast<const AliMUONDigitStoreV1Iterator&>(rhs);
+
+ AliMUONDigitStoreV1Iterator::operator=(rhs1);
+ }
}
return *this;
}
/// assignement operator
if ( this != &rhs )
{
+ TIterator::operator=(rhs);
fArray = rhs.fArray;
fFirstDetElemId = rhs.fFirstDetElemId;
fLastDetElemId = rhs.fLastDetElemId;
#include "AliMUONTOTCAStoreIterator.h"
+#include "AliLog.h"
#include <TClonesArray.h>
#include <TObjArray.h>
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;
}