1 #ifndef ALIMUONTRIGGERGUI_H
2 #define ALIMUONTRIGGERGUI_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
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
16 #include <TObjArray.h>
20 class TGTransientFrame;
24 class TRootEmbeddedCanvas;
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;
43 class AliMUONTriggerGUI : public TObject
48 AliMUONTriggerGUI(Int_t runNumber = 0);
49 virtual ~AliMUONTriggerGUI() {
50 /// main gui destructor
53 void OpenBoard(Int_t id);
54 void HandleMenu(Int_t id);
56 void CreateDigitStore();
57 void PrintDigitStore() const;
58 void ClearDigitStore();
60 void CreateTriggerStore();
61 void PrintTriggerStore() const;
62 void ClearTriggerStore();
64 void WriteTriggerRawData();
66 void FET(Int_t onoff);
67 void FETboard(Int_t ib, Int_t amp);
74 void DoControlClose();
75 void DoCircuitCancel();
79 void DoPreviousEvent();
81 void DoErrorGUI(const Char_t *wt);
82 void DoFETRegRun(Int_t onoff);
83 void DoFETRegOnCancel();
84 void DoFETRegOffCancel();
86 void DoFETRegOffRun();
91 void CloseRunInput() const;
92 void CloseError() const;
93 void CloseControl() const;
94 void CloseCircuit() const;
95 void CloseFETRegOn() const;
96 void CloseFETRegOff() const;
100 AliMUONTriggerGUI (const AliMUONTriggerGUI& board); ///< copy constructor
101 AliMUONTriggerGUI& operator=(const AliMUONTriggerGUI& board);///< assignment operator
105 /// nr of boards, nr of chambers
106 enum { kNBoards = 234, kNMT = 4 };
108 /// working status flags
109 enum EMenuIdentifiers {
137 kGood = 0x0001, kWithProblems = 0x0002, kNotWorking = 0x0004, kUnknown = 0x0008
138 }; ///< working status flags
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
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
155 TGTextEntry *fSkipToEventTxt;///< Control field shows current event number
157 TString *fFileName; ///< Full galice file name
158 TString *fPath; ///< Path string to galice
159 TString *fEvString; ///< Event number string
161 Int_t fChamber; ///< Current MT chamber
162 Int_t fEvent; ///< Current event number
163 Int_t fEventsPerRun; ///< Number of events per file (run)
165 AliLoader *fLoader; ///< The MUON loader
166 AliRunLoader *fRunLoader; ///< The run loader
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
173 Bool_t fBoardsInit; ///< Control the InitBoards only once
174 Bool_t fControlOn; ///< If the control frame is open
176 AliMUONTriggerGUIdimap *fDiMap; ///< Digits map
178 AliMUONTriggerElectronics *fTriggerProcessor; ///< The GUI trigger processor
180 TObjArray *fBoards; ///< The array of trigger boards
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
191 /// Access the array of trigger boards
192 TObjArray *Boards() {
193 if(!fBoards) fBoards = new TObjArray(kNBoards); return fBoards;
195 AliMUONTriggerGUIboard *GetBoard(Int_t id) const;
198 virtual void InitBoards();
200 void SetStripBoxes(AliMUONTriggerGUIboard *board);
202 ClassDef(AliMUONTriggerGUI,2) // Main GUI class for the MUON trigger