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 VDataIterator for 1Dmaps.
24 /// \author Laurent Aphecetche
25 //-----------------------------------------------------------------------------
27 #include "AliMUON1DMapIterator.h"
28 #include "AliMpExMap.h"
30 #include "AliMpIntPair.h"
31 #include "AliMpExMap.h"
34 ClassImp(AliMUON1DMapIterator)
37 //_____________________________________________________________________________
38 AliMUON1DMapIterator::AliMUON1DMapIterator(AliMpExMap& theMap)
40 fIter(theMap.GetIterator()),
47 //_____________________________________________________________________________
48 AliMUON1DMapIterator::AliMUON1DMapIterator(const AliMUON1DMapIterator& rhs)
51 fCurrentI(rhs.fCurrentI)
56 //_____________________________________________________________________________
58 AliMUON1DMapIterator::operator=(const AliMUON1DMapIterator& rhs)
60 /// assignment operator
64 fCurrentI = rhs.fCurrentI;
69 //_____________________________________________________________________________
71 AliMUON1DMapIterator::operator=(const TIterator& rhs)
73 /// overriden operator= (imposed by Root definition of TIterator::operator= ?)
75 if ( this != &rhs && rhs.IsA() == AliMUON1DMapIterator::Class() )
77 const AliMUON1DMapIterator& rhs1 = static_cast<const AliMUON1DMapIterator&>(rhs);
79 fCurrentI = rhs1.fCurrentI;
85 //_____________________________________________________________________________
86 AliMUON1DMapIterator::~AliMUON1DMapIterator()
91 //_____________________________________________________________________________
93 AliMUON1DMapIterator::Next()
95 /// Return next object in iteration
98 Bool_t ok = fIter.Next(key,value);
100 return reinterpret_cast<TObject*>(value);
103 //_____________________________________________________________________________
105 AliMUON1DMapIterator::Reset()
107 /// rewind the iterator