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 #include "AliMUON2DMapIterator.h"
20 //-----------------------------------------------------------------------------
21 /// \class AliMUON2DMapIterator
22 /// Implementation of TIterator for 2Dmaps
24 /// A simple implementation of VDataIterator for 2Dmaps.
26 /// \author Laurent Aphecetche
27 //-----------------------------------------------------------------------------
29 #include "AliMpExMap.h"
30 #include "AliMpExMapIterator.h"
34 ClassImp(AliMUON2DMapIterator)
37 //_____________________________________________________________________________
38 AliMUON2DMapIterator::AliMUON2DMapIterator(const AliMpExMap& theMap)
41 fIter1(theMap.CreateIterator()),
42 fIter2(NextIterator())
48 //_____________________________________________________________________________
50 AliMUON2DMapIterator::operator=(const TIterator& /*rhs*/)
52 // overriden operator= (imposed by Root's definition of TIterator::operator= ?)
54 AliFatalGeneral("operator=(TIterator&)",""); // as in copy ctor
58 //_____________________________________________________________________________
59 AliMUON2DMapIterator::~AliMUON2DMapIterator()
66 //_____________________________________________________________________________
68 AliMUON2DMapIterator::GetCollection() const
70 /// Return 0 as we're not really dealing with a Root TCollection...
74 //_____________________________________________________________________________
76 AliMUON2DMapIterator::NextIterator()
78 /// Get next map (from fIter1) and create an iterator to it
80 AliMpExMap* m = static_cast<AliMpExMap*>(fIter1->Next());
84 return m->CreateIterator();
87 //_____________________________________________________________________________
89 AliMUON2DMapIterator::Next()
91 /// return next object
93 if (!fIter2) return 0x0;
95 TObject* o = fIter2->Next();
100 fIter2 = NextIterator();
107 //_____________________________________________________________________________
109 AliMUON2DMapIterator::Reset()
111 /// rewind the iterator
115 fIter2 = NextIterator();