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.6 2005/08/26 15:43:36 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 <Riostream.h>
30 #include "AliMpSubZone.h"
31 #include "AliMpVRowSegment.h"
32 #include "AliMpVMotif.h"
34 ClassImp(AliMpSubZone)
36 //_____________________________________________________________________________
37 AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
41 /// Standard constructor
44 //_____________________________________________________________________________
45 AliMpSubZone::AliMpSubZone()
49 /// Default constructor
52 //_____________________________________________________________________________
53 AliMpSubZone::AliMpSubZone(const AliMpSubZone& right)
56 /// Protected copy constructor (not provided)
58 Fatal("AliMpSubZone", "Copy constructor not provided.");
61 //_____________________________________________________________________________
62 AliMpSubZone::~AliMpSubZone()
71 //_____________________________________________________________________________
72 AliMpSubZone& AliMpSubZone::operator=(const AliMpSubZone& right)
74 /// Protected assignment operator (not provided)
76 // check assignment to self
77 if (this == &right) return *this;
79 Fatal("operator =", "Assignment operator not provided.");
88 //_____________________________________________________________________________
89 void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
94 fSegments.push_back(rowSegment);
98 fSegments.Add(rowSegment);
103 //_____________________________________________________________________________
104 void AliMpSubZone::Print(const char* /*option*/) const
106 /// Print motif position Ids for all row segments.
108 for (Int_t i=0; i<GetNofRowSegments(); i++) {
109 AliMpVRowSegment* rowSegment = GetRowSegment(i);
111 cout << rowSegment->GetNofMotifs() << " ";
113 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
114 cout << rowSegment->GetMotifPositionId(j) << " ";
120 //_____________________________________________________________________________
121 Int_t AliMpSubZone::GetNofRowSegments() const
123 /// Return number of row segments.
126 return fSegments.size();
130 return fSegments.GetSize();
134 //_____________________________________________________________________________
135 AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
137 /// Return i-th row segment.
139 if (i<0 || i>=GetNofRowSegments()) {
140 Warning("GetRowSegment", "Index outside range");
149 return (AliMpVRowSegment*)fSegments.At(i);
153 //_____________________________________________________________________________
154 AliMpVMotif* AliMpSubZone:: GetMotif() const
156 /// Return the motif.