]>
Commit | Line | Data |
---|---|---|
905654c2 | 1 | #ifndef ALIMUONTRIGGERGUIBOARD_H |
2 | #define ALIMUONTRIGGERGUIBOARD_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | /// \ingroup evaluation | |
8 | /// \class AliMUONTriggerGUIboard | |
9 | /// \brief Trigger GUI utility class: single board object | |
10 | ||
11 | ////////////////////////////////////////////////////////////////////////// | |
12 | // // | |
13 | // Graphical User Interface utility class for the MUON trigger // | |
14 | // - single board object // | |
15 | // // | |
16 | ////////////////////////////////////////////////////////////////////////// | |
17 | ||
18 | #include <TString.h> | |
19 | #include <TObject.h> | |
20 | ||
21 | class TObjArray; | |
22 | class TBox; | |
23 | ||
24 | class AliMUONTriggerGUIboard : public TObject | |
25 | { | |
26 | ||
27 | public: | |
28 | ||
29 | AliMUONTriggerGUIboard(Int_t id, Char_t *name); | |
30 | virtual ~AliMUONTriggerGUIboard(); | |
31 | ||
32 | AliMUONTriggerGUIboard (const AliMUONTriggerGUIboard& board); | |
33 | AliMUONTriggerGUIboard& operator=(const AliMUONTriggerGUIboard& board); | |
34 | ||
35 | /// returns the standard name of this board | |
36 | Char_t *GetBoardName() const { return (Char_t*)(fName->Data()); }; | |
37 | /// returns the working status of this board | |
38 | UShort_t GetStatus() const { return fStatus; }; | |
39 | /// returns the number of this board | |
40 | Int_t GetNumber() const { return fID; }; | |
41 | ||
42 | /// initialize the board | |
43 | void Init() {}; | |
44 | /// set the working status of this board | |
45 | void SetStatus(UShort_t s) { fStatus = s; }; | |
46 | /// set the standard name of this board | |
47 | void SetBoardName(Char_t *name) { fName = new TString(name); }; | |
48 | /// set the geometrical location and dimensions of this board | |
49 | void SetDimensions(Int_t imt, | |
50 | Float_t xc, Float_t yc, Float_t zc, | |
51 | Float_t xw, Float_t yw) { | |
52 | fXCenter[imt] = xc; fYCenter[imt] = yc; fZCenter[imt] = zc; | |
53 | fXWidth[imt] = xw; fYWidth[imt] = yw; | |
54 | }; | |
55 | /// set the index range for the x strips | |
56 | void SetXSindex(Int_t ix, Int_t iy1, Int_t iy2) { | |
57 | fXSix = ix; | |
58 | fXSiy1 = iy1; | |
59 | fXSiy2 = iy2; | |
60 | }; | |
61 | /// set the index range for the y strips | |
62 | void SetYSindex(Int_t ix1, Int_t ix2, Int_t iy) { | |
63 | fYSix1 = ix1; | |
64 | fYSix2 = ix2; | |
65 | fYSiy = iy; | |
66 | }; | |
67 | /// set the number of the detector element containing this board | |
68 | void SetDetElemId(Int_t id) { fDetElemId = id; }; | |
69 | /// set the number of this board | |
70 | void SetIdCircuit(Int_t id) { fIdCircuit = id; }; | |
71 | /// set an x-strip digit in a chamber with amplitude = amp | |
72 | void SetDigitX(Int_t imt, Int_t is, Int_t amp) { | |
73 | fXDig[imt][is] = (UChar_t)amp; }; | |
74 | /// set a y-strip digit in a chamber with amplitude = amp | |
75 | void SetDigitY(Int_t imt, Int_t is, Int_t amp) { | |
76 | fYDig[imt][is] = (UChar_t)amp; }; | |
77 | /// set neighbouring boards with common y strips | |
78 | void SetYOver(Int_t over) { fYOver = (UChar_t)over; }; | |
79 | /// get neighbouring boards with common y strips | |
80 | UChar_t GetYOver() const { return fYOver; }; | |
81 | /// set the board position inside the detector element in y direction | |
82 | void SetPosition(Int_t pos) { fPosition = (UChar_t)pos; }; | |
83 | /// get the board position inside the detector element in y direction | |
84 | UChar_t GetPosition() const { return fPosition; }; | |
85 | /// get the digit amplitude for an x-strip in a given chamber | |
86 | Int_t GetXDig(Int_t imt, Int_t is) const { return fXDig[imt][is]; }; | |
87 | /// get the digit amplitude for a y-strip in a given chamber | |
88 | Int_t GetYDig(Int_t imt, Int_t is) const { return fYDig[imt][is]; }; | |
89 | ||
90 | void SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2); | |
91 | void SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2); | |
92 | /// get the graphical box of an x-trip | |
93 | TBox *GetXDigBox(Int_t imt, Int_t is) const { return fXDigBox[imt][is]; }; | |
94 | /// get the graphical box of a y-trip | |
95 | TBox *GetYDigBox(Int_t imt, Int_t is) const { return fYDigBox[imt][is]; }; | |
96 | ||
97 | /// get x-center of the board in chamber imt | |
98 | Float_t GetXCenter(Int_t imt) const { return fXCenter[imt]; }; | |
99 | /// get y-center of the board in chamber imt | |
100 | Float_t GetYCenter(Int_t imt) const { return fYCenter[imt]; }; | |
101 | /// get z-center of the board in chamber imt | |
102 | Float_t GetZCenter(Int_t imt) const { return fZCenter[imt]; }; | |
103 | /// get x-width of the board in chamber imt | |
104 | Float_t GetXWidth(Int_t imt) const { return fXWidth[imt]; }; | |
105 | /// get y-width of the board in chamber imt | |
106 | Float_t GetYWidth(Int_t imt) const { return fYWidth[imt]; }; | |
107 | ||
108 | /// get x-index in detector element for an x-strip | |
109 | Int_t GetXSix() const { return fXSix; }; | |
110 | /// get first y-index in detector element for an x-strip | |
111 | Int_t GetXSiy1() const { return fXSiy1; }; | |
112 | /// get last y-index in detector element for an x-strip | |
113 | Int_t GetXSiy2() const { return fXSiy2; }; | |
114 | /// get first x-index in detector element for a y-strip | |
115 | Int_t GetYSix1() const { return fYSix1; }; | |
116 | /// get last x-index in detector element for a y-strip | |
117 | Int_t GetYSix2() const { return fYSix2; }; | |
118 | /// get y-index in detector element for a y-strip | |
119 | Int_t GetYSiy() const { return fYSiy; }; | |
120 | /// get number of x strips | |
121 | Int_t GetNStripX() const { return GetXSiy2() - GetXSiy1() + 1; }; | |
122 | /// get number of y strips | |
123 | Int_t GetNStripY() const { return GetYSix2() - GetYSix1() + 1; }; | |
124 | /// get the id of the detector element | |
125 | Int_t GetDetElemId() const { return fDetElemId; }; | |
126 | /// get the id of the circuit | |
127 | Int_t GetIdCircuit() const { return fIdCircuit; }; | |
128 | ||
129 | /// set true if this board has a gui active | |
130 | void SetOpen(Bool_t open) { fIsOpen = open; }; | |
131 | /// true if this board has a gui active | |
132 | Bool_t IsOpen() const { return fIsOpen; }; | |
133 | ||
134 | void ClearXDigits(); | |
135 | void ClearYDigits(); | |
136 | ||
137 | private: | |
138 | ||
139 | enum { kNMT = 4, kNS = 16 }; ///< constants | |
140 | ||
141 | TString *fName; ///< Board name LCxLxBx or RCxLxBx | |
142 | Int_t fID; ///< Board serial number | |
143 | UShort_t fStatus; ///< Board status | |
144 | UChar_t fPosition; ///< Y-boards position | |
145 | UChar_t fYOver; ///< Y-boards with common y-strips | |
146 | ||
147 | Float_t fXCenter[kNMT]; ///< X-center of the board | |
148 | Float_t fYCenter[kNMT]; ///< Y-center of the board | |
149 | Float_t fZCenter[kNMT]; ///< Z-center of the board | |
150 | Float_t fXWidth[kNMT]; ///< X-width of the board | |
151 | Float_t fYWidth[kNMT]; ///< Y-width of the board | |
152 | ||
153 | Int_t fXSix; ///< X-strips ix index in the board | |
154 | Int_t fXSiy1; ///< X-strips first iy index in the board | |
155 | Int_t fXSiy2; ///< X-strips last iy index in the board | |
156 | ||
157 | Int_t fYSix1; ///< Y-strips first ix index in the board | |
158 | Int_t fYSix2; ///< Y-strips last ix index in the board | |
159 | Int_t fYSiy; ///< Y-strips iy index in the board | |
160 | ||
161 | Int_t fDetElemId; ///< Detector element ID (modulo 100) | |
162 | ||
163 | Int_t fIdCircuit; ///< Circuit number | |
164 | ||
165 | UChar_t fXDig[kNMT][kNS]; ///< X-digits amplitude, set by GUI | |
166 | UChar_t fYDig[kNMT][kNS]; ///< Y-digits amplitude, set by GUI | |
167 | ||
168 | TBox *fXDigBox[kNMT][kNS]; ///< X-digits boxes | |
169 | TBox *fYDigBox[kNMT][kNS]; ///< Y-digits boxes | |
170 | ||
171 | Bool_t fIsOpen; ///< Selection flag for the digits map | |
172 | ||
173 | ClassDef(AliMUONTriggerGUIboard,1) | |
174 | ||
175 | }; | |
176 | ||
177 | #endif |