ROOT logo
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

// $Id$
// $MpId: AliMpVRowSegment.h,v 1.9 2006/05/24 13:58:21 ivana Exp $

/// \ingroup sector
/// \class AliMpVRowSegment
/// \brief An interface for a row segment.
///
/// \author David Guez, Ivana Hrivnacova; IPN Orsay

#ifndef ALI_MP_V_ROW_SEGMENT_H
#define ALI_MP_V_ROW_SEGMENT_H

#include "AliMpVIndexed.h"

class AliMpRow;
class AliMpVMotif;

class AliMpVRowSegment : public AliMpVIndexed
{
  public:
    AliMpVRowSegment();
    virtual ~AliMpVRowSegment();

    //
    // methods  
    //
    
    /// 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 = 0;
    virtual AliMpVPadIterator* CreateIterator() const;

    //
    // find methods
    //

    /// Find the motif in the given positions
    virtual AliMpVMotif*  FindMotif(Double_t x, Double_t y) const = 0;    
    /// Find the motif position Id in the given positions
    virtual Int_t     FindMotifPositionId(Double_t x, Double_t y) const = 0;
    /// Has the motif position with the given Id ?
    virtual Bool_t    HasMotifPosition(Int_t motifPositionId) const = 0;

    /// Fill the coordinates of the motif specified with the given motif position Id
    virtual void  MotifCenter(Int_t motifPositionId,
                               Double_t& x, Double_t& y) const = 0;

    //
    // geometry
    //
    
    /// Return the x position of the row segment centre.
    virtual Double_t  GetPositionX() const = 0;
    /// Return the y position of the row segment centre.
    virtual Double_t  GetPositionY() const = 0;

    /// Return the x dimension of the row segment centre.
    virtual Double_t  GetDimensionX() const = 0;
    /// Return the y dimension of the row segment centre.
    virtual Double_t  GetDimensionY() const = 0;
   
    //
    // set methods
    //

    /// Calculate offset
    virtual void      SetOffset(Double_t x, Double_t y) = 0;
    /// 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, MpPair_t indices) = 0;
    
    //
    // get methods
    //
    
    /// Return the row.which this row segment belongs to
    virtual AliMpRow*  GetRow() const = 0;
    /// Return the number of motifs in this this row segment.
    virtual Int_t      GetNofMotifs() const = 0;
    /// Return the i-th motif of this row segment.
    virtual AliMpVMotif*  GetMotif(Int_t i) const = 0;
    /// Return the i-th motif position Id of this row segment.
    virtual Int_t      GetMotifPositionId(Int_t i) const = 0;
    
  ClassDef(AliMpVRowSegment,1)  //Row segment
};

#endif //ALI_MP_V_ROW_SEGMENT_H

 AliMpVRowSegment.h:1
 AliMpVRowSegment.h:2
 AliMpVRowSegment.h:3
 AliMpVRowSegment.h:4
 AliMpVRowSegment.h:5
 AliMpVRowSegment.h:6
 AliMpVRowSegment.h:7
 AliMpVRowSegment.h:8
 AliMpVRowSegment.h:9
 AliMpVRowSegment.h:10
 AliMpVRowSegment.h:11
 AliMpVRowSegment.h:12
 AliMpVRowSegment.h:13
 AliMpVRowSegment.h:14
 AliMpVRowSegment.h:15
 AliMpVRowSegment.h:16
 AliMpVRowSegment.h:17
 AliMpVRowSegment.h:18
 AliMpVRowSegment.h:19
 AliMpVRowSegment.h:20
 AliMpVRowSegment.h:21
 AliMpVRowSegment.h:22
 AliMpVRowSegment.h:23
 AliMpVRowSegment.h:24
 AliMpVRowSegment.h:25
 AliMpVRowSegment.h:26
 AliMpVRowSegment.h:27
 AliMpVRowSegment.h:28
 AliMpVRowSegment.h:29
 AliMpVRowSegment.h:30
 AliMpVRowSegment.h:31
 AliMpVRowSegment.h:32
 AliMpVRowSegment.h:33
 AliMpVRowSegment.h:34
 AliMpVRowSegment.h:35
 AliMpVRowSegment.h:36
 AliMpVRowSegment.h:37
 AliMpVRowSegment.h:38
 AliMpVRowSegment.h:39
 AliMpVRowSegment.h:40
 AliMpVRowSegment.h:41
 AliMpVRowSegment.h:42
 AliMpVRowSegment.h:43
 AliMpVRowSegment.h:44
 AliMpVRowSegment.h:45
 AliMpVRowSegment.h:46
 AliMpVRowSegment.h:47
 AliMpVRowSegment.h:48
 AliMpVRowSegment.h:49
 AliMpVRowSegment.h:50
 AliMpVRowSegment.h:51
 AliMpVRowSegment.h:52
 AliMpVRowSegment.h:53
 AliMpVRowSegment.h:54
 AliMpVRowSegment.h:55
 AliMpVRowSegment.h:56
 AliMpVRowSegment.h:57
 AliMpVRowSegment.h:58
 AliMpVRowSegment.h:59
 AliMpVRowSegment.h:60
 AliMpVRowSegment.h:61
 AliMpVRowSegment.h:62
 AliMpVRowSegment.h:63
 AliMpVRowSegment.h:64
 AliMpVRowSegment.h:65
 AliMpVRowSegment.h:66
 AliMpVRowSegment.h:67
 AliMpVRowSegment.h:68
 AliMpVRowSegment.h:69
 AliMpVRowSegment.h:70
 AliMpVRowSegment.h:71
 AliMpVRowSegment.h:72
 AliMpVRowSegment.h:73
 AliMpVRowSegment.h:74
 AliMpVRowSegment.h:75
 AliMpVRowSegment.h:76
 AliMpVRowSegment.h:77
 AliMpVRowSegment.h:78
 AliMpVRowSegment.h:79
 AliMpVRowSegment.h:80
 AliMpVRowSegment.h:81
 AliMpVRowSegment.h:82
 AliMpVRowSegment.h:83
 AliMpVRowSegment.h:84
 AliMpVRowSegment.h:85
 AliMpVRowSegment.h:86
 AliMpVRowSegment.h:87
 AliMpVRowSegment.h:88
 AliMpVRowSegment.h:89
 AliMpVRowSegment.h:90
 AliMpVRowSegment.h:91
 AliMpVRowSegment.h:92
 AliMpVRowSegment.h:93
 AliMpVRowSegment.h:94
 AliMpVRowSegment.h:95
 AliMpVRowSegment.h:96