4 // Class AliMpMotifType
5 // --------------------
6 // Class that defines the motif properties.
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10 #ifndef ALI_MP_MOTIF_TYPE_H
11 #define ALI_MP_MOTIF_TYPE_H
16 #include "AliMpMotifTypes.h"
17 #include "AliMpIntPair.h"
19 class AliMpConnection;
20 class AliMpVPadIterator;
22 class AliMpMotifType : public TObject
25 AliMpMotifType(const TString &id);
27 virtual ~AliMpMotifType();
29 virtual AliMpVPadIterator* CreateIterator() const;
32 AliMpConnection *FindConnectionByPadNum(Int_t padNum) const;
33 AliMpConnection *FindConnectionByLocalIndices(
34 const AliMpIntPair& localIndices) const;
35 AliMpConnection *FindConnectionByGassiNum(Int_t gassiNum) const;
36 AliMpConnection *FindConnectionByKaptonNum(Int_t kaptonNum) const;
37 AliMpConnection *FindConnectionByBergNum(Int_t bergNum) const;
39 AliMpIntPair FindLocalIndicesByPadNum(Int_t padNum) const;
40 AliMpIntPair FindLocalIndicesByGassiNum(Int_t gassiNum) const;
41 AliMpIntPair FindLocalIndicesByKaptonNum(Int_t kaptonNum) const;
42 AliMpIntPair FindLocalIndicesByBergNum(Int_t bergNum) const;
43 AliMpIntPair FindLocalIndicesByConnection(const AliMpConnection* connection);
46 void SetNofPads(Int_t nofPadsX, Int_t nofPadY);
47 void SetVerboseLevel(Int_t level){fVerboseLevel=level;}
50 TString GetID() const {return fID;}
51 Int_t GetNofPadsX() const {return fNofPadsX;}
52 Int_t GetNofPadsY() const {return fNofPadsY;}
53 Int_t GetNofPads() const {return fConnections.size();}
56 void AddConnection(const AliMpIntPair &localIndices,
57 AliMpConnection* connection);
58 virtual void Print(Option_t *option) const;
59 Int_t PadNum(const TString &padName) const;
60 TString PadName(Int_t padNum) const;
61 Bool_t HasPad(const AliMpIntPair& localIndices) const;
62 Bool_t IsFull() const;
65 // static data members
66 static const Int_t fgkPadNumForA; // the pad number for the pad "A"
69 TString fID; // unique motif ID
70 Int_t fNofPadsX; // number of pads in x direction
71 Int_t fNofPadsY; // number of pads in y direction
72 Int_t fVerboseLevel; // verbose level
74 ConnectionMap_t fConnections; //! Map (ix,iy) of connections
75 // EXCLUDED FOR CINT (does not compile on HP)
77 ClassDef(AliMpMotifType,1) //Motif type
82 inline Bool_t AliMpMotifType::IsFull() const
83 { return GetNofPads() == fNofPadsX*fNofPadsY; }
85 #endif //ALI_MP_MOTIF_TYPE_H