Added copy constructor and assignement operator (I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifPosition.cxx
CommitLineData
5f91c9e8 1// $Id$
2//
3// Author: Ivana Hrivnacova, IPN Orsay
4
fb1bf5c0 5#include <TError.h>
6
5f91c9e8 7#include "AliMpMotifPosition.h"
8#include "AliMpMotifPositionPadIterator.h"
9#include "AliMpMotifType.h"
10
11ClassImp(AliMpMotifPosition)
12
13//______________________________________________________________________________
14AliMpMotifPosition::AliMpMotifPosition(Int_t id, AliMpVMotif* motif,
15 TVector2 position)
16 : AliMpVIndexed(),
17 fID(id),
18 fMotif(motif),
19 fPosition(position) {
20//
21}
22
23//______________________________________________________________________________
24AliMpMotifPosition::AliMpMotifPosition()
25 : AliMpVIndexed(),
26 fID(0),
27 fMotif(0),
28 fPosition(TVector2(0.,0.)) {
29//
30}
31
fb1bf5c0 32//_____________________________________________________________________________
33AliMpMotifPosition::AliMpMotifPosition(const AliMpMotifPosition& right)
34 : AliMpVIndexed(right) {
35//
36 Fatal("AliMpMotifPosition", "Copy constructor not provided.");
37}
38
5f91c9e8 39//______________________________________________________________________________
40AliMpMotifPosition::~AliMpMotifPosition(){
41//
42}
43
fb1bf5c0 44// operators
45
46//_____________________________________________________________________________
47AliMpMotifPosition&
48AliMpMotifPosition::operator=(const AliMpMotifPosition& right)
49{
50 // check assignement to self
51 if (this == &right) return *this;
52
53 Fatal("operator =", "Assignement operator not provided.");
54
55 return *this;
56}
57
5f91c9e8 58//______________________________________________________________________________
59AliMpVPadIterator* AliMpMotifPosition::CreateIterator() const
60{
61// Iterator is not yet implemented.
62//
63
64 return new AliMpMotifPositionPadIterator(this);
65}
66
67//______________________________________________________________________________
68Bool_t AliMpMotifPosition::HasPad(const AliMpIntPair& indices) const
69{
70// Returns true if pad with the specified indices exists in
71// this motif position.
72// ---
73
74 if (!HasIndices(indices)) return kFALSE;
75
76 if (fMotif->GetMotifType()->IsFull()) return kTRUE;
77
78 return fMotif->GetMotifType()->HasPad(indices-GetLowIndicesLimit());
79}
80