]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
5f91c9e8 | 4 | // $Id$ |
13985652 | 5 | // $MpId: AliMpNeighboursPadIterator.h,v 1.12 2006/05/24 13:58:21 ivana Exp $ |
dee1d5f1 | 6 | |
7 | /// \ingroup sector | |
8 | /// \class AliMpNeighboursPadIterator | |
9 | /// \brief An iterator over the pads surrounding a given pad | |
10 | /// | |
13985652 | 11 | /// \author David Guez, Ivana Hrivnacova; IPN Orsay |
5f91c9e8 | 12 | |
13 | #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H | |
14 | #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H | |
15 | ||
2a7ea2e6 | 16 | #include "AliMpVPadIterator.h" |
17 | #include "AliMpPad.h" | |
5006ec94 | 18 | |
5006ec94 | 19 | #include <TObjArray.h> |
5f91c9e8 | 20 | |
0fef3734 | 21 | class AliMpVSegmentation; |
2998a151 | 22 | class AliMpIntPair; |
5f91c9e8 | 23 | |
24 | class AliMpNeighboursPadIterator : public AliMpVPadIterator | |
25 | { | |
26 | public: | |
27 | AliMpNeighboursPadIterator(); | |
0fef3734 | 28 | AliMpNeighboursPadIterator(const AliMpVSegmentation* segmentation, |
5f91c9e8 | 29 | const AliMpPad& centerPad, |
30 | Bool_t includeCenter=kFALSE); | |
31 | AliMpNeighboursPadIterator(const AliMpNeighboursPadIterator& right); | |
32 | virtual ~AliMpNeighboursPadIterator(); | |
33 | ||
34 | // operators | |
35 | AliMpNeighboursPadIterator& | |
36 | operator = (const AliMpNeighboursPadIterator& right); | |
37 | ||
38 | // methods | |
39 | virtual void First(); | |
40 | virtual void Next(); | |
41 | virtual Bool_t IsDone() const; | |
42 | virtual AliMpPad CurrentItem() const; | |
43 | virtual void Invalidate(); | |
44 | ||
45 | private: | |
46 | // static members | |
f5671fc3 | 47 | static const UInt_t fgkInvalidIndex; ///< invalid index number |
5f91c9e8 | 48 | |
49 | // private methods | |
2294822d | 50 | Bool_t IsNeighbour(const AliMpPad& pad) const; |
51 | TObjArray* PadVectorLine(const AliMpPad& from, | |
5006ec94 | 52 | const AliMpIntPair& direction) const; |
2294822d | 53 | void UpdateTotalSet(TObjArray& setTotal, TObjArray* from) const; |
54 | void FillPadsVector(Bool_t includeCenter); | |
55 | Bool_t IsValid() const; | |
5f91c9e8 | 56 | |
57 | // private data members | |
0fef3734 | 58 | const AliMpVSegmentation* fkSegmentation; ///< \brief The segmentation |
829425a5 | 59 | /// segmentation over which to iterate |
60 | AliMpPad fCenterPad; ///< Pad arround which we iterate | |
2294822d | 61 | TObjArray fPads; ///< The list of pad arround fCenterIndices |
829425a5 | 62 | UInt_t fIndex; ///< Current index inside the fPads vector |
5f91c9e8 | 63 | |
64 | ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads | |
65 | }; | |
66 | ||
67 | #endif // ALI_MP_NEIGHBOURS_PAD_ITERATOR_H |