]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpVRowSegmentSpecial.h
In assignment operator: call Copy function only once
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVRowSegmentSpecial.h
index 3d23a30a3e459b812099fcc18d0b850fd45731eb..4c7c7c808935f640c52d27d3a908cc30945b04b7 100644 (file)
@@ -1,22 +1,34 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
 // $Id$
-// Category: sector
-//
-// Class AliMpVRowSegmentSpecial
-// -----------------------------
-// Abstract base class for a special row segment composed of the 
-// pad rows.
-//
-// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+// $MpId: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
+
+/// \ingroup sector
+/// \class AliMpVRowSegmentSpecial
+/// \brief Abstract base class for a special row segment composed of the 
+/// pad rows.
+///
+/// \author David Guez, Ivana Hrivnacova; IPN Orsay
 
 #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
 
-#include <TVector2.h>
+#include "AliMpContainers.h"
 
-#include "AliMpSectorTypes.h"
 #include "AliMpVRowSegment.h"
 #include "AliMpVMotif.h"
 
+#include <TVector2.h>
+#ifdef WITH_ROOT
+#include <TArrayI.h>
+#include <TObjArray.h>
+#endif
+
+#ifdef WITH_STL
+#include <vector>
+#endif
+
 class AliMpRow;
 class AliMpPadRow;
 class AliMpVPadRowSegment;
@@ -24,36 +36,72 @@ class AliMpIntPair;
 
 class AliMpVRowSegmentSpecial : public AliMpVRowSegment
 {
+  public:
+#ifdef WITH_STL
+    /// Pad row vector type
+    typedef std::vector<AliMpPadRow*>  PadRowVector;
+    /// Motif vector type
+    typedef std::vector<AliMpVMotif*>  MotifVector;
+    /// Motif position Id vector type
+    typedef std::vector<Int_t>         MotifPositionIdVector;
+#endif
+#ifdef WITH_ROOT
+    /// Pad row vector type
+    typedef  TObjArray  PadRowVector;
+    /// Motif vector type
+    typedef  TObjArray  MotifVector;
+    /// Motif position Id vector type
+    typedef  TArrayI    MotifPositionIdVector;
+#endif
+
   public:
     AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
     AliMpVRowSegmentSpecial();
     virtual ~AliMpVRowSegmentSpecial();
     
+    //
     // methods
+    //
     void  AddPadRow(AliMpPadRow* padRow);
     void  UpdateMotifVector();
+    /// Update pads offset
     virtual void  UpdatePadsOffset() = 0;
+    /// Return the x coordinate of the left border in the global coordinate system.
     virtual Double_t  LeftBorderX() const = 0;
+    /// Return the x coordinate of the right border in the global coordinate system.
     virtual Double_t  RightBorderX() const= 0;
+    /// Return the half size in y of this row segment.
     virtual Double_t  HalfSizeY() const;
 
+    //
     // find methods
+    //
     virtual AliMpVMotif*  FindMotif(const TVector2& position) const;    
     virtual Int_t     FindMotifPositionId(const TVector2& position) const;
     virtual Bool_t    HasMotifPosition(Int_t motifPositionId) const;
     virtual TVector2  MotifCenter(Int_t motifPositionId) const;
 
+    //
     // geometry
+    //
+    /// Return the position of the row segment centre.
     virtual TVector2  Position() const = 0;
     virtual TVector2  Dimensions() const;
 
+    //
     // set methods
+    //
+    /// Calculate offset
     virtual void   SetOffset(const TVector2& /*offset*/) {}
-    virtual void   SetGlobalIndices();
+    /// Set global indices limits.
+    virtual void   SetGlobalIndices(AliMpRow* rowBefore) = 0;
+    /// Set global indices to i-th motif position and returns next index in x.
     virtual Int_t  SetIndicesToMotifPosition(Int_t i, 
                              const AliMpIntPair& indices) = 0;
 
+    //
     // get methods
+    //
     virtual AliMpRow*     GetRow() const;
     virtual Int_t         GetNofMotifs() const;
     virtual AliMpVMotif*  GetMotif(Int_t i) const;
@@ -61,6 +109,7 @@ class AliMpVRowSegmentSpecial : public AliMpVRowSegment
 
   protected:
     // methods
+    /// Return the coordinates of the motif specified with the given motif position Id                                           \n
     virtual TVector2  MotifCenterSlow(Int_t motifPositionId) const = 0;
     AliMpPadRow*         FindPadRow(Double_t y) const;
     AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const;
@@ -74,20 +123,26 @@ class AliMpVRowSegmentSpecial : public AliMpVRowSegment
     Double_t      GetOffsetX() const;
 
   private:
+    /// Not implemented
+    AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right);
+    /// Not implemented
+    AliMpVRowSegmentSpecial&  operator = (const AliMpVRowSegmentSpecial& right);
+
 #ifdef WITH_ROOT
     // static data members
-    static const Int_t  fgkMaxNofMotifPositionIds; // dimension of fMotifPositionIds
+    static const Int_t  fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
 #endif    
 
     // data members
-    AliMpRow*     fRow;     //the row containing this segment 
-    Double_t      fOffsetX; //the x position of the border that touches a standard
-                            //row segment
-    PadRowVector  fPadRows; //pad rows vector
-    MotifVector   fMotifs;  //motifs vector
-    MotifPositionIdVector  fMotifPositionIds; //motifs position Ids vector
+    AliMpRow*     fRow;     ///< the row containing this segment 
+    Double_t      fOffsetX; ///< \brief the x position of the border that touches a standard
+                            /// row segment
+    PadRowVector  fPadRows; ///< pad rows vector
+    MotifVector   fMotifs;  ///< motifs vector
+    MotifPositionIdVector  fMotifPositionIds; ///< motifs position Ids vector
+
 #ifdef WITH_ROOT
-    Int_t                  fNofMotifPositionIds; // number of motif positions Ids
+    Int_t  fNofMotifPositionIds; ///< number of motif positions Ids
 #endif    
     
   ClassDef(AliMpVRowSegmentSpecial,1)  //Row segment
@@ -95,6 +150,7 @@ class AliMpVRowSegmentSpecial : public AliMpVRowSegment
 
 // inline functions
 
+/// Return the x position of the border that touches a standard row segment
 inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
 { return fOffsetX; }