]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpNeighboursPadIterator.h
In SetNofManusPerModule(): return false if no action
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpNeighboursPadIterator.h
index 5fe9ae1ac013b3cdca7f366d2d0a81310de66815..40d2bed5ec1eefad0bd1ec9fb774e392f178da37 100755 (executable)
@@ -1,31 +1,56 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
 // $Id$
-// Category: sector
-//
-// Class AliMpNeighboursPadIterator
-// --------------------------------
-// Class, which defines an iterator over the pads surrounding a given pad
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpNeighboursPadIterator.h,v 1.12 2006/05/24 13:58:21 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpNeighboursPadIterator
+/// \brief An iterator over the pads surrounding a given pad
+///
+/// \author David Guez, Ivana Hrivnacova; IPN Orsay
 
 #ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 #define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
 
-#include <TObject.h>
-#include <TVector2.h>
+#include "AliMpContainers.h"
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVPadIterator.h"
-#include "AliMpMotifTypePadIterator.h"
-#include "AliMpIntPair.h"
 #include "AliMpPad.h"
 
-class AliMpSectorSegmentation;
+#ifdef WITH_ROOT
+#include <TObjArray.h>
+#endif
+
+#ifdef WITH_STL
+#include <vector>
+#include <set>
+#endif
+
+class AliMpVSegmentation;
+class AliMpIntPair;
 
 class AliMpNeighboursPadIterator : public AliMpVPadIterator
 {
+  public:
+#ifdef WITH_STL
+    /// Pad vector type
+    typedef std::vector<AliMpPad>  PadVector;
+    /// Pad set type
+    typedef std::set<AliMpPad>     PadSet;
+    /// Pad set iterator type
+    typedef PadSet::const_iterator PadSetCIterator;
+#endif
+#ifdef WITH_ROOT
+    /// Pad vector type
+    typedef TObjArray  PadVector;
+    /// Pad set type
+    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);
@@ -44,21 +69,29 @@ class AliMpNeighboursPadIterator : public AliMpVPadIterator
 
   private:
     // static members
-    static const UInt_t   fgkInvalidIndex;
+    static const UInt_t   fgkInvalidIndex; ///< invalid index number
 
     // private methods
-    Bool_t    IsNeighbours(const AliMpPad& pad) const;
+    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,
+                             const AliMpIntPair& direction) const;
+    void      UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
+#endif
     void      FillPadsVector(Bool_t includeCenter);
     Bool_t    IsValid() const;
 
     // private data members
-    const AliMpSectorSegmentation* fkSegmentation; // The sector segmentation 
-                                                   // over which to iterate
-    AliMpPad   fCenterPad; // Pad arround which we iterate
-    PadVector  fPads;      // The list of pad arround fCenterIndices
-    UInt_t     fIndex;     // Current index inside the fPads vector
+    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
+    UInt_t     fIndex;     ///< Current index inside the fPads vector
 
   ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads
 };