]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpSubZone.cxx
Updated comments for Doxygen - corrected warnings
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSubZone.cxx
CommitLineData
dee1d5f1 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
5f91c9e8 16// $Id$
13985652 17// $MpId: AliMpSubZone.cxx,v 1.8 2006/05/24 13:58:46 ivana Exp $
5f91c9e8 18// Category: sector
19//
20// Class AliMpSubZone
21// ------------------
22// Class describing a zone segment composed of the
23// line segments with the same motif type.
dbe945cc 24// Included in AliRoot: 2003/05/02
5f91c9e8 25// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
26
5f91c9e8 27#include "AliMpSubZone.h"
28#include "AliMpVRowSegment.h"
29#include "AliMpVMotif.h"
30
2c605e66 31#include "AliLog.h"
32
33#include <Riostream.h>
34
13985652 35/// \cond CLASSIMP
5f91c9e8 36ClassImp(AliMpSubZone)
13985652 37/// \endcond
5f91c9e8 38
39//_____________________________________________________________________________
40AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
41 : TObject(),
42 fMotif(motif)
43{
dee1d5f1 44/// Standard constructor
5f91c9e8 45}
46
47//_____________________________________________________________________________
48AliMpSubZone::AliMpSubZone()
49 : TObject(),
50 fMotif(0)
51{
dee1d5f1 52/// Default constructor
5f91c9e8 53}
54
fb1bf5c0 55//_____________________________________________________________________________
56AliMpSubZone::AliMpSubZone(const AliMpSubZone& right)
dee1d5f1 57 : TObject(right)
58{
59/// Protected copy constructor (not provided)
60
fb1bf5c0 61 Fatal("AliMpSubZone", "Copy constructor not provided.");
62}
63
5f91c9e8 64//_____________________________________________________________________________
dee1d5f1 65AliMpSubZone::~AliMpSubZone()
66{
67// Destructor
5f91c9e8 68}
69
fb1bf5c0 70//
71// operators
72//
73
74//_____________________________________________________________________________
75AliMpSubZone& AliMpSubZone::operator=(const AliMpSubZone& right)
76{
dee1d5f1 77/// Protected assignment operator (not provided)
78
79 // check assignment to self
fb1bf5c0 80 if (this == &right) return *this;
81
dee1d5f1 82 Fatal("operator =", "Assignment operator not provided.");
fb1bf5c0 83
84 return *this;
85}
86
87//
88// public methods
89//
90
5f91c9e8 91//_____________________________________________________________________________
92void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
93{
dee1d5f1 94/// Add row segment.
5f91c9e8 95
f79c58a5 96#ifdef WITH_STL
5f91c9e8 97 fSegments.push_back(rowSegment);
f79c58a5 98#endif
99
100#ifdef WITH_ROOT
101 fSegments.Add(rowSegment);
102#endif
5f91c9e8 103}
104
105
106//_____________________________________________________________________________
2998a151 107void AliMpSubZone::Print(const char* /*option*/) const
5f91c9e8 108{
dee1d5f1 109/// Print motif position Ids for all row segments.
5f91c9e8 110
111 for (Int_t i=0; i<GetNofRowSegments(); i++) {
112 AliMpVRowSegment* rowSegment = GetRowSegment(i);
113
114 cout << rowSegment->GetNofMotifs() << " ";
115
116 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
117 cout << rowSegment->GetMotifPositionId(j) << " ";
118
119 cout << endl;
120 }
121}
122
123//_____________________________________________________________________________
124Int_t AliMpSubZone::GetNofRowSegments() const
125{
dee1d5f1 126/// Return number of row segments.
5f91c9e8 127
f79c58a5 128#ifdef WITH_STL
5f91c9e8 129 return fSegments.size();
f79c58a5 130#endif
131
132#ifdef WITH_ROOT
133 return fSegments.GetSize();
134#endif
5f91c9e8 135}
136
137//_____________________________________________________________________________
138AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
139{
dee1d5f1 140/// Return i-th row segment.
fb1bf5c0 141
5f91c9e8 142 if (i<0 || i>=GetNofRowSegments()) {
2c605e66 143 AliErrorStream() << "Index outside range" << endl;
5f91c9e8 144 return 0;
145 }
146
f79c58a5 147#ifdef WITH_STL
5f91c9e8 148 return fSegments[i];
f79c58a5 149#endif
150
151#ifdef WITH_ROOT
152 return (AliMpVRowSegment*)fSegments.At(i);
153#endif
5f91c9e8 154}
155
156//_____________________________________________________________________________
157AliMpVMotif* AliMpSubZone:: GetMotif() const
158{
dee1d5f1 159/// Return the motif.
5f91c9e8 160
161 return fMotif;
162}