1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 //-----------------------------------------------------------------------------
19 /// \class AliMUON1DMapIterator
20 /// Implementation of TIterator for 1Dmaps
22 /// A simple implementation of iterator for 1Dmaps.
24 /// \author Laurent Aphecetche
25 //-----------------------------------------------------------------------------
27 #include "AliMUON1DMapIterator.h"
28 #include "AliMpExMap.h"
31 ClassImp(AliMUON1DMapIterator)
34 //_____________________________________________________________________________
35 AliMUON1DMapIterator::AliMUON1DMapIterator(const AliMpExMap& theMap)
43 //_____________________________________________________________________________
44 AliMUON1DMapIterator::AliMUON1DMapIterator(const AliMUON1DMapIterator& rhs)
47 fCurrentI(rhs.fCurrentI)
52 //_____________________________________________________________________________
54 AliMUON1DMapIterator::operator=(const AliMUON1DMapIterator& rhs)
56 /// assignment operator
60 fCurrentI = rhs.fCurrentI;
65 //_____________________________________________________________________________
67 AliMUON1DMapIterator::operator=(const TIterator& rhs)
69 /// overriden operator= (imposed by Root definition of TIterator::operator= ?)
71 if ( this != &rhs && rhs.IsA() == AliMUON1DMapIterator::Class() )
73 const AliMUON1DMapIterator& rhs1 = static_cast<const AliMUON1DMapIterator&>(rhs);
75 fCurrentI = rhs1.fCurrentI;
81 //_____________________________________________________________________________
82 AliMUON1DMapIterator::~AliMUON1DMapIterator()
87 //_____________________________________________________________________________
89 AliMUON1DMapIterator::Next()
91 /// Return next object in iteration
92 return (++fCurrentI < fkMap->GetSize()) ? fkMap->GetObjectFast(fCurrentI) : 0x0;
95 //_____________________________________________________________________________
97 AliMUON1DMapIterator::Reset()
99 /// rewind the iterator