]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpBusPatch.h
Initial version (Laurent)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpBusPatch.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: $ 
6
7 /// \ingroup management
8 /// \class AliMpBusPatch
9 /// \brief The class defines the properties of BusPatch
10 ///
11 /// \author Ivana Hrivnacova, IPN Orsay
12
13 #ifndef ALI_MP_BUS_PATCH_H
14 #define ALI_MP_BUS_PATCH_H
15
16 #include <TObject.h>
17
18 #include "AliMpArrayI.h"
19
20 class AliMpBusPatch : public  TObject {
21
22   public:
23     AliMpBusPatch(Int_t id, Int_t deId, Int_t ddlId);
24     AliMpBusPatch(TRootIOCtor* /*ioCtor*/);
25     virtual ~AliMpBusPatch();
26
27     // static methods
28     static Int_t GetGlobalBusID(Int_t localID, Int_t ddlID);
29     static Int_t GetLocalBusID(Int_t globalID, Int_t ddlID);
30
31     // methods 
32     Bool_t AddManu(Int_t manuId);
33     Bool_t SetNofManusPerModule(Int_t manuNumber = 0);
34     void   SetCableLength(Float_t length);
35
36     // get methods
37     Int_t  GetId() const;
38     Int_t  GetDEId() const;
39     Int_t  GetDdlId() const;
40     Int_t  GetNofManus() const;
41     Int_t  GetManuId(Int_t index) const;
42     Bool_t HasManu(Int_t manuId) const;
43     
44     Int_t  GetNofPatchModules() const;
45     Int_t  GetNofManusPerModule(Int_t patchModule) const;
46     
47     Float_t  GetCableLength() const;
48
49   private:
50     /// Not implemented
51     AliMpBusPatch();
52     /// Not implemented
53     AliMpBusPatch(const AliMpBusPatch& rhs);
54     /// Not implemented
55     AliMpBusPatch& operator=(const AliMpBusPatch& rhs);
56
57     // static data members      
58     static const Int_t  fgkOffset; ///< Offset for conversion global/local ID  
59
60     // data members     
61     Int_t        fId;    ///< Identifier (unique)
62     Int_t        fDEId;  ///< Detection element to which this bus patch is connected
63     Int_t        fDdlId; ///< DDL to which this bus patch is connected
64     AliMpArrayI  fManus; ///< Manu Ids connected to this bus patch
65     AliMpArrayI  fNofManusPerModule;///< Nof Manus per patch modules (PCBs)
66     Float_t      fCableLength; ///< length of the buspatch cable
67
68   ClassDef(AliMpBusPatch,2)  // The class collectiong electronics properties of DDL
69 };
70
71 // inline functions
72
73 /// Return the unique Id
74 inline Int_t AliMpBusPatch::GetId() const
75 {  return fId; }
76
77 /// Return the Detection element Id
78 inline Int_t AliMpBusPatch::GetDEId() const
79 {  return fDEId; }
80
81 /// Return the Ddl  Id
82 inline Int_t AliMpBusPatch::GetDdlId() const
83 {  return fDdlId; }
84
85 /// Return length of buspatch
86 inline Float_t  AliMpBusPatch::GetCableLength() const
87 { return fCableLength; }
88
89 /// Set length of buspatch
90 inline void  AliMpBusPatch::SetCableLength(Float_t length)
91 { fCableLength = length; }
92
93 #endif //ALI_BUS_PATCH_H
94
95
96
97
98
99
100
101
102
103
104
105
106
107