]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpNeighboursPadIterator.h
Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpNeighboursPadIterator.h
index fce2c2f965e75e9a59ead9949ca5594c8e059b4a..c09a816c31ce13670d83cc6d977cb2729ced3025 100755 (executable)
 #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 
-#include "AliMpContainers.h"
-
 #include "AliMpVPadIterator.h"
 #include "AliMpPad.h"
 
-#ifdef WITH_ROOT
 #include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#include <set>
-#endif
 
-class AliMpSectorSegmentation;
+class AliMpVSegmentation;
 class AliMpIntPair;
 
 class AliMpNeighboursPadIterator : public AliMpVPadIterator
 {
-  public:
-#ifdef WITH_STL
-    typedef std::vector<AliMpPad>  PadVector;
-    typedef std::set<AliMpPad>     PadSet;
-    typedef PadSet::const_iterator PadSetCIterator;
-#endif
-#ifdef WITH_ROOT
-    typedef TObjArray  PadVector;
-    typedef TObjArray  PadSet;
-#endif
-
   public:
     AliMpNeighboursPadIterator();
-    AliMpNeighboursPadIterator(const AliMpSectorSegmentation* segmentation,
+    AliMpNeighboursPadIterator(const AliMpVSegmentation* segmentation,
                                const AliMpPad& centerPad,
                                Bool_t includeCenter=kFALSE);
     AliMpNeighboursPadIterator(const AliMpNeighboursPadIterator& right);
@@ -64,28 +44,21 @@ class AliMpNeighboursPadIterator : public AliMpVPadIterator
 
   private:
     // static members
-    static const UInt_t   fgkInvalidIndex; // invalid index number
+    static const UInt_t   fgkInvalidIndex; ///< invalid index number
 
     // private methods
-    Bool_t    IsNeighbour(const AliMpPad& pad) const;
-#ifdef WITH_STL
-    PadVector PadVectorLine(const AliMpPad& from,
-                            const AliMpIntPair& direction) const;
-    void      UpdateTotalSet(PadSet& setTotal, const PadVector& from) const;
-#endif
-#ifdef WITH_ROOT
-    PadVector* PadVectorLine(const AliMpPad& from,
+    Bool_t     IsNeighbour(const AliMpPad& pad) const;
+    TObjArray* PadVectorLine(const AliMpPad& from,
                              const AliMpIntPair& direction) const;
-    void      UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
-#endif
-    void      FillPadsVector(Bool_t includeCenter);
-    Bool_t    IsValid() const;
+    void       UpdateTotalSet(TObjArray& setTotal, TObjArray* from) const;
+    void       FillPadsVector(Bool_t includeCenter);
+    Bool_t     IsValid() const;
 
     // private data members
-    const AliMpSectorSegmentation* fkSegmentation; ///< \brief The sector
+    const AliMpVSegmentation* fkSegmentation; ///< \brief The segmentation
                            ///  segmentation over which to iterate
     AliMpPad   fCenterPad; ///< Pad arround which we iterate
-    PadVector  fPads;      ///< The list of pad arround fCenterIndices
+    TObjArray  fPads;      ///< The list of pad arround fCenterIndices
     UInt_t     fIndex;     ///< Current index inside the fPads vector
 
   ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads