]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUON2DMapIteratorByI.h
Coding conventions fixed.
[u/mrichter/AliRoot.git] / MUON / AliMUON2DMapIteratorByI.h
1 #ifndef ALIMUON2DMAPITERATORBYI_H
2 #define ALIMUON2DMAPITERATORBYI_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup core
10 /// \class AliMUON2DMapIteratorByI
11 /// \brief Implementation of TIterator for 2D maps
12 /// 
13 //  Author Laurent Aphecetche
14
15 #ifndef ROOT_TExMap
16 #  include "TExMap.h"
17 #endif
18 #ifndef ROOT_TIterator
19 #  include "TIterator.h"
20 #endif
21
22 class AliMpExMap;
23
24 //_____________________________________________________________________________
25 class AliMUON2DMapIteratorByI : public TIterator
26 {
27 public:
28   AliMUON2DMapIteratorByI(const AliMpExMap& theMap, 
29                           Int_t firstI, Int_t lastI);
30   AliMUON2DMapIteratorByI(const AliMUON2DMapIteratorByI& rhs);
31   TIterator& operator=(const TIterator& rhs);
32   AliMUON2DMapIteratorByI& operator=(const AliMUON2DMapIteratorByI& rhs);
33   
34   virtual ~AliMUON2DMapIteratorByI();
35   
36   ///The returned object must not be deleted by the user.  
37   virtual TObject* Next();
38   
39   virtual void Reset(); 
40
41   virtual const TCollection* GetCollection() const;
42   
43 private:
44   
45   TObject* GetValue(TExMapIter& iter, Int_t& key) const;
46   
47 private:
48   const AliMpExMap* fkMap; //!< map to iterate upon
49   TExMapIter* fIter2; //!< second iterator
50   Int_t fCurrentI; //!< current index in direction i 
51   Int_t fCurrentJ; //!< current index in direction j
52   Int_t fFirstI; //!< first I to iterate upon
53   Int_t fLastI; //!< last I to iterate upon
54   
55   ClassDef(AliMUON2DMapIteratorByI,0) // VDataIterator for 2D maps
56 };
57
58
59 #endif