]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpConnection.h
Code for MUON Station1 (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
15 #include "AliMpMotifType.h"
16 #include "AliMpIntPair.h"
17
18 class AliMpConnection : public TObject
19 {
20   public:
21     AliMpConnection();
22     AliMpConnection(Int_t padNum,Int_t bergNum,Int_t kaptonNum,Int_t gassiNum);
23     virtual ~AliMpConnection();
24
25     // methods
26
27     // accessors
28     Int_t GetBergNum()   const {return fBergNum;}
29     Int_t GetKaptonNum() const {return fKaptonNum;}
30     Int_t GetGassiNum()  const {return fGassiNum;}
31     Int_t GetPadNum()  const {return fPadNum;}
32     AliMpMotifType *GetOwner() const {return fOwner;}
33     
34     AliMpIntPair LocalIndices() const;
35     TString  PadName() const;
36     // modifiers
37     void SetOwner(AliMpMotifType *owner) {fOwner=owner;}
38
39   private:
40     // data members
41     Int_t fPadNum;    // Pad number
42     Int_t fBergNum;   // Berg connector number
43     Int_t fKaptonNum; // Kapton connector number
44     Int_t fGassiNum;  // Gassiplex channel number
45     AliMpMotifType *fOwner; //The motif type which contains this connection
46
47   ClassDef(AliMpConnection,1)  // Connection description
48 };
49
50 // inline functions
51
52 inline TString AliMpConnection::PadName() const 
53 { return fOwner->PadName(fPadNum); }
54
55 inline AliMpIntPair AliMpConnection::LocalIndices() const
56 { return fOwner->FindLocalIndicesByConnection(this);}
57
58 #endif //ALI_MP_CONNECTION_H