]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpSubZone.cxx
Coding conventions corrections only
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpSubZone.cxx
CommitLineData
5f91c9e8 1// $Id$
2// Category: sector
3//
4// Class AliMpSubZone
5// ------------------
6// Class describing a zone segment composed of the
7// line segments with the same motif type.
8//
9// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10
11#include <Riostream.h>
12
13#include "AliMpSubZone.h"
14#include "AliMpVRowSegment.h"
15#include "AliMpVMotif.h"
16
17ClassImp(AliMpSubZone)
18
19//_____________________________________________________________________________
20AliMpSubZone::AliMpSubZone(AliMpVMotif* motif)
21 : TObject(),
22 fMotif(motif)
23{
24//
25}
26
27//_____________________________________________________________________________
28AliMpSubZone::AliMpSubZone()
29 : TObject(),
30 fMotif(0)
31{
32//
33}
34
35//_____________________________________________________________________________
36AliMpSubZone::~AliMpSubZone() {
37//
38}
39
40//_____________________________________________________________________________
41void AliMpSubZone::AddRowSegment(AliMpVRowSegment* rowSegment)
42{
43// Adds row segment.
44// ---
45
46 fSegments.push_back(rowSegment);
47}
48
49
50//_____________________________________________________________________________
2998a151 51void AliMpSubZone::Print(const char* /*option*/) const
5f91c9e8 52{
53// Prints motif position Ids for all row segments.
54// --
55
56 for (Int_t i=0; i<GetNofRowSegments(); i++) {
57 AliMpVRowSegment* rowSegment = GetRowSegment(i);
58
59 cout << rowSegment->GetNofMotifs() << " ";
60
61 for (Int_t j=0; j<rowSegment->GetNofMotifs(); j++)
62 cout << rowSegment->GetMotifPositionId(j) << " ";
63
64 cout << endl;
65 }
66}
67
68//_____________________________________________________________________________
69Int_t AliMpSubZone::GetNofRowSegments() const
70{
71// Returns number of row segments.
72
73 return fSegments.size();
74}
75
76//_____________________________________________________________________________
77AliMpVRowSegment* AliMpSubZone::GetRowSegment(Int_t i) const
78{
79 if (i<0 || i>=GetNofRowSegments()) {
80 Warning("GetRowSegment", "Index outside range");
81 return 0;
82 }
83
84 return fSegments[i];
85}
86
87//_____________________________________________________________________________
88AliMpVMotif* AliMpSubZone:: GetMotif() const
89{
90// Returns the motif.
91// ---
92
93 return fMotif;
94}