]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifTypePadIterator.h
Mapping test macros (D. Guez, I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifTypePadIterator.h
1 // $Id$
2 // Category: motif
3 //
4 // Class AliMpMotifTypePadIterator
5 // -------------------------------
6 // Class, which defines an iterator over the pads of a given motif type
7 //
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10 #ifndef ALI_MP_MOTIF_TYPE_PAD_ITERATOR_H
11 #define ALI_MP_MOTIF_TYPE_PAD_ITERATOR_H
12
13 #include "AliMpVPadIterator.h"
14 #include "AliMpIntPair.h"
15
16 class AliMpMotifType;
17
18 class AliMpMotifTypePadIterator : public AliMpVPadIterator
19 {
20   public:
21     AliMpMotifTypePadIterator();
22     AliMpMotifTypePadIterator(const AliMpMotifType* motifType);
23     AliMpMotifTypePadIterator(const AliMpMotifTypePadIterator& right);
24     virtual ~AliMpMotifTypePadIterator();     
25
26     // operators
27     AliMpMotifTypePadIterator& 
28       operator = (const AliMpMotifTypePadIterator& right);
29
30     virtual void First();
31     virtual void Next();
32     virtual Bool_t IsDone() const;
33     virtual AliMpPad CurrentItem() const;
34     virtual void Invalidate();
35
36   private:
37     // private methods
38     AliMpIntPair FindFirstPadInLine(AliMpIntPair indices) const;
39     Bool_t IsValid() const;
40
41     // private data members
42     const AliMpMotifType* fMotifType;// the motif type over which iterate
43     AliMpIntPair fCurrentPosition;   //! the current position inside the motif type
44                                      // EXCLUDED FOR CINT (does not compile on HP)
45
46  ClassDef(AliMpMotifTypePadIterator,1) // iterator over motif's pads
47 };
48
49 #endif // ALI_MP_MOTIF_TYPE_PAD_ITERATOR_H