Line data Source code
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 "AliMpEncodePair.h"
20 :
21 : #include <TString.h>
22 :
23 : class AliMpConnection : public TObject
24 : {
25 : public:
26 : AliMpConnection(Int_t padNum,
27 : Int_t bergNum,
28 : Int_t kaptonNum,
29 : Int_t gassiNum,
30 : MpPair_t localIndices);
31 : AliMpConnection(TRootIOCtor* /*ioCtor*/);
32 : //AliMpConnection();
33 : virtual ~AliMpConnection();
34 :
35 : //
36 : // accessors
37 : //
38 : /// Return Berg connector number
39 0 : Int_t GetBergNum() const { return fBergNum; }
40 : /// Return kapton connector number
41 0 : Int_t GetKaptonNum() const { return fKaptonNum; }
42 : /// Return manu channel number
43 3494534 : Int_t GetManuChannel() const { return fGassiNum; }
44 : /// Return pad number
45 0 : Int_t GetPadNum() const { return GetUniqueID(); }
46 :
47 : /// Return encoded local indices
48 7808848 : MpPair_t GetLocalIndices() const { return fLocalIndices; }
49 : Int_t GetLocalIx() const;
50 : Int_t GetLocalIy() const;
51 :
52 : /// Return the motif type which contains this connection
53 0 : AliMpMotifType *GetOwner() const { return fOwner; }
54 :
55 : TString PadName() const;
56 :
57 : //
58 : // modifiers
59 : //
60 :
61 : /// Set Gassiplex channel number
62 0 : void SetGassiNum(Int_t n) { fGassiNum = n; }
63 : /// Set the motif type which contains this connection
64 77592 : void SetOwner(AliMpMotifType *owner) { fOwner=owner; }
65 :
66 : private:
67 : /// Not implemented
68 : AliMpConnection();
69 : /// Not implemented
70 : AliMpConnection(const AliMpConnection& right);
71 : /// Not implemented
72 : AliMpConnection& operator=(const AliMpConnection& right);
73 :
74 : // data members
75 : Int_t fBergNum; ///< Berg connector number
76 : Int_t fKaptonNum; ///< Kapton connector number
77 : Int_t fGassiNum; ///< Gassiplex channel number
78 : MpPair_t fLocalIndices; ///< Local indices
79 : AliMpMotifType *fOwner; ///< The motif type which contains this connection
80 :
81 129338 : ClassDef(AliMpConnection,2) // Connection description
82 : };
83 :
84 : // inline functions
85 :
86 : /// Return the pad number converted to a name
87 : inline TString AliMpConnection::PadName() const
88 0 : { return fOwner->PadName(GetUniqueID()); }
89 :
90 : #endif //ALI_MP_CONNECTION_H
|