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