Line data Source code
1 : #ifndef ALIMUONTRIGGERGUI_H
2 : #define ALIMUONTRIGGERGUI_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : /* $Id$ */
8 :
9 : /// \ingroup evaluation
10 : /// \class AliMUONTriggerGUI
11 : /// \brief Graphical User Interface utility class for the MUON trigger detector
12 : // Author Bogdan Vulpescu, LPC Clermont-Ferrand
13 :
14 :
15 : #include <TObject.h>
16 : #include <TObjArray.h>
17 :
18 : class TString;
19 : class TGMainFrame;
20 : class TGTransientFrame;
21 : class TGImageMap;
22 : class TGTextEntry;
23 : class TGTextBuffer;
24 : class TRootEmbeddedCanvas;
25 : class TParticle;
26 : class TGTableLayout;
27 :
28 : class AliStack;
29 : class AliLoader;
30 : class AliRunLoader;
31 : class AliCDBManager;
32 : class AliRawReader;
33 : class AliMUONCalibrationData;
34 : class AliMUONTriggerGUIboard;
35 : class AliMUONTriggerGUIdimap;
36 : class AliMUONTriggerElectronics;
37 : class AliMUONTriggerCrateStore;
38 : class AliMUONMCDataInterface;
39 : class AliMUONDigitStoreV2R;
40 : class AliMUONDigitStoreV1;
41 : class AliMUONTriggerStoreV1;
42 :
43 : class AliMUONTriggerGUI : public TObject
44 : {
45 :
46 : public:
47 :
48 : AliMUONTriggerGUI(Int_t runNumber = 0);
49 0 : virtual ~AliMUONTriggerGUI() {
50 : /// main gui destructor
51 0 : };
52 :
53 : void OpenBoard(Int_t id);
54 : void HandleMenu(Int_t id);
55 :
56 : void CreateDigitStore();
57 : void PrintDigitStore() const;
58 : void ClearDigitStore();
59 :
60 : void CreateTriggerStore();
61 : void PrintTriggerStore() const;
62 : void ClearTriggerStore();
63 :
64 : void WriteTriggerRawData();
65 :
66 : void FET(Int_t onoff);
67 : void FETboard(Int_t ib, Int_t amp);
68 :
69 : /* Do functions */
70 :
71 : void DoRunGalApply();
72 : void DoRunRawApply();
73 : void DoRunCancel();
74 : void DoControlClose();
75 : void DoCircuitCancel();
76 : void DoCircuitOpen();
77 : void DoErrorOK();
78 : void DoNextEvent();
79 : void DoPreviousEvent();
80 : void DoSkipToEvent();
81 : void DoErrorGUI(const Char_t *wt);
82 : void DoFETRegRun(Int_t onoff);
83 : void DoFETRegOnCancel();
84 : void DoFETRegOffCancel();
85 : void DoFETRegOnRun();
86 : void DoFETRegOffRun();
87 :
88 : /* Close functions */
89 :
90 : void CloseWindow();
91 : void CloseRunInput() const;
92 : void CloseError() const;
93 : void CloseControl() const;
94 : void CloseCircuit() const;
95 : void CloseFETRegOn() const;
96 : void CloseFETRegOff() const;
97 :
98 : private:
99 :
100 : AliMUONTriggerGUI (const AliMUONTriggerGUI& board); ///< copy constructor
101 : AliMUONTriggerGUI& operator=(const AliMUONTriggerGUI& board);///< assignment operator
102 :
103 : private:
104 :
105 : /// nr of boards, nr of chambers
106 : enum { kNBoards = 234, kNMT = 4 };
107 :
108 : /// working status flags
109 : enum EMenuIdentifiers {
110 :
111 : kMFILEEXIT,
112 : kMFILERUN,
113 : kMFILECNTRL,
114 :
115 : kMMAPDIGITS,
116 : kMRESETDIGITS,
117 :
118 : kMCIRCUITOPEN,
119 :
120 : kMFETON,
121 : kMFETOFF,
122 : kMFETREGON,
123 : kMFETREGOFF,
124 :
125 : kMDSTORE,
126 : kMTSTORE,
127 : kMDSTORECL,
128 : kMTSTORECL,
129 : kMDSTOREP,
130 : kMTSTOREP,
131 :
132 : kMTRAWDATA
133 :
134 : };
135 :
136 : enum {
137 : kGood = 0x0001, kWithProblems = 0x0002, kNotWorking = 0x0004, kUnknown = 0x0008
138 : }; ///< working status flags
139 :
140 : TGMainFrame *fMain; ///< The main frame
141 : TGImageMap *fImageMap; ///< The image map of the main frame
142 : TGTextBuffer *fTxtBuffer1; ///< Path to the data (galice.root)
143 : TGTextBuffer *fTxtBuffer2; ///< Current event number
144 : TGTextBuffer *fTxtCircuit; ///< Circuit to open
145 : TGTextBuffer *fTxtFETRegOn; ///< Regional crate to FET ON
146 : TGTextBuffer *fTxtFETRegOff; ///< Regional crate to FET OFF
147 :
148 : TGTransientFrame *fRunInput; ///< Run input window
149 : TGTransientFrame *fError; ///< Error window
150 : TGTransientFrame *fControl; ///< Run control window
151 : TGTransientFrame *fCircuit; ///< Circuit window
152 : TGTransientFrame *fFETRegOn; ///< FET ON for a regional card
153 : TGTransientFrame *fFETRegOff; ///< FET OFF for a regional card
154 :
155 : TGTextEntry *fSkipToEventTxt;///< Control field shows current event number
156 :
157 : TString *fFileName; ///< Full galice file name
158 : TString *fPath; ///< Path string to galice
159 : TString *fEvString; ///< Event number string
160 :
161 : Int_t fChamber; ///< Current MT chamber
162 : Int_t fEvent; ///< Current event number
163 : Int_t fEventsPerRun; ///< Number of events per file (run)
164 :
165 : AliLoader *fLoader; ///< The MUON loader
166 : AliRunLoader *fRunLoader; ///< The run loader
167 :
168 : AliCDBManager *fCDBManager; ///< Calibration DB manager
169 : AliMUONCalibrationData *fCalibrationData; ///< Calibration data for MUON
170 : AliMUONTriggerCrateStore *fCrateManager; ///< trigger boards manager
171 : AliMUONMCDataInterface *fMCDataInterface; ///< MC data interface
172 :
173 : Bool_t fBoardsInit; ///< Control the InitBoards only once
174 : Bool_t fControlOn; ///< If the control frame is open
175 :
176 : AliMUONTriggerGUIdimap *fDiMap; ///< Digits map
177 :
178 : AliMUONTriggerElectronics *fTriggerProcessor; ///< The GUI trigger processor
179 :
180 : TObjArray *fBoards; ///< The array of trigger boards
181 :
182 : AliMUONDigitStoreV2R *fDigitStore; ///< GUI digit store (DSET)
183 : AliMUONTriggerStoreV1* fTriggerStore; ///< Trigger store with GUI digit store
184 : Bool_t fTStoreOn; ///< True if DSET trigger store has data
185 : Bool_t fRUNRAW; ///< True if run with raw data (root)
186 : AliRawReader *fRawReader; ///< Reader for raw data input
187 : Int_t fCurrentRawEvent; ///< Current event for raw data input
188 : AliMUONDigitStoreV1 *fRawDigitStore; ///< Digit store from raw data
189 : AliMUONTriggerStoreV1 *fRawTriggerStore; ///< Trigger store from raw data
190 :
191 : /// Access the array of trigger boards
192 : TObjArray *Boards() {
193 0 : if(!fBoards) fBoards = new TObjArray(kNBoards); return fBoards;
194 0 : };
195 : AliMUONTriggerGUIboard *GetBoard(Int_t id) const;
196 :
197 : virtual void Init();
198 : virtual void InitBoards();
199 :
200 : void SetStripBoxes(AliMUONTriggerGUIboard *board);
201 :
202 16 : ClassDef(AliMUONTriggerGUI,2) // Main GUI class for the MUON trigger
203 :
204 : };
205 :
206 : #endif
|