Added copy constructor and assignement operator (I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVPadRowSegment.cxx
CommitLineData
ea4cae7a 1// $Id$
2// Category: sector
3//
4// Class AliMpVPadRowSegment
5// --------------------
6// The abstract base class for a pad row segment composed of the
7// the identic pads.
8//
9// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10
11#include <TError.h>
12
13#include "AliMpVPadRowSegment.h"
14#include "AliMpPadRow.h"
15#include "AliMpMotif.h"
16#include "AliMpMotifType.h"
17
18ClassImp(AliMpVPadRowSegment)
19
20//_____________________________________________________________________________
21AliMpVPadRowSegment::AliMpVPadRowSegment(AliMpPadRow* padRow, AliMpMotif* motif,
22 Int_t motifPositionId, Int_t nofPads)
23 : TObject(),
24 fNofPads(nofPads),
25 fOffsetX(0.),
26 fPadRow(padRow),
27 fMotif(motif),
28 fMotifPositionId(motifPositionId)
29{
30//
31}
32
33//_____________________________________________________________________________
34AliMpVPadRowSegment::AliMpVPadRowSegment()
35 : TObject(),
36 fNofPads(0),
37 fOffsetX(0.),
38 fPadRow(0),
39 fMotif(0),
40 fMotifPositionId(0)
41{
42//
43}
44
45//_____________________________________________________________________________
fb1bf5c0 46AliMpVPadRowSegment::AliMpVPadRowSegment(const AliMpVPadRowSegment& right)
47 : TObject(right) {
48//
49 Fatal("AliMpVPadRowSegment", "Copy constructor not provided.");
50}
51
52//_____________________________________________________________________________
ea4cae7a 53AliMpVPadRowSegment::~AliMpVPadRowSegment() {
54//
55}
56
57//
fb1bf5c0 58// operators
59//
60
61//_____________________________________________________________________________
62AliMpVPadRowSegment&
63AliMpVPadRowSegment::operator=(const AliMpVPadRowSegment& right)
64{
65 // check assignement to self
66 if (this == &right) return *this;
67
68 Fatal("operator =", "Assignement operator not provided.");
69
70 return *this;
71}
72
73//
ea4cae7a 74// public methods
75//
76
77//_____________________________________________________________________________
78Double_t AliMpVPadRowSegment::HalfSizeY() const
79{
80// Returns the size in y of this row segment.
81// ---
82
83 return fMotif->GetPadDimensions().Y();
84}
85
86//_____________________________________________________________________________
87AliMpPadRow* AliMpVPadRowSegment::GetPadRow() const
88{
89// Returns the pad row.which this pad row segment belongs to.
90// ---
91
92 return fPadRow;
93}
94
95//_____________________________________________________________________________
96AliMpMotif* AliMpVPadRowSegment::GetMotif() const
97{
98// Returns the motif of this pad row segment.
99// ---
100
101 return fMotif;
102}
103
104//_____________________________________________________________________________
105Int_t AliMpVPadRowSegment::GetMotifPositionId() const
106{
107// Returns the motif of this pad row segment.
108// ---
109
110 return fMotifPositionId;
111}
112
113//_____________________________________________________________________________
114void AliMpVPadRowSegment::SetOffsetX(Double_t offsetX)
115{
116// Sets the x offset.
117// ---
118
119 fOffsetX = offsetX;
120}
121