Updates to AddTask macro from Chris
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerGUIboard.h
CommitLineData
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
37391c63 10// Author Bogdan Vulpescu, LPC Clermont-Ferrand
905654c2 11
8b067dfe 12#include "AliMpPad.h"
13
905654c2 14#include <TString.h>
15#include <TObject.h>
16
8b067dfe 17class TClonesArray;
905654c2 18class TBox;
19
20class AliMUONTriggerGUIboard : public TObject
21{
22
23public:
24
8b067dfe 25 AliMUONTriggerGUIboard();
f182ec5f 26 AliMUONTriggerGUIboard(TRootIOCtor* ioCtor);
905654c2 27 virtual ~AliMUONTriggerGUIboard();
28
8b067dfe 29 /// get the standard name of this board
905654c2 30 Char_t *GetBoardName() const { return (Char_t*)(fName->Data()); };
8b067dfe 31 /// get the name of the crate containing this board
32 Char_t *GetCrateName() const { return (Char_t*)(fCrateName->Data()); };
33 /// get the working status of this board
905654c2 34 UShort_t GetStatus() const { return fStatus; };
8b067dfe 35 /// get the number of this board
905654c2 36 Int_t GetNumber() const { return fID; };
8b067dfe 37 /// get the id of the detector element
38 Int_t GetDetElemId() const { return fDetElemId; };
39 /// get the id of the circuit
40 Int_t GetIdCircuit() const { return fIdCircuit; };
41 /// get detector side (Left=0 , Right=1)
42 Int_t GetSide() const;
43 /// get line
44 Int_t GetLine() const;
45 /// get column
46 Int_t GetCol() const;
905654c2 47
905654c2 48 /// set the working status of this board
49 void SetStatus(UShort_t s) { fStatus = s; };
50 /// set the standard name of this board
8b067dfe 51 void SetBoardName(const Char_t *name) { fName = new TString(name); };
52 /// set the name of the crate containing this board
53 void SetCrateName(const Char_t *name) { fCrateName = new TString(name); };
905654c2 54 /// set the number of the detector element containing this board
55 void SetDetElemId(Int_t id) { fDetElemId = id; };
8b067dfe 56 /// set the number of this board
57 void SetNumber(Int_t id) { fID = id; }
58
59 /// add a mapping x-pad
60 void AddPadX(const AliMpPad &pad, Int_t ich)
61 {
62 new ((*fPadsX[ich])[fNPadsX[ich]++]) AliMpPad(pad);
63 }
64 /// add a mapping y-pad
65 void AddPadY(const AliMpPad &pad, Int_t ich)
66 {
67 new ((*fPadsY[ich])[fNPadsY[ich]++]) AliMpPad(pad);
68 }
69 /// create the display geometry from the mapping pads
70 void MakeGeometry();
71
905654c2 72 /// set an x-strip digit in a chamber with amplitude = amp
73 void SetDigitX(Int_t imt, Int_t is, Int_t amp) {
74 fXDig[imt][is] = (UChar_t)amp; };
75 /// set a y-strip digit in a chamber with amplitude = amp
76 void SetDigitY(Int_t imt, Int_t is, Int_t amp) {
77 fYDig[imt][is] = (UChar_t)amp; };
905654c2 78 /// get neighbouring boards with common y strips
79 UChar_t GetYOver() const { return fYOver; };
905654c2 80 /// get the board position inside the detector element in y direction
81 UChar_t GetPosition() const { return fPosition; };
82 /// get the digit amplitude for an x-strip in a given chamber
83 Int_t GetXDig(Int_t imt, Int_t is) const { return fXDig[imt][is]; };
84 /// get the digit amplitude for a y-strip in a given chamber
85 Int_t GetYDig(Int_t imt, Int_t is) const { return fYDig[imt][is]; };
86
8b067dfe 87 /// set x-strip box for display
905654c2 88 void SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
8b067dfe 89 /// set y-strip box for display
905654c2 90 void SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
8b067dfe 91
92 /// get x-strip box for display
905654c2 93 TBox *GetXDigBox(Int_t imt, Int_t is) const { return fXDigBox[imt][is]; };
8b067dfe 94 /// get y-strip box for display
905654c2 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; };
905654c2 124
125 /// set true if this board has a gui active
126 void SetOpen(Bool_t open) { fIsOpen = open; };
127 /// true if this board has a gui active
128 Bool_t IsOpen() const { return fIsOpen; };
129
8b067dfe 130 /// delete the set x-digits
905654c2 131 void ClearXDigits();
8b067dfe 132 /// delete the set y-digits
905654c2 133 void ClearYDigits();
134
8b067dfe 135 /// print information on this board
136 void PrintBoard() const;
137
905654c2 138private:
139
140 enum { kNMT = 4, kNS = 16 }; ///< constants
141
37391c63 142 /// Not implemented
143 AliMUONTriggerGUIboard (const AliMUONTriggerGUIboard& board);
144 /// Not implemented
145 AliMUONTriggerGUIboard& operator=(const AliMUONTriggerGUIboard& board);
146
905654c2 147 TString *fName; ///< Board name LCxLxBx or RCxLxBx
8b067dfe 148 TString *fCrateName; ///< Crate name
149 Int_t fID; ///< Board array number
905654c2 150 UShort_t fStatus; ///< Board status
151 UChar_t fPosition; ///< Y-boards position
152 UChar_t fYOver; ///< Y-boards with common y-strips
153
154 Float_t fXCenter[kNMT]; ///< X-center of the board
155 Float_t fYCenter[kNMT]; ///< Y-center of the board
156 Float_t fZCenter[kNMT]; ///< Z-center of the board
157 Float_t fXWidth[kNMT]; ///< X-width of the board
158 Float_t fYWidth[kNMT]; ///< Y-width of the board
159
160 Int_t fXSix; ///< X-strips ix index in the board
161 Int_t fXSiy1; ///< X-strips first iy index in the board
162 Int_t fXSiy2; ///< X-strips last iy index in the board
163
164 Int_t fYSix1; ///< Y-strips first ix index in the board
165 Int_t fYSix2; ///< Y-strips last ix index in the board
166 Int_t fYSiy; ///< Y-strips iy index in the board
167
168 Int_t fDetElemId; ///< Detector element ID (modulo 100)
169
170 Int_t fIdCircuit; ///< Circuit number
171
172 UChar_t fXDig[kNMT][kNS]; ///< X-digits amplitude, set by GUI
173 UChar_t fYDig[kNMT][kNS]; ///< Y-digits amplitude, set by GUI
174
175 TBox *fXDigBox[kNMT][kNS]; ///< X-digits boxes
176 TBox *fYDigBox[kNMT][kNS]; ///< Y-digits boxes
177
178 Bool_t fIsOpen; ///< Selection flag for the digits map
179
8b067dfe 180 /// adding pads from mapping to calculate the board geometry
181 Int_t fNPadsX[kNMT]; ///< nr of added mapping pads in x
182 Int_t fNPadsY[kNMT]; ///< nr of added mapping pads in y
183 TClonesArray *fPadsX[kNMT]; ///< array of mapping pads in x
184 TClonesArray *fPadsY[kNMT]; ///< array of mapping pads in y
185
186 ClassDef(AliMUONTriggerGUIboard,2) //Trigger GUI utility class: single board object
905654c2 187
188};
189
190#endif