6 // Class describing a zone segment composed of the
7 // line segments with the same motif type.
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
11 #include <Riostream.h>
13 #include "AliMpSubZone.h"
14 #include "AliMpVRowSegment.h"
15 #include "AliMpVMotif.h"
17 ClassImp(AliMpSubZone)
19 //_____________________________________________________________________________
20 AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
27 //_____________________________________________________________________________
28 AliMpSubZone::AliMpSubZone()
35 //_____________________________________________________________________________
36 AliMpSubZone::~AliMpSubZone() {
40 //_____________________________________________________________________________
41 void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
47 fSegments.push_back(rowSegment);
51 fSegments.Add(rowSegment);
56 //_____________________________________________________________________________
57 void AliMpSubZone::Print(const char* /*option*/) const
59 // Prints motif position Ids for all row segments.
62 for (Int_t i=0; i<GetNofRowSegments(); i++) {
63 AliMpVRowSegment* rowSegment = GetRowSegment(i);
65 cout << rowSegment->GetNofMotifs() << " ";
67 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
68 cout << rowSegment->GetMotifPositionId(j) << " ";
74 //_____________________________________________________________________________
75 Int_t AliMpSubZone::GetNofRowSegments() const
77 // Returns number of row segments.
80 return fSegments.size();
84 return fSegments.GetSize();
88 //_____________________________________________________________________________
89 AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
91 if (i<0 || i>=GetNofRowSegments()) {
92 Warning("GetRowSegment", "Index outside range");
101 return (AliMpVRowSegment*)fSegments.At(i);
105 //_____________________________________________________________________________
106 AliMpVMotif* AliMpSubZone:: GetMotif() const
108 // Returns the motif.