]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: motif | |
3 | // | |
4 | // Class AliMpMotifType | |
5 | // -------------------- | |
6 | // Class that defines the motif properties. | |
7 | // | |
8 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
9 | ||
10 | #ifndef ALI_MP_MOTIF_TYPE_H | |
11 | #define ALI_MP_MOTIF_TYPE_H | |
12 | ||
13 | #include <TObject.h> | |
14 | #include <TString.h> | |
15 | #include <TVector2.h> | |
16 | #include <TObjArray.h> | |
17 | ||
18 | #include "AliMpMotifTypes.h" | |
19 | #include "AliMpIntPair.h" | |
20 | ||
21 | class AliMpConnection; | |
22 | class AliMpVPadIterator; | |
23 | ||
24 | class AliMpMotifType : public TObject | |
25 | { | |
26 | public: | |
27 | AliMpMotifType(const TString &id); | |
28 | AliMpMotifType(); | |
29 | virtual ~AliMpMotifType(); | |
30 | ||
31 | virtual AliMpVPadIterator* CreateIterator() const; | |
32 | ||
33 | // find methods | |
34 | AliMpConnection *FindConnectionByPadNum(Int_t padNum) const; | |
35 | AliMpConnection *FindConnectionByLocalIndices(AliMpIntPair localIndices) const; | |
36 | AliMpConnection *FindConnectionByGassiNum(Int_t gassiNum) const; | |
37 | AliMpConnection *FindConnectionByKaptonNum(Int_t kaptonNum) const; | |
38 | AliMpConnection *FindConnectionByBergNum(Int_t bergNum) const; | |
39 | ||
40 | AliMpIntPair FindLocalIndicesByPadNum(Int_t padNum) const; | |
41 | AliMpIntPair FindLocalIndicesByGassiNum(Int_t gassiNum) const; | |
42 | AliMpIntPair FindLocalIndicesByKaptonNum(Int_t kaptonNum) const; | |
43 | AliMpIntPair FindLocalIndicesByBergNum(Int_t bergNum) const; | |
44 | AliMpIntPair FindLocalIndicesByConnection(const AliMpConnection* connection); | |
45 | ||
46 | // set methods | |
47 | void SetNofPads(Int_t nofPadsX, Int_t nofPadY); | |
48 | void SetVerboseLevel(Int_t level){fVerboseLevel=level;} | |
49 | ||
50 | // get methods | |
51 | TString GetID() const {return fID;} | |
52 | Int_t GetNofPadsX() const {return fNofPadsX;} | |
53 | Int_t GetNofPadsY() const {return fNofPadsY;} | |
54 | Int_t GetNofPads() const {return fConnections.size();} | |
55 | ||
56 | // Other methods | |
57 | void AddConnection(const AliMpIntPair &localIndices, | |
58 | AliMpConnection* connection); | |
59 | virtual void Print(Option_t *option) const; | |
60 | Int_t PadNum(const TString &padName) const; | |
61 | TString PadName(Int_t padNum) const; | |
62 | Bool_t HasPad(const AliMpIntPair& localIndices) const; | |
63 | Bool_t IsFull() const; | |
64 | ||
65 | private: | |
66 | // static data members | |
67 | static const Int_t fgkPadNumForA; | |
68 | ||
69 | // data members | |
70 | TString fID; // unique motif ID | |
71 | Int_t fNofPadsX; // number of pads in x direction | |
72 | Int_t fNofPadsY; // number of pads in y direction | |
73 | Int_t fVerboseLevel; // verbose level | |
74 | ||
75 | ConnectionMap_t fConnections; //! Map (ix,iy) of connections | |
76 | // EXCLUDED FOR CINT (does not compile on HP) | |
77 | ||
78 | ClassDef(AliMpMotifType,1) //Motif type | |
79 | }; | |
80 | ||
81 | // inline functions | |
82 | ||
83 | inline Bool_t AliMpMotifType::IsFull() const | |
84 | { return GetNofPads() == fNofPadsX*fNofPadsY; } | |
85 | ||
86 | #endif //ALI_MP_MOTIF_TYPE_H | |
87 |