41 #include <Riostream.h>
90 if (!dynamic_cast<AliMpVRowSegmentSpecial*>(segment) &&
106 if (!segment)
return 0;
113 Fatal(
"FindMotifPosition",
"Not found.");
118 return motifPosition;
156 Fatal(
"CheckEmpty",
"Empty row");
223 Fatal(
"CreateIterator",
"Iterator is not implemented.");
244 rowSegment->
MotifCenter(motifPositionId, posx, posy);
256 if (dynamic_cast<AliMpVRowSegmentSpecial*>(rowSegment)) warn =
false;
262 if (!added)
delete motifPosition;
286 if (constPadSizeDirection ==
AliMp::kY) {
292 if (!dynamic_cast<AliMpRowSegmentRSpecial*>(rowSegment)) {
294 Fatal(
"SetGlobalIndices",
"Motif position in rowBefore not found.");
390 previous = rowSegment;
412 Fatal(
"SetOffsetY",
"Motif with different Y size in one row");
417 offsetY += rowSizeY ;
421 return offsetY += rowSizeY;
438 AliWarningStream() <<
"Index outside range" << endl;
void SetLowIndicesLimit(MpPair_t limit, Bool_t valid=true)
AliMpMotifPosition * FindMotifPosition(AliMpVRowSegment *segment, Int_t ix) const
Bool_t AddMotifPosition(AliMpMotifPosition *motifType, Bool_t warn=true)
Int_t GetLowLimitIx() const
virtual void SetGlobalIndices(AliMpRow *rowBefore)=0
Set global indices limits.
Double_t GetPositionX() const
Double_t GetPositionY() const
Double_t fOffsetY
the y position of the centre of motifs
void SetRowSegmentOffsets(Double_t offsetx)
MpPair_t Pair(Int_t first, Int_t second)
Encode the pair of integers to another integer.
Int_t GetLowLimitIy() const
Int_t GetHighLimitIy() const
virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices)=0
Set global indices to i-th motif position and returns next index in x.
Double_t LowBorderY() const
virtual void MotifCenter(Int_t motifPositionId, Double_t &x, Double_t &y) const =0
Fill the coordinates of the motif specified with the given motif position Id.
Double_t UpperBorderY() const
Double_t GetDimensionY() const
Base class that defines the limits of global pad indices.
static Double_t LengthTolerance()
Return the length precision for tests.
virtual AliMpVPadIterator * CreateIterator() const
Create iterator over this element.
An interface for a row segment.
void SetHighIndicesLimit(MpPair_t limit, Bool_t valid=true)
Double_t GetDimensionX() const
AliMpVRowSegment * GetRowSegment(Int_t i) const
AliMpVRowSegment * FindRowSegment(Double_t x) const
TList fSegments
row segments
An interface for an iterator over pads.
void AddRowSegment(AliMpVRowSegment *rowSegment)
A row composed of the row segments.
virtual Int_t GetMotifPositionId(Int_t i) const =0
Return the i-th motif position Id of this row segment.
void SetGlobalIndices(AliMp::Direction constPadSizeDirection, AliMpRow *rowBefore)
virtual void SetOffset(Double_t x, Double_t y)=0
Calculate offset.
void SetHighIndicesLimits(Int_t iy)
static Int_t StartPadIndex()
Return global pad indices start value.
Abstract base class for a motif with its unique ID and the motif type.
Double_t SetOffsetY(Double_t offsetY)
virtual Double_t HalfSizeY() const =0
Return the half size in y of this row segment.
AliMpMotifPosition * FindMotifPosition(Int_t motifPositionID) const
void AddRowSegmentInFront(AliMpVRowSegment *rowSegment)
virtual Double_t LeftBorderX() const =0
Return the x coordinate of the left border in the global coordinate system.
Int_t GetNofRowSegments() const
Int_t GetHighLimitIx() const
virtual Double_t RightBorderX() const =0
Return the x coordinate of the right border in the global coordinate system.
virtual Int_t GetNofMotifs() const =0
Return the number of motifs in this this row segment.
virtual AliMpVMotif * GetMotif(Int_t i) const =0
Return the i-th motif of this row segment.
AliMpMotifMap * GetMotifMap() const
Return the motif map associated with its sector.