1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpVMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
9 /// \brief Abstract base class for a motif with its unique ID and the motif type.
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
13 #ifndef ALI_MP_V_MOTIF_H
14 #define ALI_MP_V_MOTIF_H
21 class AliMpConnection;
24 class AliMpVMotif : public TObject
27 AliMpVMotif(const TString &id, AliMpMotifType *motifType);
29 virtual ~AliMpVMotif();
32 AliMpMotifType *GetMotifType() const;
33 TString GetID() const;
34 /// Return the number of pad dimensions
35 virtual Int_t GetNofPadDimensions() const=0;
36 /// Return the i-th pad dimensions
37 virtual TVector2 GetPadDimensions(Int_t i) const=0;
38 /// Return the dimensions of the pad specified by localIndices
39 virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const=0;
43 virtual TVector2 Dimensions() const=0;
46 AliMpConnection *FindConnectionByLocalPos(const TVector2& localPos) const;
47 virtual void Print(Option_t *option) const;
48 /// Return local position of the pad specified by local indices
49 virtual TVector2 PadPositionLocal(const AliMpIntPair& localIndices) const=0;
50 /// Return local indices of the pad specified by local position
51 virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const=0;
55 AliMpVMotif(const AliMpVMotif& right);
57 AliMpVMotif& operator = (const AliMpVMotif& right);
60 TString fID; ///< identifier
61 AliMpMotifType *fMotifType; ///< the motif type
63 ClassDef(AliMpVMotif,1) // A motif with its ID
68 /// Return the motif type
69 inline AliMpMotifType* AliMpVMotif::GetMotifType() const {return fMotifType;}
71 /// Return the motif identifier
72 inline TString AliMpVMotif::GetID() const {return fID;}
74 #endif //ALI_MP_V_MOTIF_H