]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpConnection.h
From Cvetan: new macro to load ITS clusters.
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConnection.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpConnection.h,v 1.9 2006/05/24 13:58:18 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpConnection
9 /// \brief A connection properties.
10 ///
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_CONNECTION_H
14 #define ALI_MP_CONNECTION_H
15
16 #include <TObject.h>
17
18 #include "AliMpMotifType.h"
19 #include "AliMpIntPair.h"
20
21 #include <TString.h>
22
23 class AliMpConnection : public TObject
24 {
25   public:
26     AliMpConnection();
27     AliMpConnection(Int_t padNum,Int_t bergNum,Int_t kaptonNum,Int_t gassiNum);
28     virtual ~AliMpConnection();
29
30     // methods
31
32     //
33     // accessors
34     //
35           /// Return Berg connector number
36     Int_t GetBergNum()   const {return fBergNum;}
37           /// Return kapton connector number
38     Int_t GetKaptonNum() const {return fKaptonNum;}
39           /// Return Gassiplex channel number
40     Int_t GetGassiNum()  const {return fGassiNum;}
41           /// Return pad number
42     Int_t GetPadNum()  const {return fPadNum;}
43           /// Return the motif type which contains this connection
44     AliMpMotifType *GetOwner() const {return fOwner;}
45     
46     void SetGassiNum(Int_t n) { fGassiNum = n; }
47     
48     AliMpIntPair LocalIndices() const;
49     TString  PadName() const;
50     
51     //
52     // modifiers
53     //
54           /// Set the motif type which contains this connection
55     void SetOwner(AliMpMotifType *owner) {fOwner=owner;}
56
57   private:
58     /// Not implemented
59     AliMpConnection(const AliMpConnection& right);
60     /// Not implemented
61     AliMpConnection& operator=(const AliMpConnection& right);
62
63     // data members
64     Int_t fPadNum;    ///< Pad number
65     Int_t fBergNum;   ///< Berg connector number
66     Int_t fKaptonNum; ///< Kapton connector number
67     Int_t fGassiNum;  ///< Gassiplex channel number
68     AliMpMotifType *fOwner; ///< The motif type which contains this connection
69
70   ClassDef(AliMpConnection,1)  // Connection description
71 };
72
73 // inline functions
74
75           /// Return the pad number converted to a name
76 inline TString AliMpConnection::PadName() const 
77 { return fOwner->PadName(fPadNum); }
78
79           /// Return the local indices of this pad in the motif
80 inline AliMpIntPair AliMpConnection::LocalIndices() const
81 { return fOwner->FindLocalIndicesByConnection(this);}
82
83 #endif //ALI_MP_CONNECTION_H