1 #ifndef ALIMUONTRIGGERGUIBDMAP_H
2 #define ALIMUONTRIGGERGUIBDMAP_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 /// \ingroup evaluation
8 /// \class AliMUONTriggerGUIbdmap
9 /// \brief Trigger GUI utility class: single board map of the strips/digits
10 // Author Bogdan Vulpescu, LPC Clermont-Ferrand
26 class AliMUONTriggerGUIboard;
27 class AliMUONTriggerGUI;
28 class AliMUONTriggerCircuit;
29 class AliMUONTriggerCrateStore;
30 class AliMUONMCDataInterface;
31 class AliMUONDigitStoreV1;
32 class AliMUONTriggerStoreV1;
33 class AliMUONCalibrationData;
36 class AliMUONTriggerGUIbdmap : public TGFrame
41 AliMUONTriggerGUIbdmap(const TGWindow *p, const TGWindow *mainWindow, UInt_t w, UInt_t h);
42 virtual ~AliMUONTriggerGUIbdmap();
44 /// set the name of the board gui window
45 void SetName(const Char_t *name) { fMain->SetWindowName(name); };
46 /// set the board associated to this instance
47 void SetBoard(AliMUONTriggerGUIboard * const b) { fBoard = b; };
48 /// set the board associated to this instance, from boards array and id
49 void SetBoard(TObjArray * const boards, Int_t id) {
51 fBoard = (AliMUONTriggerGUIboard*)boards->UncheckedAt(id); }
52 /// set the current muon loader
53 void SetLoader(AliLoader * const loader) { fLoader = loader; };
54 /// set the MC data interface
55 void SetMCDataInterface(AliMUONMCDataInterface * const mc) { fMCDataInterface = mc; };
56 /// set the digit store from raw data
57 void SetRawDigitStore(AliMUONDigitStoreV1 * const ds) { fRawDigitStore = ds; };
58 /// set the trigger store from raw data
59 void SetRawTriggerStore(AliMUONTriggerStoreV1 * const ts) { fRawTriggerStore = ts; };
61 /// set the trigger boards manager
62 void SetCrateManager(AliMUONTriggerCrateStore * const crates) { fCrateManager = crates; };
66 void DrawStrips(Bool_t bx, Bool_t by);
67 void DrawDigits(Bool_t bx, Bool_t by);
69 void EditStrips(Int_t event, Int_t x, Int_t y, TObject *sel);
72 void HandleButtons(Int_t id = -1);
73 void HandleEditButton();
74 void CloseWindow() const;
78 void LocalTriggerInfo();
82 AliMUONTriggerGUIbdmap (const AliMUONTriggerGUIbdmap& bdmap);
84 AliMUONTriggerGUIbdmap& operator=(const AliMUONTriggerGUIbdmap& bdmap);
87 enum { kNBoards = 234, kNMT = 4, kNS = 16 }; ///< constants
89 TGTransientFrame *fMain; ///< Main board frame
90 TCanvas *fCanvas[kNMT]; ///< MT canvases
91 TGTextEdit *fLocTrigE; ///< Window local trigger info
93 AliMUONTriggerGUIboard *fBoard; ///< Current board object
94 AliLoader *fLoader; ///< The MUON loader
95 AliMUONMCDataInterface *fMCDataInterface; ///< MC data interface
96 AliMUONDigitStoreV1 *fRawDigitStore; ///< Raw data digit store
97 AliMUONTriggerStoreV1 *fRawTriggerStore; ///< Raw data trigger store
99 TGCheckButton *fXStrips; ///< Draw x-strips and digits
100 TGCheckButton *fYStrips; ///< Draw y-strips and digits
101 TGCheckButton *fEditStrips; ///< Set/unset the strips
103 TPolyLine *fXDigPL[kNMT][kNS]; ///< X-strip polyline
104 TPolyLine *fYDigPL[kNMT][kNS]; ///< Y-strip polyline
105 TBox *fXDigBox[kNMT][kNS]; ///< X-digit box
106 TBox *fYDigBox[kNMT][kNS]; ///< Y-digit box
107 TPaveText *fXLabelL[kNMT][kNS]; ///< X-strip labels left
108 TPaveText *fXLabelR[kNMT][kNS]; ///< X-strip labels right
109 TPaveText *fYLabelL[kNMT][kNS]; ///< Y-strip labels left
110 TPaveText *fYLabelR[kNMT][kNS]; ///< Y-strip labels right
112 Float_t fXWidth[kNMT]; ///< Board x-width
113 Float_t fYWidth[kNMT]; ///< Board y-width
114 Float_t fXCenter[kNMT]; ///< Board x-center
115 Float_t fYCenter[kNMT]; ///< Board y-center
117 Bool_t fXOn; ///< x-strips/digits on canvas ?
118 Bool_t fYOn; ///< y-strips/digits on canvas ?
119 Bool_t fLabelX; ///< x-labels exist
120 Bool_t fLabelY; ///< y-labels exist
121 Bool_t fIsEditable; ///< allows set/unset the strips
123 UInt_t fCanvasSize; ///< Size of the canvas
124 Int_t fNStripX; ///< Number of x-strips on board
125 Int_t fNStripY; ///< Number of y-strips on board
127 TObjArray *fBoards; ///< Array with all boards
129 AliMUONCalibrationData *fCalibrationData; ///< Pointer to calibration data
130 AliMUONTriggerCrateStore *fCrateManager; ///< trigger boards manager
132 ClassDef(AliMUONTriggerGUIbdmap,2) // board gui class