]>
Commit | Line | Data |
---|---|---|
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: AliMpManuGeo.h,v 1.5 2006/05/24 13:58:16 ivana Exp $ | |
6 | ||
7 | /// \ingroup mptrigger | |
8 | /// \class AliMpLocalBoard | |
9 | /// \brief Class that manages the properties of the local board | |
10 | /// | |
11 | /// \author Ch. Finck; Subatech Nantes | |
12 | ||
13 | #ifndef ALI_MP_LOCAL_BOARD_H | |
14 | #define ALI_MP_LOCAL_BOARD_H | |
15 | ||
16 | #include <TNamed.h> | |
17 | ||
18 | #include "AliMpArrayI.h" | |
19 | ||
20 | class TString; | |
21 | ||
22 | class AliMpLocalBoard : public TNamed | |
23 | { | |
24 | ||
25 | public: | |
26 | AliMpLocalBoard(Int_t id, const Char_t* name, Int_t slot); | |
27 | AliMpLocalBoard(TRootIOCtor* /*ioCtor*/); | |
28 | virtual ~AliMpLocalBoard(); | |
29 | ||
30 | // detElem | |
31 | Bool_t AddDE(Int_t detElemId); | |
32 | Int_t GetNofDEs() const; | |
33 | Int_t GetDEId(Int_t index) const; | |
34 | Int_t GetDEIdByChamber(Int_t chamberId) const; | |
35 | Bool_t HasDEId(Int_t detElemId) const; | |
36 | ||
37 | // get methods | |
38 | // | |
39 | /// Return the identifier (unique) | |
40 | Int_t GetId() const {return fId;} | |
41 | /// Return the slot Identifier in the given crate | |
42 | Int_t GetSlot() const {return fSlot;} | |
43 | ||
44 | /// set slot | |
45 | void SetSlot(Int_t slot) {fSlot = slot;} | |
46 | ||
47 | // Switches | |
48 | // | |
49 | /// Get switch bit wise (return a inteter for backware compatibility) | |
50 | Int_t GetSwitch(Int_t index) const; | |
51 | /// Set switch in a compact way | |
52 | void SetSwitch(UInt_t swit); | |
53 | /// Get switch in a compact way | |
54 | UInt_t GetSwitch() const {return fSwitch;} | |
55 | ||
56 | // switch enum for local board (see PRR, chpt: 2.4.4) | |
57 | enum {kX2d, kX2m, kX2u, ///< (1) indicate a change of strip pitch in Y circuit | |
58 | kOR0, kOR1, ///< taking into account the different segmentation in Y from MT1 to MT2 | |
59 | kENY, ///< (0) enable communication in Y to n+/-1 board via tranverse connector, (1) disable | |
60 | kZeroAllYLSB,///< (1) reset the LSB for special configuration of board RC2L5B4 & RC2L6B1 | |
61 | kZeroDown, ///< (0) information is expected from n-1 board for X input, (1) not | |
62 | kZeroMiddle, ///< (0) always, not used | |
63 | kZeroUp }; ///< (0) information is expected from n+1 board for X input, (1) not | |
64 | ||
65 | // Transverse connector | |
66 | // | |
67 | /// Set transverse connector | |
68 | void SetTC(Bool_t connect) {fTC = connect;} | |
69 | /// Return transverse connector | |
70 | Bool_t GetTC() const {return fTC;} | |
71 | ||
72 | // Crate name | |
73 | // | |
74 | /// Set crate name | |
75 | void SetCrate(TString name) {fCrate = name;} | |
76 | /// Return crate name | |
77 | TString GetCrate() const {return fCrate;} | |
78 | ||
79 | // Notify | |
80 | // | |
81 | /// Set notified flag (not copy card) | |
82 | void SetNotified(Bool_t notify) {fNotified = notify;} | |
83 | /// Return notified flag (not copy card) | |
84 | Bool_t IsNotified() const {return fNotified;} | |
85 | ||
86 | ||
87 | /// given position (line, col) | |
88 | AliMpIntPair GetPosition() const; | |
89 | ||
90 | // Id to be copy to or from | |
91 | ||
92 | /// Get Id from where the X input are copied | |
93 | Int_t GetInputXfrom() {return fInputXfrom;} | |
94 | /// Get Id to where the X input are copied | |
95 | Int_t GetInputXto() {return fInputXto;} | |
96 | /// Get Id from where the Y input are copied | |
97 | Int_t GetInputYfrom() {return fInputYfrom;} | |
98 | /// Get Id to where the Y input are copied | |
99 | Int_t GetInputYto() {return fInputYto;} | |
100 | ||
101 | /// Set Id from where the X input are copied | |
102 | void SetInputXfrom(Int_t id) {fInputXfrom = id;} | |
103 | /// Set Id to where the X input are copied | |
104 | void SetInputXto(Int_t id) {fInputXto = id;} | |
105 | /// Set Id from where the Y input are copied | |
106 | void SetInputYfrom(Int_t id) {fInputYfrom = id;} | |
107 | /// Set Id to where the Y input are copied | |
108 | void SetInputYto(Int_t id) {fInputYto = id;} | |
109 | ||
110 | private: | |
111 | /// Not implemented | |
112 | AliMpLocalBoard(); | |
113 | /// Not implemented | |
114 | AliMpLocalBoard(const AliMpLocalBoard& src); | |
115 | /// Not implemented | |
116 | AliMpLocalBoard& operator = (const AliMpLocalBoard& src) ; | |
117 | ||
118 | Int_t GetIndex(Int_t chamberId) const; | |
119 | ||
120 | Int_t fId; ///< Identifier (unique) | |
121 | Int_t fSlot; ///< Slot Identifier in the given crate | |
122 | Bool_t fTC; ///< Transverse connector | |
123 | TString fCrate; ///< Crate name | |
124 | UInt_t fSwitch; ///< switches in compact way | |
125 | Bool_t fNotified; ///< notified flag (not copy card) | |
126 | AliMpArrayI fDEId; ///< list of Detection element to which this local board is connected | |
127 | Int_t fInputXfrom;///< local id of x3-4 inputs copied from (zero: not copied) | |
128 | Int_t fInputXto; ///< local id of x3-4 inputs copied to (zero: not copied) | |
129 | Int_t fInputYfrom;///< local id of y1-4 inputs copied from (zero: not copied) | |
130 | Int_t fInputYto; ///< local id of y1-4 inputs copied to (zero: not copied) | |
131 | ||
132 | ClassDef(AliMpLocalBoard,3) //utility class for the motif type | |
133 | }; | |
134 | ||
135 | ||
136 | #endif |