Updated comments for Doxygen
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpNeighboursPadIterator.h
CommitLineData
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$
829425a5 5// $MpId: AliMpNeighboursPadIterator.h,v 1.11 2006/05/23 13:07:44 ivana Exp $
dee1d5f1 6
7/// \ingroup sector
8/// \class AliMpNeighboursPadIterator
9/// \brief An iterator over the pads surrounding a given pad
10///
11/// Authors: 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
5006ec94 16#include "AliMpContainers.h"
17
2a7ea2e6 18#include "AliMpVPadIterator.h"
19#include "AliMpPad.h"
5006ec94 20
21#ifdef WITH_ROOT
22#include <TObjArray.h>
23#endif
24
2a7ea2e6 25#ifdef WITH_STL
26#include <vector>
27#include <set>
28#endif
5f91c9e8 29
30class AliMpSectorSegmentation;
2998a151 31class AliMpIntPair;
5f91c9e8 32
33class AliMpNeighboursPadIterator : public AliMpVPadIterator
34{
35 public:
5006ec94 36#ifdef WITH_STL
37 typedef std::vector<AliMpPad> PadVector;
38 typedef std::set<AliMpPad> PadSet;
39 typedef PadSet::const_iterator PadSetCIterator;
40#endif
41#ifdef WITH_ROOT
42 typedef TObjArray PadVector;
43 typedef TObjArray PadSet;
44#endif
45
46 public:
5f91c9e8 47 AliMpNeighboursPadIterator();
48 AliMpNeighboursPadIterator(const AliMpSectorSegmentation* segmentation,
49 const AliMpPad& centerPad,
50 Bool_t includeCenter=kFALSE);
51 AliMpNeighboursPadIterator(const AliMpNeighboursPadIterator& right);
52 virtual ~AliMpNeighboursPadIterator();
53
54 // operators
55 AliMpNeighboursPadIterator&
56 operator = (const AliMpNeighboursPadIterator& right);
57
58 // methods
59 virtual void First();
60 virtual void Next();
61 virtual Bool_t IsDone() const;
62 virtual AliMpPad CurrentItem() const;
63 virtual void Invalidate();
64
65 private:
66 // static members
2998a151 67 static const UInt_t fgkInvalidIndex; // invalid index number
5f91c9e8 68
69 // private methods
b9dbf8ab 70 Bool_t IsNeighbour(const AliMpPad& pad) const;
f79c58a5 71#ifdef WITH_STL
5f91c9e8 72 PadVector PadVectorLine(const AliMpPad& from,
73 const AliMpIntPair& direction) const;
f79c58a5 74 void UpdateTotalSet(PadSet& setTotal, const PadVector& from) const;
75#endif
76#ifdef WITH_ROOT
77 PadVector* PadVectorLine(const AliMpPad& from,
5006ec94 78 const AliMpIntPair& direction) const;
f79c58a5 79 void UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
80#endif
5f91c9e8 81 void FillPadsVector(Bool_t includeCenter);
82 Bool_t IsValid() const;
83
84 // private data members
829425a5 85 const AliMpSectorSegmentation* fkSegmentation; ///< \brief The sector
86 /// segmentation over which to iterate
87 AliMpPad fCenterPad; ///< Pad arround which we iterate
88 PadVector fPads; ///< The list of pad arround fCenterIndices
89 UInt_t fIndex; ///< Current index inside the fPads vector
5f91c9e8 90
91 ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads
92};
93
94#endif // ALI_MP_NEIGHBOURS_PAD_ITERATOR_H