Line data Source code
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
10 : // Author Bogdan Vulpescu, LPC Clermont-Ferrand
11 :
12 : #include <TGFrame.h>
13 : #include <TObjArray.h>
14 :
15 : class TCanvas;
16 : class TGCheckButton;
17 : class TGTextEdit;
18 : class TPolyLine;
19 : class TBox;
20 : class TPaveText;
21 : class TH1F;
22 : class TLatex;
23 : class TGTableLayout;
24 : class TGLabel;
25 :
26 : class AliMUONTriggerGUIboard;
27 : class AliMUONTriggerGUI;
28 : class AliMUONTriggerCircuit;
29 : class AliMUONTriggerCrateStore;
30 : class AliMUONMCDataInterface;
31 : class AliMUONDigitStoreV1;
32 : class AliMUONTriggerStoreV1;
33 : class AliMUONCalibrationData;
34 : class AliLoader;
35 :
36 : class AliMUONTriggerGUIbdmap : public TGFrame
37 : {
38 :
39 : public:
40 :
41 : AliMUONTriggerGUIbdmap(const TGWindow *p, const TGWindow *mainWindow, UInt_t w, UInt_t h);
42 : virtual ~AliMUONTriggerGUIbdmap();
43 :
44 : /// set the name of the board gui window
45 0 : void SetName(const Char_t *name) { fMain->SetWindowName(name); };
46 : /// set the board associated to this instance
47 0 : 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) {
50 0 : fBoards = boards;
51 0 : fBoard = (AliMUONTriggerGUIboard*)boards->UncheckedAt(id); }
52 : /// set the current muon loader
53 0 : void SetLoader(AliLoader * const loader) { fLoader = loader; };
54 : /// set the MC data interface
55 0 : void SetMCDataInterface(AliMUONMCDataInterface * const mc) { fMCDataInterface = mc; };
56 : /// set the digit store from raw data
57 0 : void SetRawDigitStore(AliMUONDigitStoreV1 * const ds) { fRawDigitStore = ds; };
58 : /// set the trigger store from raw data
59 0 : void SetRawTriggerStore(AliMUONTriggerStoreV1 * const ts) { fRawTriggerStore = ts; };
60 :
61 : /// set the trigger boards manager
62 0 : void SetCrateManager(AliMUONTriggerCrateStore * const crates) { fCrateManager = crates; };
63 :
64 : void Show();
65 :
66 : void DrawStrips(Bool_t bx, Bool_t by);
67 : void DrawDigits(Bool_t bx, Bool_t by);
68 : void DrawClear();
69 : void EditStrips(Int_t event, Int_t x, Int_t y, TObject *sel);
70 :
71 : void Init();
72 : void HandleButtons(Int_t id = -1);
73 : void HandleEditButton();
74 : void CloseWindow() const;
75 : void DoClose();
76 : void DoDigits();
77 : void ResetDigits();
78 : void LocalTriggerInfo();
79 :
80 : private:
81 : /// Not implemented
82 : AliMUONTriggerGUIbdmap (const AliMUONTriggerGUIbdmap& bdmap);
83 : /// Not implemented
84 : AliMUONTriggerGUIbdmap& operator=(const AliMUONTriggerGUIbdmap& bdmap);
85 :
86 :
87 : enum { kNBoards = 234, kNMT = 4, kNS = 16 }; ///< constants
88 :
89 : TGTransientFrame *fMain; ///< Main board frame
90 : TCanvas *fCanvas[kNMT]; ///< MT canvases
91 : TGTextEdit *fLocTrigE; ///< Window local trigger info
92 :
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
98 :
99 : TGCheckButton *fXStrips; ///< Draw x-strips and digits
100 : TGCheckButton *fYStrips; ///< Draw y-strips and digits
101 : TGCheckButton *fEditStrips; ///< Set/unset the strips
102 :
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
111 :
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
116 :
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
122 :
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
126 :
127 : TObjArray *fBoards; ///< Array with all boards
128 :
129 : AliMUONCalibrationData *fCalibrationData; ///< Pointer to calibration data
130 : AliMUONTriggerCrateStore *fCrateManager; ///< trigger boards manager
131 :
132 16 : ClassDef(AliMUONTriggerGUIbdmap,2) // board gui class
133 :
134 : };
135 :
136 : #endif
|