1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 // $MpId: AliMpSubZone.cxx,v 1.8 2006/05/24 13:58:46 ivana Exp $
22 // Class describing a zone segment composed of the
23 // line segments with the same motif type.
24 // Included in AliRoot: 2003/05/02
25 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
27 #include "AliMpSubZone.h"
28 #include "AliMpVRowSegment.h"
29 #include "AliMpVMotif.h"
33 #include <Riostream.h>
36 ClassImp(AliMpSubZone)
39 //_____________________________________________________________________________
40 AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
45 /// Standard constructor
48 //_____________________________________________________________________________
49 AliMpSubZone::AliMpSubZone()
54 /// Default constructor
57 //_____________________________________________________________________________
58 AliMpSubZone::~AliMpSubZone()
67 //_____________________________________________________________________________
68 void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
73 fSegments.push_back(rowSegment);
77 fSegments.Add(rowSegment);
82 //_____________________________________________________________________________
83 void AliMpSubZone::Print(const char* /*option*/) const
85 /// Print motif position Ids for all row segments.
87 for (Int_t i=0; i<GetNofRowSegments(); i++) {
88 AliMpVRowSegment* rowSegment = GetRowSegment(i);
90 cout << rowSegment->GetNofMotifs() << " ";
92 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
93 cout << rowSegment->GetMotifPositionId(j) << " ";
99 //_____________________________________________________________________________
100 Int_t AliMpSubZone::GetNofRowSegments() const
102 /// Return number of row segments.
105 return fSegments.size();
109 return fSegments.GetSize();
113 //_____________________________________________________________________________
114 AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
116 /// Return i-th row segment.
118 if (i<0 || i>=GetNofRowSegments()) {
119 AliErrorStream() << "Index outside range" << endl;
128 return (AliMpVRowSegment*)fSegments.At(i);
132 //_____________________________________________________________________________
133 AliMpVMotif* AliMpSubZone:: GetMotif() const
135 /// Return the motif.