]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpConnection.h
Mapping test macros (D. Guez, I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConnection.h
1 // $Id$
2 // Category: motif
3 //
4 // Class AliMpConnection
5 // ---------------------
6 // Class that defines a connexion properties.
7 //
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10 #ifndef ALI_MP_CONNECTION_H
11 #define ALI_MP_CONNECTION_H
12
13 #include <TObject.h>
14 #include <TString.h>
15
16 #include "AliMpMotifType.h"
17 #include "AliMpIntPair.h"
18
19 class AliMpConnection : public TObject
20 {
21   public:
22     AliMpConnection();
23     AliMpConnection(Int_t padNum,Int_t bergNum,Int_t kaptonNum,Int_t gassiNum);
24     virtual ~AliMpConnection();
25
26     // methods
27
28     // accessors
29     Int_t GetBergNum()   const {return fBergNum;}
30     Int_t GetKaptonNum() const {return fKaptonNum;}
31     Int_t GetGassiNum()  const {return fGassiNum;}
32     Int_t GetPadNum()  const {return fPadNum;}
33     AliMpMotifType *GetOwner() const {return fOwner;}
34     
35     AliMpIntPair LocalIndices() const;
36     TString  PadName() const;
37     // modifiers
38     void SetOwner(AliMpMotifType *owner) {fOwner=owner;}
39
40   protected:
41     AliMpConnection(const AliMpConnection& right);
42
43     // operators
44     AliMpConnection& operator=(const AliMpConnection& right);
45     
46   private:
47     // data members
48     Int_t fPadNum;    // Pad number
49     Int_t fBergNum;   // Berg connector number
50     Int_t fKaptonNum; // Kapton connector number
51     Int_t fGassiNum;  // Gassiplex channel number
52     AliMpMotifType *fOwner; //The motif type which contains this connection
53
54   ClassDef(AliMpConnection,1)  // Connection description
55 };
56
57 // inline functions
58
59 inline TString AliMpConnection::PadName() const 
60 { return fOwner->PadName(fPadNum); }
61
62 inline AliMpIntPair AliMpConnection::LocalIndices() const
63 { return fOwner->FindLocalIndicesByConnection(this);}
64
65 #endif //ALI_MP_CONNECTION_H