AliRoot Core  edcc906 (edcc906)
AliMUONTriggerGUIboard.h
Go to the documentation of this file.
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 
10 // Author Bogdan Vulpescu, LPC Clermont-Ferrand
11 
12 #include "AliMpPad.h"
13 
14 #include <TString.h>
15 #include <TObject.h>
16 
17 class TClonesArray;
18 class TBox;
19 
20 class AliMUONTriggerGUIboard : public TObject
21 {
22 
23 public:
24 
26  AliMUONTriggerGUIboard(TRootIOCtor* ioCtor);
27  virtual ~AliMUONTriggerGUIboard();
28 
30  Char_t *GetBoardName() const { return (Char_t*)(fName->Data()); };
32  Char_t *GetCrateName() const { return (Char_t*)(fCrateName->Data()); };
34  UShort_t GetStatus() const { return fStatus; };
36  Int_t GetNumber() const { return fID; };
38  Int_t GetDetElemId() const { return fDetElemId; };
40  Int_t GetIdCircuit() const { return fIdCircuit; };
42  Int_t GetSide() const;
44  Int_t GetLine() const;
46  Int_t GetCol() const;
47 
49  void SetStatus(UShort_t s) { fStatus = s; };
51  void SetBoardName(const Char_t *name) { fName = new TString(name); };
53  void SetCrateName(const Char_t *name) { fCrateName = new TString(name); };
55  void SetDetElemId(Int_t id) { fDetElemId = id; };
57  void SetNumber(Int_t id) { fID = id; }
58 
60  void AddPadX(const AliMpPad &pad, Int_t ich)
61  {
62  new ((*fPadsX[ich])[fNPadsX[ich]++]) AliMpPad(pad);
63  }
65  void AddPadY(const AliMpPad &pad, Int_t ich)
66  {
67  new ((*fPadsY[ich])[fNPadsY[ich]++]) AliMpPad(pad);
68  }
70  void MakeGeometry();
71 
73  void SetDigitX(Int_t imt, Int_t is, Int_t amp) {
74  fXDig[imt][is] = (UChar_t)amp; };
76  void SetDigitY(Int_t imt, Int_t is, Int_t amp) {
77  fYDig[imt][is] = (UChar_t)amp; };
79  UChar_t GetYOver() const { return fYOver; };
81  UChar_t GetPosition() const { return fPosition; };
83  Int_t GetXDig(Int_t imt, Int_t is) const { return fXDig[imt][is]; };
85  Int_t GetYDig(Int_t imt, Int_t is) const { return fYDig[imt][is]; };
86 
88  void SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
90  void SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
91 
93  TBox *GetXDigBox(Int_t imt, Int_t is) const { return fXDigBox[imt][is]; };
95  TBox *GetYDigBox(Int_t imt, Int_t is) const { return fYDigBox[imt][is]; };
96 
98  Float_t GetXCenter(Int_t imt) const { return fXCenter[imt]; };
100  Float_t GetYCenter(Int_t imt) const { return fYCenter[imt]; };
102  Float_t GetZCenter(Int_t imt) const { return fZCenter[imt]; };
104  Float_t GetXWidth(Int_t imt) const { return fXWidth[imt]; };
106  Float_t GetYWidth(Int_t imt) const { return fYWidth[imt]; };
107 
109  Int_t GetXSix() const { return fXSix; };
111  Int_t GetXSiy1() const { return fXSiy1; };
113  Int_t GetXSiy2() const { return fXSiy2; };
115  Int_t GetYSix1() const { return fYSix1; };
117  Int_t GetYSix2() const { return fYSix2; };
119  Int_t GetYSiy() const { return fYSiy; };
121  Int_t GetNStripX() const { return GetXSiy2() - GetXSiy1() + 1; };
123  Int_t GetNStripY() const { return GetYSix2() - GetYSix1() + 1; };
124 
126  void SetOpen(Bool_t open) { fIsOpen = open; };
128  Bool_t IsOpen() const { return fIsOpen; };
129 
131  void ClearXDigits();
133  void ClearYDigits();
134 
136  void PrintBoard() const;
137 
138 private:
139 
140  enum { kNMT = 4, kNS = 16 };
141 
146 
147  TString *fName;
148  TString *fCrateName;
149  Int_t fID;
150  UShort_t fStatus;
151  UChar_t fPosition;
152  UChar_t fYOver;
153 
154  Float_t fXCenter[kNMT];
155  Float_t fYCenter[kNMT];
156  Float_t fZCenter[kNMT];
157  Float_t fXWidth[kNMT];
158  Float_t fYWidth[kNMT];
159 
160  Int_t fXSix;
161  Int_t fXSiy1;
162  Int_t fXSiy2;
163 
164  Int_t fYSix1;
165  Int_t fYSix2;
166  Int_t fYSiy;
167 
168  Int_t fDetElemId;
169 
170  Int_t fIdCircuit;
171 
172  UChar_t fXDig[kNMT][kNS];
173  UChar_t fYDig[kNMT][kNS];
174 
175  TBox *fXDigBox[kNMT][kNS];
176  TBox *fYDigBox[kNMT][kNS];
177 
178  Bool_t fIsOpen;
179 
181  Int_t fNPadsX[kNMT];
182  Int_t fNPadsY[kNMT];
183  TClonesArray *fPadsX[kNMT];
184  TClonesArray *fPadsY[kNMT];
185 
186  ClassDef(AliMUONTriggerGUIboard,2) //Trigger GUI utility class: single board object
187 
188 };
189 
190 #endif
UChar_t fXDig[kNMT][kNS]
X-digits amplitude, set by GUI.
Int_t fNPadsX[kNMT]
adding pads from mapping to calculate the board geometry
UChar_t GetYOver() const
get neighbouring boards with common y strips
Int_t GetYSix1() const
get first x-index in detector element for a y-strip
Int_t GetNumber() const
get the number of this board
UChar_t GetPosition() const
get the board position inside the detector element in y direction
Float_t fYCenter[kNMT]
Y-center of the board.
Int_t GetSide() const
get detector side (Left=0 , Right=1)
UChar_t fPosition
Y-boards position.
Int_t GetYDig(Int_t imt, Int_t is) const
get the digit amplitude for a y-strip in a given chamber
Int_t GetXSix() const
get x-index in detector element for an x-strip
TBox * fXDigBox[kNMT][kNS]
X-digits boxes.
void MakeGeometry()
create the display geometry from the mapping pads
Int_t GetCol() const
get column
void SetNumber(Int_t id)
set the number of this board
TBox * GetXDigBox(Int_t imt, Int_t is) const
get x-strip box for display
TClonesArray * fPadsX[kNMT]
array of mapping pads in x
TString * fName
Board name LCxLxBx or RCxLxBx.
TBox * fYDigBox[kNMT][kNS]
Y-digits boxes.
Float_t fXWidth[kNMT]
X-width of the board.
Char_t * GetBoardName() const
get the standard name of this board
TClonesArray * fPadsY[kNMT]
array of mapping pads in y
Float_t GetYCenter(Int_t imt) const
get y-center of the board in chamber imt
Int_t GetYSix2() const
get last x-index in detector element for a y-strip
void AddPadY(const AliMpPad &pad, Int_t ich)
add a mapping y-pad
void SetBoardName(const Char_t *name)
set the standard name of this board
void SetCrateName(const Char_t *name)
set the name of the crate containing this board
void SetStatus(UShort_t s)
set the working status of this board
Int_t GetIdCircuit() const
get the id of the circuit
Int_t fXSix
X-strips ix index in the board.
void PrintBoard() const
print information on this board
void SetYDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
set y-strip box for display
void AddPadX(const AliMpPad &pad, Int_t ich)
add a mapping x-pad
void ClearYDigits()
delete the set y-digits
Int_t GetLine() const
get line
void SetXDigBox(Int_t imt, Int_t is, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
set x-strip box for display
Int_t fDetElemId
Detector element ID (modulo 100)
UShort_t GetStatus() const
get the working status of this board
Int_t fID
Board array number.
void SetDigitY(Int_t imt, Int_t is, Int_t amp)
set a y-strip digit in a chamber with amplitude = amp
Float_t GetXWidth(Int_t imt) const
get x-width of the board in chamber imt
Int_t fYSix1
Y-strips first ix index in the board.
void SetOpen(Bool_t open)
set true if this board has a gui active
UShort_t fStatus
Board status.
Char_t * GetCrateName() const
get the name of the crate containing this board
Float_t fYWidth[kNMT]
Y-width of the board.
UChar_t fYOver
Y-boards with common y-strips.
AliMUONTriggerGUIboard & operator=(const AliMUONTriggerGUIboard &board)
Not implemented.
Int_t GetXSiy2() const
get last y-index in detector element for an x-strip
Int_t GetDetElemId() const
get the id of the detector element
Int_t GetYSiy() const
get y-index in detector element for a y-strip
Bool_t fIsOpen
Selection flag for the digits map.
Int_t fYSiy
Y-strips iy index in the board.
void ClearXDigits()
delete the set x-digits
Float_t GetYWidth(Int_t imt) const
get y-width of the board in chamber imt
Float_t GetXCenter(Int_t imt) const
get x-center of the board in chamber imt
TBox * GetYDigBox(Int_t imt, Int_t is) const
get y-strip box for display
Int_t fYSix2
Y-strips last ix index in the board.
Int_t fIdCircuit
Circuit number.
Int_t GetXSiy1() const
get first y-index in detector element for an x-strip
Trigger GUI utility class: single board object.
Float_t fZCenter[kNMT]
Z-center of the board.
Int_t fNPadsY[kNMT]
nr of added mapping pads in y
Int_t fXSiy1
X-strips first iy index in the board.
Bool_t IsOpen() const
true if this board has a gui active
Float_t GetZCenter(Int_t imt) const
get z-center of the board in chamber imt
UChar_t fYDig[kNMT][kNS]
Y-digits amplitude, set by GUI.
void SetDetElemId(Int_t id)
set the number of the detector element containing this board
Class which encapsuate all information about a pad.
Definition: AliMpPad.h:22
Int_t GetNStripX() const
get number of x strips
Int_t GetNStripY() const
get number of y strips
TString * fCrateName
Crate name.
Float_t fXCenter[kNMT]
X-center of the board.
Int_t fXSiy2
X-strips last iy index in the board.
Int_t GetXDig(Int_t imt, Int_t is) const
get the digit amplitude for an x-strip in a given chamber
void SetDigitX(Int_t imt, Int_t is, Int_t amp)
set an x-strip digit in a chamber with amplitude = amp