6 // Class describing a zone segment composed of the
7 // line segments with the same motif type.
8 // Included in AliRoot: 2003/05/02
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
11 #include <Riostream.h>
14 #include "AliMpSubZone.h"
15 #include "AliMpVRowSegment.h"
16 #include "AliMpVMotif.h"
18 ClassImp(AliMpSubZone)
20 //_____________________________________________________________________________
21 AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
28 //_____________________________________________________________________________
29 AliMpSubZone::AliMpSubZone()
36 //_____________________________________________________________________________
37 AliMpSubZone::AliMpSubZone(const AliMpSubZone& right)
40 Fatal("AliMpSubZone", "Copy constructor not provided.");
43 //_____________________________________________________________________________
44 AliMpSubZone::~AliMpSubZone() {
52 //_____________________________________________________________________________
53 AliMpSubZone& AliMpSubZone::operator=(const AliMpSubZone& right)
55 // check assignement to self
56 if (this == &right) return *this;
58 Fatal("operator =", "Assignement operator not provided.");
67 //_____________________________________________________________________________
68 void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
74 fSegments.push_back(rowSegment);
78 fSegments.Add(rowSegment);
83 //_____________________________________________________________________________
84 void AliMpSubZone::Print(const char* /*option*/) const
86 // Prints motif position Ids for all row segments.
89 for (Int_t i=0; i<GetNofRowSegments(); i++) {
90 AliMpVRowSegment* rowSegment = GetRowSegment(i);
92 cout << rowSegment->GetNofMotifs() << " ";
94 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
95 cout << rowSegment->GetMotifPositionId(j) << " ";
101 //_____________________________________________________________________________
102 Int_t AliMpSubZone::GetNofRowSegments() const
104 // Returns number of row segments.
108 return fSegments.size();
112 return fSegments.GetSize();
116 //_____________________________________________________________________________
117 AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
119 // Returns i-th row segment.
122 if (i<0 || i>=GetNofRowSegments()) {
123 Warning("GetRowSegment", "Index outside range");
132 return (AliMpVRowSegment*)fSegments.At(i);
136 //_____________________________________________________________________________
137 AliMpVMotif* AliMpSubZone:: GetMotif() const
139 // Returns the motif.