5 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
11 @brief Qt class for ALICE HLT online Display
16 #include "AliHLTLogging.h"
17 #include "AliHLTGUIMainForm.h"
25 * The class handels the graphical user interface for the ALICE HLT online
26 * display. The input made in the GUI is set in the main class @ref AliHLTTPCDisplayMain.
27 * In order to seperate the Qt code from the ROOT code, all functionality is
28 * implemented in the class @ref AliHLTTPCDisplayMain. This class fuctions just as
29 * front-end for the GUI.<br>
30 * Several options can alredeay defined using the commandline:
31 * -n-time-bins <mode> Sets number of TimeBins for the TPC, can bei either a digit, 'sim' or 'tpc'.
32 * -adc-threshold <mode> Sets the ADC Threshold for the Zero-Suppression of raw data, should be ADC counts.
33 * -occupancy-limit <mode> Sets the Occupancy limits for pads, wherby <mode> is [0,1].
34 * -b-field <mode> Sets the B-field.
35 * -tcp-source <host:port> ... Sets Host and Ports to a TCP port of a @ref TCPDumpSubscriber. Multiple Connections can be given.
36 * -connect Connects already to given TCP-Sources.
37 * --help Shows the Help Menu.
38 * --version Prints version of AliHLTGUI.
39 * @ingroup alihlt_display
42 class AliHLTGUI : public AliHLTGUIMainForm , public AliHLTLogging {
46 /** standard constructor */
51 * @param argc Number of commandline arguments
52 * @param argv Array of commandline arguments
54 AliHLTGUI( Int_t argc, Char_t **argv );
56 /** not a valid copy constructor, defined according to effective C++ style */
57 AliHLTGUI(const AliHLTGUI&);
58 /** not a valid assignment op, but defined according to effective C++ style */
59 AliHLTGUI& operator=(const AliHLTGUI&);
61 /** standard destructor */
66 /** Qt slots for the GUI objects<br> */
67 /** ---------------------------------*/
69 /** Qt slot for connect button */
70 void connectDisplay();
71 /** Qt slot for adding host to hostlist */
73 /** Qt slot for removing host from hostlist */
75 /** Qt slot for next event button */
77 /** Qt slot for event loop button */
79 /** Qt slot for update time of evemt loop */
80 void updateEventLoop();
81 /** Qt slot for redisplay button */
82 void redisplayEvent(){ redisplay(kFALSE); }
85 /** Qt slots for the GUI objects and setter for @ref AliHLTTPCDisplayMain */
86 /** --------------------------------------------------------------------- */
89 * Qt slot for objects, responsible for the selection<br>
90 * of the slices which should be displayed in the 3D view.<br>
91 * Selection is than set to @ref ALiHLTTPCDisplayMain.
96 * Qt slot for zero suppression.<br>
97 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
98 * @ref redisplay() is called afterwards
100 void setZeroSuppression();
103 * Qt slot for selection of new slice for raw data.<br>
104 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
105 * @ref redisplay(kTRUE) is called afterwards, on order to read
106 * the data for the new slice.
111 * Qt slot for selection of padrow for raw data.<br>
112 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
113 * @ref redisplay() is called afterwards
118 * Qt slot for selection of pad for raw data.<br>
119 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
120 * @ref redisplay() is called afterwards
125 * Qt slot for selection of timebins (all timebins,
126 * one timebin, range of timebin) for raw data.<br>
127 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
128 * @ref redisplay() is called afterwards
133 * Qt slot for selection, how timebins should be displayed (sum, average, maximum).<br>
134 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
135 * @ref redisplay() is called afterwards
137 void selectTimeBinData();
140 * Qt slot for splitting padrowCanvas and show padrow
141 * and pad histograms in the same canvas.<br>
142 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
143 * @ref redisplay() is called afterwards
145 void setSplitPadRow();
148 * Qt slot for splitting frontCanvas and show front
149 * and pad histograms in the same canvas.<br>
150 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
151 * @ref redisplay() is called afterwards
153 void setSplitFront();
156 * Qt slot for selection of what to display in 3D: raw data, cluster data, tracks data, geometry.<br>
157 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
158 * @ref redisplay() is called afterwards
163 * Qt slot for selection if only one padrow or all padrow of selected
164 * slice for raw data should be displayed.<br>
165 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
166 * @ref redisplay() is called afterwards
171 * Qt slot for selection of cuts for tracks.<br>
172 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
173 * @ref redisplay() is called afterwards
178 * Qt slot for selection of what clusters shold be displayed:
179 * All clusters, used and unused clusters in terms of associated to found tracks.<br>
180 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
181 * @ref redisplay() is called afterwards
186 * Qt slot for inversion of the background in 3D canvas.<br>
187 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
188 * @ref redisplay() is called afterwards
193 * Qt slot for selection of single tracks or all tracks.
194 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
195 * @ref redisplay() is called afterwards
197 void setSelectTrack();
200 * Qt slot for selection of slice for track and residual objectes.<br>
201 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
202 * @ref redisplay() is called afterwards
204 void selectTrackSector();
207 * Qt slot for selection of single track.<br>
208 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
209 * @ref redisplay() is called afterwards
214 * Qt slot for selection, if angles should be kept when redisplaying
215 * Selection is than set to @ref ALiHLTTPCDisplayMain.<br>
216 * @ref redisplay() is called afterwards
223 /** Shows Track parameter of current selected single Track */
224 void displayTrackParam();
227 * Redisplays event without reading new event,
228 * after change of parameters in the GUI.
229 * @param newRawSlice In the case of changed slice for raw data set
230 * to kTRUE, than data for new raw slice is read.
233 void redisplay(Bool_t newRawSlice=kFALSE); // redisplay function
235 /** Qt slot for save histogram button, saves all canvases. */
236 void saveHistograms();
239 * Enables connect-objects according to connection Status
240 * @param connected Connection status of the GUI to
241 * the TCPDumpSubscriber.<br>
242 * Either kTRUE or kFALSE.
244 void enableDisplay(Bool_t connected);
246 /** Enables data objects according to data availibility */
247 void enableDataObjects();
249 /** Sets pad value in GUI out of @ref AliHLTTPCDisplayMain */
250 void setGUIPad(Int_t pad);
252 /** Callback function fot setGUIPad */
253 static void callback_setGUIPad(void* pt2Object, Int_t pad){
254 AliHLTGUI* myself = (AliHLTGUI*) pt2Object;
255 myself->setGUIPad(pad);
259 /** Pointer to AliHLTTPCDisplayMain */
262 /** Qt vector for hostnames */
263 vector<QString> fHostnames;
264 /** Qt vector for ports */
265 vector<QString> fPorts;
267 /** QtWidget for ROOT padrow canvas */
268 TQtWidget *padrowWidget;
269 /** QtWidget for ROOT pad canvas */
270 TQtWidget *padWidget;
271 /** QtWidget for ROOT residuals canvas */
272 TQtWidget *residualsWidget;
273 /** QtWidget for ROOT charge canvas */
274 TQtWidget *chargeWidget;
275 /** QtWidget for ROOT threeD canvas */
276 TQtWidget *threeDWidget;
277 /** QtWidget for ROOT front canvas */
278 TQtWidget *frontWidget;
279 /** QtWidget for ROOT hist_s canvas */
280 TQtWidget *hits_sWidget;
281 /** QtWidget for ROOT q_track canvas */
282 TQtWidget *q_trackWidget;
283 /** QtWidget for ROOT q_s canvas */
284 TQtWidget *q_sWidget;
285 /** QtWidget for ROOT padrow_pad canvas */
286 TQtWidget *padrow_padWidget;
288 /** Qt Timer for event loop */
292 #endif /* _AliHLTGUI_H_ */