Belle II Software
release-08-01-10
|
Control TEve browser user interface. More...
#include <DisplayUI.h>
Classes | |
struct | Parameter |
Wraps a module parameter that can be toggled from the UI. More... | |
Public Member Functions | |
DisplayUI (bool automatic=false, bool advance=false) | |
Constructor. More... | |
~DisplayUI () | |
Destructor. | |
void | addParameter (const std::string &label, ModuleParam< bool > ¶m, int level) |
Generate UI elements so the given module parameter can be changed at run time. More... | |
void | next () |
Go to next event. | |
void | prev () |
Go to previous event. | |
void | goToEvent (Long_t id) |
Go to event with index id. | |
void | goToEvent (Long_t event, Long_t run, Long_t experiment) |
Go to the event specified, using the input file's index. | |
void | goToEventWidget () |
go to the event given by m_eventNumberWidget. | |
void | autoAdvanceDelayChanged () |
m_autoAdvanceDelay was changed, update m_timer if enabled. | |
void | togglePlayPause () |
Handle Play/Pause button clicks. | |
void | showJumpToEventDialog () |
Show a dialog to to enter exp, run, event numbers. | |
void | clearEvent () |
remove all event data in current event. | |
void | startAutomaticRun () |
switch to automatic mode, where visualisations are saved for each event, with no interactive control. | |
void | automaticEvent () |
The actual per-event functionality for automatic saving. | |
bool | startDisplay () |
Start interactive display for current event. More... | |
void | setTitle (const std::string &fileName="") |
Set title of Eve window. More... | |
void | allowFlaggingEvents (const std::string &description="") |
Show control for flagging events (to set module return value). More... | |
bool | getReturnValue () const |
Return value for current event, only makes sense if allowFlaggingEvents(true) was called. More... | |
void | hideObjects (const std::vector< std::string > &names) |
hide objects with the given names. | |
void | toggleColorScheme () |
Toggle between light and dark color scheme for viewers. | |
void | toggleUndock () |
dock/undock active viewer. | |
void | handleParameterChange (int id) |
Called when one of the module parameters is changed via UI. | |
void | savePicture (bool highres=false) |
Save the current view to a user-defined filename. More... | |
void | saveHiResPicture () |
alias for savePicture(true). | |
SplitGLView * | getViewPane () |
return right-side pane with viewers. | |
void | pollNewEvents () |
Check if new events are available, and go to next event. More... | |
void | closeAndExit () |
Close window and exit immediately. | |
void | showUserData (const DisplayData &displayData) |
Add user-defined data (histograms, etc.). | |
bool | cumulativeIsOn () const |
If true, DisplayModule shouldn't clear previous data (i.e. More... | |
void | toggleCumulative () |
toggle cumulative mode. | |
void | selectionHandler (TEveElement *eveObj) |
Handle special actions when objects are selected. | |
void | handleEvent (Event_t *event) |
Handles keyboard shortcuts. | |
Private Member Functions | |
void | makeGui () |
Build the buttons for event navigation. | |
void | updateUI () |
Update UI after a new event was loaded, as well as m_currentEntry. | |
Private Attributes | |
long | m_currentEntry {0} |
Current entry id. | |
bool | m_guiInitialized {false} |
Was GUI already built? | |
bool | m_reshowCurrentEvent {false} |
Show current event again after startDisplay() returns? | |
bool | m_automatic {false} |
If true, disable interactive control and call automaticEvent() instead. | |
bool | m_advance {false} |
If true, start advancing through the events on startup. | |
bool | m_cumulative {false} |
If true, DisplayModule shouldn't clear previous data (i.e. More... | |
std::vector< Parameter > | m_paramList |
List of run time configurable module parameters. | |
TGButton * | m_prevButton {nullptr} |
Button to switch to previous event. | |
TGButton * | m_nextButton {nullptr} |
Button to switch to next event. | |
TGNumberEntry * | m_eventNumberWidget {nullptr} |
Event switcher with numeric entry. | |
TGNumberEntry * | m_autoAdvanceDelay {nullptr} |
Delay for automatic advance, in seconds. | |
TGPictureButton * | m_playPauseButton {nullptr} |
Play / Pause button. | |
TGCheckButton * | m_flagEvent {nullptr} |
Show control for flagging events (to set module return value). | |
TGLabel * | m_eventLabel {nullptr} |
show event/run/exp number for current event. | |
TGTextEntry * | m_autoFileNamePrefix {nullptr} |
File name prefix (prefix + event number + "_" + projection + ".png"). | |
TGNumberEntry * | m_autoPictureWidth {nullptr} |
width of saved PNGs. | |
TEveElementList * | m_eventData {nullptr} |
List of event data, including projections. | |
SplitGLView * | m_viewPane {nullptr} |
pointer to right-side pane with viewers. | |
TTimer * | m_timer {nullptr} |
Polling/auto-advance timer. | |
std::vector< std::string > | m_hideObjects |
objects which are to be hidden (can be manually re-enabled in tree view). More... | |
Control TEve browser user interface.
Mostly responsible for interactive elements like buttons etc.
Definition at line 41 of file DisplayUI.h.
|
explicit |
Constructor.
automatic | if true, hide window and save events using automaticEvent() |
advance | if true, start advancing through the events on startup. |
Definition at line 58 of file DisplayUI.cc.
void addParameter | ( | const std::string & | label, |
ModuleParam< bool > & | param, | ||
int | level | ||
) |
Generate UI elements so the given module parameter can be changed at run time.
Will result in a checkbox with given label indented by the amount in level (0 being leftmost). Clicking the checkbox will toggle the parameter and reload the event.
Definition at line 87 of file DisplayUI.cc.
void allowFlaggingEvents | ( | const std::string & | description = "" | ) |
Show control for flagging events (to set module return value).
Needs to be called in initialize().
Definition at line 124 of file DisplayUI.cc.
|
inline |
If true, DisplayModule shouldn't clear previous data (i.e.
we want to show multiple events)
Definition at line 148 of file DisplayUI.h.
bool getReturnValue | ( | ) | const |
Return value for current event, only makes sense if allowFlaggingEvents(true) was called.
Return value for current event, only makes sense if allowFlaggingEvents() was called.
Definition at line 134 of file DisplayUI.cc.
void pollNewEvents | ( | ) |
Check if new events are available, and go to next event.
Only useful for AsyncDisplay.
Definition at line 789 of file DisplayUI.cc.
void savePicture | ( | bool | highres = false | ) |
Save the current view to a user-defined filename.
highres | save picture with 4000px width instead of screen size |
Definition at line 703 of file DisplayUI.cc.
void setTitle | ( | const std::string & | fileName = "" | ) |
bool startDisplay | ( | ) |
Start interactive display for current event.
Returns only after user presses prev/next, or closes the window.
Definition at line 337 of file DisplayUI.cc.
|
private |
If true, DisplayModule shouldn't clear previous data (i.e.
we want to show multiple events)
Definition at line 192 of file DisplayUI.h.
|
private |
objects which are to be hidden (can be manually re-enabled in tree view).
Names correspond to the object names in the 'Event Scene'.
Definition at line 234 of file DisplayUI.h.