]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifPosition.h
- Updated for modifs in AliMpFiles
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifPosition.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpMotifPosition.h,v 1.6 2005/08/26 15:43:36 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpMotifPosition
9 /// \brief A placed motif.
10 ///
11 /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_MOTIF_POSITION_H
14 #define ALI_MP_MOTIF_POSITION_H
15
16 #include <TVector2.h>
17
18 #include "AliMpVIndexed.h"
19 #include "AliMpVMotif.h"
20
21 class AliMpVPadIterator;
22
23 class AliMpMotifPosition : public AliMpVIndexed
24 {
25  public:
26   AliMpMotifPosition(Int_t id, AliMpVMotif* motif, TVector2 position);
27   AliMpMotifPosition();
28   virtual ~AliMpMotifPosition();
29
30   // methods
31   virtual AliMpVPadIterator* CreateIterator() const;
32
33   // get methods
34   Int_t        GetID() const;
35   AliMpVMotif* GetMotif() const;
36   Bool_t       HasPad(const AliMpIntPair& indices) const;
37
38   // Geometry
39   TVector2 Position() const;
40   TVector2 Dimensions() const;
41   
42   // Sets the ID (which is the MANU ID)
43   void SetID(Int_t id); 
44   // Sets the position.
45   void SetPosition(const TVector2& pos);
46
47   void Print(Option_t* option="") const;
48
49  protected:
50   AliMpMotifPosition(const AliMpMotifPosition& right);
51   AliMpMotifPosition&  operator = (const AliMpMotifPosition& right);
52
53  private:
54   // methods
55   // data members 
56   Int_t         fID;       //identifier=manu id
57   AliMpVMotif*  fMotif;    //motif
58   TVector2      fPosition; //position
59
60   ClassDef(AliMpMotifPosition,1) // A motif position
61 };
62
63 // inline functions
64
65 inline Int_t  AliMpMotifPosition::GetID() const 
66 { return fID; }
67
68 inline AliMpVMotif*  AliMpMotifPosition::GetMotif() const
69 { return fMotif; }
70  
71 inline TVector2 AliMpMotifPosition::Position() const
72 { return fPosition; }
73
74 inline TVector2 AliMpMotifPosition::Dimensions() const
75 { return fMotif->Dimensions(); }
76
77 #endif //ALI_MP_MOTIF_POSITION_H