]>
Commit | Line | Data |
---|---|---|
905654c2 | 1 | #ifndef ALIMUONTRIGGERGUIBDMAP_H |
2 | #define ALIMUONTRIGGERGUIBDMAP_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 AliMUONTriggerGUIbdmap | |
9 | /// \brief Trigger GUI utility class: single board map of the strips/digits | |
bae1aa70 | 10 | // Author Bogdan Vulpescu, LPC Clermont-Ferrand |
905654c2 | 11 | |
905654c2 | 12 | #include <TGFrame.h> |
13 | ||
14 | class TCanvas; | |
15 | class TGCheckButton; | |
16 | class TGTextEdit; | |
17 | class TPolyLine; | |
18 | class TBox; | |
19 | class TPaveText; | |
20 | class TObjArray; | |
21 | class TH1F; | |
22 | class TLatex; | |
23 | class TGTableLayout; | |
24 | class TGLabel; | |
25 | ||
26 | class AliMUONTriggerGUIboard; | |
27 | class AliMUONTriggerGUI; | |
28 | class AliMUONTriggerCircuit; | |
f9eb4448 | 29 | class AliMUONTriggerCrateStore; |
30 | class AliMUONMCDataInterface; | |
8b067dfe | 31 | class AliMUONDigitStoreV1; |
32 | class AliMUONTriggerStoreV1; | |
905654c2 | 33 | class AliLoader; |
905654c2 | 34 | |
bae1aa70 | 35 | class AliMUONTriggerGUIbdmap : public TGFrame |
905654c2 | 36 | { |
37 | ||
905654c2 | 38 | public: |
39 | ||
40 | AliMUONTriggerGUIbdmap(const TGWindow *p, const TGWindow *main, UInt_t w, UInt_t h); | |
41 | virtual ~AliMUONTriggerGUIbdmap(); | |
42 | ||
905654c2 | 43 | /// set the name of the board gui window |
bae1aa70 | 44 | void SetName(const Char_t *name) { fMain->SetWindowName(name); }; |
905654c2 | 45 | /// set the board associated to this instance |
46 | void SetBoard(AliMUONTriggerGUIboard *b) { fBoard = b; }; | |
47 | /// set the board associated to this instance, from boards array and id | |
48 | void SetBoard(TObjArray *boards, Int_t id) { | |
49 | fBoards = boards; | |
50 | fBoard = (AliMUONTriggerGUIboard*)boards->UncheckedAt(id); } | |
51 | /// set the current muon loader | |
52 | void SetLoader(AliLoader *loader) { fLoader = loader; }; | |
f9eb4448 | 53 | /// set the MC data interface |
54 | void SetMCDataInterface(AliMUONMCDataInterface *mc) { fMCDataInterface = mc; }; | |
8b067dfe | 55 | /// set the digit store from raw data |
56 | void SetRawDigitStore(AliMUONDigitStoreV1 *ds) { fRawDigitStore = ds; }; | |
57 | /// set the trigger store from raw data | |
58 | void SetRawTriggerStore(AliMUONTriggerStoreV1 *ts) { fRawTriggerStore = ts; }; | |
59 | ||
f9eb4448 | 60 | /// set the trigger boards manager |
61 | void SetCrateManager(AliMUONTriggerCrateStore *crates) { fCrateManager = crates; }; | |
905654c2 | 62 | |
63 | void Show(); | |
64 | ||
65 | void DrawStrips(Bool_t bx, Bool_t by); | |
66 | void DrawDigits(Bool_t bx, Bool_t by); | |
67 | void DrawClear(); | |
68 | void EditStrips(Int_t event, Int_t x, Int_t y, TObject *sel); | |
69 | ||
70 | void Init(); | |
71 | void HandleButtons(Int_t id = -1); | |
72 | void HandleEditButton(); | |
8b067dfe | 73 | void CloseWindow() const; |
905654c2 | 74 | void DoClose(); |
75 | void DoDigits(); | |
76 | void ResetDigits(); | |
77 | void LocalTriggerInfo(); | |
78 | ||
79 | private: | |
bae1aa70 | 80 | /// Not implemented |
81 | AliMUONTriggerGUIbdmap (const AliMUONTriggerGUIbdmap& bdmap); | |
82 | /// Not implemented | |
83 | AliMUONTriggerGUIbdmap& operator=(const AliMUONTriggerGUIbdmap& bdmap); | |
84 | ||
905654c2 | 85 | |
86 | enum { kNBoards = 234, kNMT = 4, kNS = 16 }; ///< constants | |
87 | ||
88 | TGTransientFrame *fMain; ///< Main board frame | |
89 | TCanvas *fCanvas[kNMT]; ///< MT canvases | |
90 | TGTextEdit *fLocTrigE; ///< Window local trigger info | |
91 | ||
f9eb4448 | 92 | AliMUONTriggerGUIboard *fBoard; ///< Current board object |
93 | AliLoader *fLoader; ///< The MUON loader | |
94 | AliMUONMCDataInterface *fMCDataInterface; ///< MC data interface | |
8b067dfe | 95 | AliMUONDigitStoreV1 *fRawDigitStore; ///< Raw data digit store |
96 | AliMUONTriggerStoreV1 *fRawTriggerStore; ///< Raw data trigger store | |
905654c2 | 97 | |
98 | TGCheckButton *fXStrips; ///< Draw x-strips and digits | |
99 | TGCheckButton *fYStrips; ///< Draw y-strips and digits | |
100 | TGCheckButton *fEditStrips; ///< Set/unset the strips | |
101 | ||
102 | TPolyLine *fXDigPL[kNMT][kNS]; ///< X-strip polyline | |
103 | TPolyLine *fYDigPL[kNMT][kNS]; ///< Y-strip polyline | |
104 | TBox *fXDigBox[kNMT][kNS]; ///< X-digit box | |
105 | TBox *fYDigBox[kNMT][kNS]; ///< Y-digit box | |
106 | TPaveText *fXLabelL[kNMT][kNS]; ///< X-strip labels left | |
107 | TPaveText *fXLabelR[kNMT][kNS]; ///< X-strip labels right | |
108 | TPaveText *fYLabelL[kNMT][kNS]; ///< Y-strip labels left | |
109 | TPaveText *fYLabelR[kNMT][kNS]; ///< Y-strip labels right | |
110 | ||
111 | Float_t fXWidth[kNMT]; ///< Board x-width | |
112 | Float_t fYWidth[kNMT]; ///< Board y-width | |
113 | Float_t fXCenter[kNMT]; ///< Board x-center | |
114 | Float_t fYCenter[kNMT]; ///< Board y-center | |
115 | ||
116 | Bool_t fXOn; ///< x-strips/digits on canvas ? | |
117 | Bool_t fYOn; ///< y-strips/digits on canvas ? | |
118 | Bool_t fLabelX; ///< x-labels exist | |
119 | Bool_t fLabelY; ///< y-labels exist | |
120 | Bool_t fIsEditable; ///< allows set/unset the strips | |
121 | ||
122 | UInt_t fCanvasSize; ///< Size of the canvas | |
123 | Int_t fNStripX; ///< Number of x-strips on board | |
124 | Int_t fNStripY; ///< Number of y-strips on board | |
125 | ||
126 | TObjArray *fBoards; ///< Array with all boards | |
127 | ||
f9eb4448 | 128 | AliMUONCalibrationData *fCalibrationData; ///< Pointer to calibration data |
129 | AliMUONTriggerCrateStore *fCrateManager; ///< trigger boards manager | |
130 | ||
8b067dfe | 131 | ClassDef(AliMUONTriggerGUIbdmap,2) // board gui class |
905654c2 | 132 | |
133 | }; | |
134 | ||
135 | #endif |