]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpSlatPadIterator.h
Update serial number files (Christian)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSlatPadIterator.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpSlatPadIterator.h,v 1.8 2006/05/24 13:58:24 ivana Exp $
6
7 /// \ingroup slat
8 /// \class AliMpSlatPadIterator
9 /// \brief Iterator for slat pads.
10 /// 
11 //  Author: Laurent Aphecetche
12
13 #ifndef ALI_MP_SLAT_PAD_ITERATOR_H
14 #define ALI_MP_SLAT_PAD_ITERATOR_H
15
16 #include "AliMpVPadIterator.h"
17 #include "TObjArray.h"
18
19 class AliMpSlat;
20 class AliMpArea;
21
22 class AliMpSlatPadIterator : public AliMpVPadIterator
23 {
24  public:
25   AliMpSlatPadIterator(); 
26   // Area position must be relative to bottom-left of slat.
27   AliMpSlatPadIterator(const AliMpSlat* slat, const AliMpArea& area);
28   virtual ~AliMpSlatPadIterator();
29
30   void First();
31   void Next();
32   Bool_t IsDone() const;
33   AliMpPad CurrentItem() const;
34   void Invalidate();
35  
36  private:
37   AliMpSlatPadIterator(const AliMpSlatPadIterator&);
38         AliMpSlatPadIterator& operator=(const AliMpSlatPadIterator&);
39   Bool_t Prepare(const AliMpArea& area);
40   AliMpArea Intersect(const AliMpArea& a, const AliMpArea& b) const;
41
42  private:
43   const AliMpSlat* fkSlat; ///< pointer to the slat being iterated over
44   TObjArray fDelegates; ///< iterators we do use (array of AliMpVPadIterator*)
45   AliMpVPadIterator* fCurrentDelegate; ///< current iterator
46   Int_t fCurrentDelegateIndex; ///< current iterator index
47
48   ClassDef(AliMpSlatPadIterator,2) // Pad iterator for St 345 Slats
49 };
50
51 #endif