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

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

/// \ingroup sector
/// \class AliMpRow
/// \brief A row composed of the row segments.
///
/// \author David Guez, Ivana Hrivnacova; IPN Orsay

#ifndef ALI_MP_ROW_H
#define ALI_MP_ROW_H

#include "AliMpVIndexed.h"
#include "AliMpDirection.h"

#include <TList.h>

class AliMpVRowSegment;
class AliMpVPadIterator;
class AliMpMotifPosition;
class AliMpMotifMap;

class AliMpRow : public AliMpVIndexed
{
  public:
    AliMpRow(Int_t id, AliMpMotifMap* motifMap);
    AliMpRow();
    virtual ~AliMpRow();
  
    // methods
    void  AddRowSegment(AliMpVRowSegment* rowSegment);
    void  AddRowSegmentInFront(AliMpVRowSegment* rowSegment);
    AliMpVRowSegment*  FindRowSegment(Double_t x) const;
    Double_t  LowBorderY() const;
    Double_t  UpperBorderY() const;
    virtual AliMpVPadIterator* CreateIterator() const;
    
    void      SetRowSegmentOffsets(Double_t offsetx);
    Double_t  SetOffsetY(Double_t offsetY);
    void      SetMotifPositions();
    void      SetGlobalIndices(AliMp::Direction constPadSizeDirection, 
                               AliMpRow* rowBefore);

    // geometry
    Double_t  GetPositionX() const;
    Double_t  GetPositionY() const;
    Double_t  GetDimensionX() const;
    Double_t  GetDimensionY() const;

    // get methods
    UInt_t   GetID() const;
    Int_t    GetNofRowSegments() const;
    AliMpVRowSegment*  GetRowSegment(Int_t i) const;
    AliMpMotifMap*     GetMotifMap() const;

  private:
    /// Not implemented
    AliMpRow(const AliMpRow& right);
    /// Not implemented
    AliMpRow&  operator = (const AliMpRow& right);

    // methods
    AliMpVRowSegment*    FindRowSegment(Int_t ix) const;
    AliMpMotifPosition*  FindMotifPosition(AliMpVRowSegment* segment, Int_t ix) const;
    void SetHighIndicesLimits(Int_t iy);
    void CheckEmpty() const;
  
    // data members
    UInt_t            fID;      ///< row ID
    Double_t          fOffsetY; ///< the y position of the centre of motifs
    TList             fSegments;///< row segments
    AliMpMotifMap*    fMotifMap;///< the motif map associated with its sector

  ClassDef(AliMpRow,1)  // Row
};

// inline functions

/// Return row ID
inline  UInt_t  AliMpRow::GetID() const { return fID; }

/// Return the motif map associated with its sector
inline  AliMpMotifMap*  AliMpRow::GetMotifMap() const { return fMotifMap; }

#endif //ALI_MP_ROW_H

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