Public Member Functions | Private Member Functions | Private Attributes | List of all members
EDep::TGUIManager Class Reference

#include <TGUIManager.hxx>

Public Member Functions

 TGUIManager ()
 Actually construct all the GUI. More...
 
 ~TGUIManager ()
 
TGButton * GetNextEventButton ()
 Get the next event button widget. More...
 
TGButton * GetDrawEventButton ()
 Get the redraw current event button widget. More...
 
TGButton * GetPrevEventButton ()
 Get the previous event button widget. More...
 
TGButton * GetShowFitsButton ()
 Get the check button selecting if reconstruction objects are shown. More...
 
TGButton * GetShowFitsHitsButton ()
 
TGButton * GetShowFitsDirectionButton ()
 
TGButton * GetShowConstituentClustersButton ()
 Get the button to show constituent clusters of an object or not. More...
 
TGButton * GetShowClusterHitsButton ()
 Get the button to select if hits are drawn for the cluster. More...
 
TGButton * GetShowClusterUncertaintyButton ()
 Get the button to select if raw or calibrated digits should be drawn. More...
 
TGButton * GetShowTrajectoriesButton ()
 Get the check button selecting if trajectories should be shown. More...
 
TGButton * GetShowG4HitsButton ()
 Get the check button selecting if G4 hits should be shown. More...
 
TGButton * GetRecalculateViewButton ()
 Get the check button selecting if view point should be recalculated. More...
 
TGButton * GetDrawTimeChargeButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetFitTimeChargeButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetShowXTimeChargeButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetShowVTimeChargeButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetShowUTimeChargeButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetDrawXDigitsButton ()
 Get the button to draw the X plane digits. More...
 
TGButton * GetDrawVDigitsButton ()
 Get the button to draw the V plane digits. More...
 
TGButton * GetDrawUDigitsButton ()
 Get the button to draw the U plane digits. More...
 
TGButton * GetShowRawDigitsButton ()
 Get the button to select if raw or calibrated digits should be drawn. More...
 
TGButton * GetShowFullDigitsButton ()
 Get the button to select if all digit samples are drawn. More...
 
TGButton * GetShowDigitSamplesButton ()
 Get the button to select if any digit samples are drawn. More...
 
TGListBox * GetResultsList ()
 Get the list box with the select results to show. More...
 
TGTextEntry * GetDefaultResult ()
 The get text entry widget for the default result to show. More...
 

Private Member Functions

void MakeControlTab ()
 Make a tab in the browser for control buttons. More...
 
void MakeResultsTab ()
 Make a tab in the browser to select algorithms shown. More...
 

Private Attributes

TGButton * fNextEventButton
 
TGButton * fDrawEventButton
 
TGButton * fPrevEventButton
 
TGButton * fShowFitsHitsButton
 
TGButton * fShowFitsButton
 
TGButton * fShowFitsDirectionButton
 
TGButton * fShowConstituentClustersButton
 
TGButton * fShowClusterHitsButton
 
TGButton * fShowClusterUncertaintyButton
 
TGButton * fShowTrajectoriesButton
 
TGButton * fShowG4HitsButton
 
TGButton * fRecalculateViewButton
 
TGButton * fDrawTimeChargeButton
 
TGButton * fFitTimeChargeButton
 
TGButton * fShowXTimeChargeButton
 
TGButton * fShowVTimeChargeButton
 
TGButton * fShowUTimeChargeButton
 
TGButton * fDrawUDigitsButton
 
TGButton * fDrawVDigitsButton
 
TGButton * fDrawXDigitsButton
 
TGButton * fShowRawDigitsButton
 
TGButton * fShowFullDigitsButton
 
TGButton * fShowDigitSamplesButton
 
TGListBox * fResultsList
 
TGTextEntry * fDefaultResult
 A regular expression to select the default result(s) to be selected. More...
 

Detailed Description

This creates the GUI interface for the event display, and then provides handles so that other functions can connect to the interface. A pointer to each interface widget can be accessed by a method named by it's function. For instance, the "Read Next Event" button is named "GetNextEventButton()", and returns a TGButton pointer. This is managed by the EDep::TEventDisplay class which returns it via the GetGUI() method.

Note
This does not connect any actions to the buttons. It only constructs the GUI and then allows access to the GUI widget.
The default state of widgets (e.g. the button widgets) is set when the widget is created. This is how the default drawing attributes can be set.

Definition at line 26 of file TGUIManager.hxx.

Constructor & Destructor Documentation

EDep::TGUIManager::TGUIManager ( )

Actually construct all the GUI.

Definition at line 15 of file TGUIManager.cxx.

15  {
18 }
void MakeControlTab()
Make a tab in the browser for control buttons.
Definition: TGUIManager.cxx:20
void MakeResultsTab()
Make a tab in the browser to select algorithms shown.
EDep::TGUIManager::~TGUIManager ( )

Definition at line 169 of file TGUIManager.cxx.

169 { }

Member Function Documentation

TGTextEntry* EDep::TGUIManager::GetDefaultResult ( )
inline

The get text entry widget for the default result to show.

Definition at line 119 of file TGUIManager.hxx.

119 {return fDefaultResult;}
TGTextEntry * fDefaultResult
A regular expression to select the default result(s) to be selected.
TGButton* EDep::TGUIManager::GetDrawEventButton ( )
inline

Get the redraw current event button widget.

Definition at line 40 of file TGUIManager.hxx.

40 {return fDrawEventButton;}
TGButton * fDrawEventButton
TGButton* EDep::TGUIManager::GetDrawTimeChargeButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 78 of file TGUIManager.hxx.

78 {return fDrawTimeChargeButton;}
TGButton * fDrawTimeChargeButton
TGButton* EDep::TGUIManager::GetDrawUDigitsButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 99 of file TGUIManager.hxx.

99 {return fDrawUDigitsButton;}
TGButton * fDrawUDigitsButton
TGButton* EDep::TGUIManager::GetDrawVDigitsButton ( )
inline

Get the button to draw the V plane digits.

Definition at line 96 of file TGUIManager.hxx.

96 {return fDrawVDigitsButton;}
TGButton * fDrawVDigitsButton
TGButton* EDep::TGUIManager::GetDrawXDigitsButton ( )
inline

Get the button to draw the X plane digits.

Definition at line 93 of file TGUIManager.hxx.

93 {return fDrawXDigitsButton;}
TGButton * fDrawXDigitsButton
TGButton* EDep::TGUIManager::GetFitTimeChargeButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 81 of file TGUIManager.hxx.

81 {return fFitTimeChargeButton;}
TGButton * fFitTimeChargeButton
TGButton* EDep::TGUIManager::GetNextEventButton ( )
inline

Get the next event button widget.

Definition at line 37 of file TGUIManager.hxx.

37 {return fNextEventButton;}
TGButton * fNextEventButton
TGButton* EDep::TGUIManager::GetPrevEventButton ( )
inline

Get the previous event button widget.

Definition at line 43 of file TGUIManager.hxx.

43 {return fPrevEventButton;}
TGButton * fPrevEventButton
TGButton* EDep::TGUIManager::GetRecalculateViewButton ( )
inline

Get the check button selecting if view point should be recalculated.

Definition at line 75 of file TGUIManager.hxx.

75 {return fRecalculateViewButton;}
TGButton * fRecalculateViewButton
TGListBox* EDep::TGUIManager::GetResultsList ( )
inline

Get the list box with the select results to show.

Definition at line 116 of file TGUIManager.hxx.

116 {return fResultsList;}
TGListBox * fResultsList
TGButton* EDep::TGUIManager::GetShowClusterHitsButton ( )
inline

Get the button to select if hits are drawn for the cluster.

Definition at line 61 of file TGUIManager.hxx.

62  {return fShowClusterHitsButton;}
TGButton * fShowClusterHitsButton
TGButton* EDep::TGUIManager::GetShowClusterUncertaintyButton ( )
inline

Get the button to select if raw or calibrated digits should be drawn.

Definition at line 65 of file TGUIManager.hxx.

TGButton * fShowClusterUncertaintyButton
TGButton* EDep::TGUIManager::GetShowConstituentClustersButton ( )
inline

Get the button to show constituent clusters of an object or not.

Definition at line 57 of file TGUIManager.hxx.

TGButton * fShowConstituentClustersButton
TGButton* EDep::TGUIManager::GetShowDigitSamplesButton ( )
inline

Get the button to select if any digit samples are drawn.

Definition at line 108 of file TGUIManager.hxx.

108 {return fShowDigitSamplesButton;}
TGButton * fShowDigitSamplesButton
TGButton* EDep::TGUIManager::GetShowFitsButton ( )
inline

Get the check button selecting if reconstruction objects are shown.

Definition at line 46 of file TGUIManager.hxx.

46 {return fShowFitsButton;}
TGButton * fShowFitsButton
TGButton* EDep::TGUIManager::GetShowFitsDirectionButton ( )
inline

Get the check button selecting if hits associated with shown reconstruction objects should be drawn.

Definition at line 54 of file TGUIManager.hxx.

TGButton * fShowFitsDirectionButton
TGButton* EDep::TGUIManager::GetShowFitsHitsButton ( )
inline

Get the check button selecting if hits associated with shown reconstruction objects should be drawn.

Definition at line 50 of file TGUIManager.hxx.

50 {return fShowFitsHitsButton;}
TGButton * fShowFitsHitsButton
TGButton* EDep::TGUIManager::GetShowFullDigitsButton ( )
inline

Get the button to select if all digit samples are drawn.

Definition at line 105 of file TGUIManager.hxx.

105 {return fShowFullDigitsButton;}
TGButton * fShowFullDigitsButton
TGButton* EDep::TGUIManager::GetShowG4HitsButton ( )
inline

Get the check button selecting if G4 hits should be shown.

Definition at line 72 of file TGUIManager.hxx.

72 {return fShowG4HitsButton;}
TGButton * fShowG4HitsButton
TGButton* EDep::TGUIManager::GetShowRawDigitsButton ( )
inline

Get the button to select if raw or calibrated digits should be drawn.

Definition at line 102 of file TGUIManager.hxx.

102 {return fShowRawDigitsButton;}
TGButton * fShowRawDigitsButton
TGButton* EDep::TGUIManager::GetShowTrajectoriesButton ( )
inline

Get the check button selecting if trajectories should be shown.

Definition at line 69 of file TGUIManager.hxx.

TGButton * fShowTrajectoriesButton
TGButton* EDep::TGUIManager::GetShowUTimeChargeButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 90 of file TGUIManager.hxx.

90 {return fShowUTimeChargeButton;}
TGButton * fShowUTimeChargeButton
TGButton* EDep::TGUIManager::GetShowVTimeChargeButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 87 of file TGUIManager.hxx.

87 {return fShowVTimeChargeButton;}
TGButton * fShowVTimeChargeButton
TGButton* EDep::TGUIManager::GetShowXTimeChargeButton ( )
inline

Get the button to draw the U plane digits.

Definition at line 84 of file TGUIManager.hxx.

84 {return fShowXTimeChargeButton;}
TGButton * fShowXTimeChargeButton
void EDep::TGUIManager::MakeControlTab ( )
private

Make a tab in the browser for control buttons.

Definition at line 20 of file TGUIManager.cxx.

20  {
21  TEveBrowser* browser = gEve->GetBrowser();
22 
23  // Define the generic layout. The last four parameters are the padding
24  // around the widgets.
25  TGLayoutHints* layoutHints
26  = new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX,
27  2, 2, 2, 2);
28 
29  // Embed a new frame in the event browser to have control buttons.
30  browser->StartEmbedding(TRootBrowser::kLeft);
31  TGMainFrame* mainFrame = new TGMainFrame(gClient->GetRoot(), 1000, 600);
32  mainFrame->SetWindowName("Event Control");
33  mainFrame->SetCleanup(kDeepCleanup);
34 
35  TGVerticalFrame* hf = new TGVerticalFrame(mainFrame);
36  TGTextButton* textButton;
37 
38  // The general action buttons.
39  textButton = new TGTextButton(hf, "Previous Event");
40  textButton->SetToolTipText("Go to previous event.");
41  textButton->SetTextJustify(36);
42  textButton->SetMargins(0,0,0,0);
43  textButton->SetWrapLength(-1);
44  hf->AddFrame(textButton, layoutHints);
45  fPrevEventButton = textButton;
46 
47  textButton = new TGTextButton(hf, "Redraw Event");
48  textButton->SetToolTipText("Refresh the current view.");
49  textButton->SetTextJustify(36);
50  textButton->SetMargins(0,0,0,0);
51  textButton->SetWrapLength(-1);
52  hf->AddFrame(textButton, layoutHints);
53  fDrawEventButton = textButton;
54 
55  textButton = new TGTextButton(hf, "Next Event");
56  textButton->SetToolTipText("Go to previous event.");
57  textButton->SetTextJustify(36);
58  textButton->SetMargins(0,0,0,0);
59  textButton->SetWrapLength(-1);
60  hf->AddFrame(textButton, layoutHints);
61  fNextEventButton = textButton;
62 
63  // Create the buttons to select which types of objects are showed.
64  TGCheckButton *checkButton;
65 
66  /////////////////////
67  // Buttons to control how truth objects are drawn.
68  /////////////////////
69 
70  checkButton = new TGCheckButton(hf,"Show Trajectories");
71  checkButton->SetToolTipText(
72  "Show the GEANT4 trajectories and trajectory points.");
73  checkButton->SetTextJustify(36);
74  checkButton->SetMargins(0,0,0,0);
75  checkButton->SetWrapLength(-1);
76  hf->AddFrame(checkButton, layoutHints);
77  fShowTrajectoriesButton = checkButton;
78 
79  checkButton = new TGCheckButton(hf,"Show G4 Hits");
80  checkButton->SetToolTipText(
81  "Show the GEANT4 hits. This shows the energy deposition in the "
82  "defined sensitive detectors.");
83  checkButton->SetTextJustify(36);
84  checkButton->SetMargins(0,0,0,0);
85  checkButton->SetWrapLength(-1);
86  checkButton->SetOn();
87  hf->AddFrame(checkButton, layoutHints);
88  fShowG4HitsButton = checkButton;
89 
90  checkButton = new TGCheckButton(hf,"Recalculate view");
91  checkButton->SetToolTipText(
92  "Recalculate center of rotation based.");
93  checkButton->SetTextJustify(36);
94  checkButton->SetMargins(0,0,0,0);
95  checkButton->SetWrapLength(-1);
96  checkButton->SetOn();
97  hf->AddFrame(checkButton, layoutHints);
98  fRecalculateViewButton = checkButton;
99 
100 
101  // Do the final layout and mapping.
102  mainFrame->AddFrame(hf, layoutHints);
103  mainFrame->MapSubwindows();
104  mainFrame->Resize();
105  mainFrame->MapWindow();
106  browser->StopEmbedding();
107  browser->SetTabTitle("Control", 0);
108 }
TGButton * fNextEventButton
TGButton * fShowTrajectoriesButton
TGButton * fShowG4HitsButton
TGButton * fPrevEventButton
TGButton * fRecalculateViewButton
TGButton * fDrawEventButton
void EDep::TGUIManager::MakeResultsTab ( )
private

Make a tab in the browser to select algorithms shown.

Definition at line 110 of file TGUIManager.cxx.

110  {
111  TEveBrowser* browser = gEve->GetBrowser();
112 
113  // Embed a new frame in the event browser to select fit objects.
114  browser->StartEmbedding(TRootBrowser::kLeft);
115  TGMainFrame* mainFrame = new TGMainFrame(gClient->GetRoot(), 1000, 600);
116  mainFrame->SetWindowName("Fit Selection");
117  mainFrame->SetCleanup(kDeepCleanup);
118 
119  TGVerticalFrame* hf = new TGVerticalFrame(mainFrame);
120 
121  // Create the listbox for the results.
122  fResultsList = new TGListBox(hf);
123  fResultsList->SetMultipleSelections(true);
124  TGLayoutHints* layoutList = new TGLayoutHints(kLHintsLeft
125  | kLHintsTop
126  | kLHintsExpandX
127  | kLHintsExpandY);
128  hf->AddFrame(fResultsList,layoutList);
129 
130  // Create a text entry button to choose a default result.
131  TGLabel* txt = new TGLabel(hf,"Default Result");
132  TGLayoutHints* layoutHints = new TGLayoutHints(kLHintsLeft
133  | kLHintsTop
134  | kLHintsExpandX,
135  2,2,2,2);
136  hf->AddFrame(txt,layoutHints);
137 
138  // Create a text entry button to choose a default result. This also sets
139  // the default default result. It should be possible to override this
140  // from the command line!
141  fDefaultResult = new TGTextEntry(hf);
142  fDefaultResult->SetText("TCaptainRecon/final");
143  fDefaultResult->SetToolTipText(
144  "Enter a regular expression to select algorithm results\n"
145  "to be shown. The usual regexp syntax applys:\n"
146  " . -- Match any character\n"
147  " .* -- Match any sequence of characters\n"
148  " | -- \'or\'\n"
149  "See grep for more details. A result is show if the\n"
150  "regexpn matchs any sub-string in the result name." );
151 
152  hf->AddFrame(fDefaultResult,layoutHints);
153 
154  // Do the final layout and mapping.
155  TGLayoutHints* layoutFrame
156  = new TGLayoutHints(kLHintsLeft
157  | kLHintsTop
158  | kLHintsExpandX
159  | kLHintsExpandY,
160  2, 2, 2, 2);
161  mainFrame->AddFrame(hf, layoutFrame);
162  mainFrame->MapSubwindows();
163  mainFrame->Resize();
164  mainFrame->MapWindow();
165  browser->StopEmbedding();
166  browser->SetTabTitle("Recon", 0);
167 }
TGTextEntry * fDefaultResult
A regular expression to select the default result(s) to be selected.
TGListBox * fResultsList

Member Data Documentation

TGTextEntry* EDep::TGUIManager::fDefaultResult
private

A regular expression to select the default result(s) to be selected.

Definition at line 165 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fDrawEventButton
private

Definition at line 130 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fDrawTimeChargeButton
private

Definition at line 141 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fDrawUDigitsButton
private

Definition at line 146 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fDrawVDigitsButton
private

Definition at line 147 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fDrawXDigitsButton
private

Definition at line 148 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fFitTimeChargeButton
private

Definition at line 142 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fNextEventButton
private

Definition at line 129 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fPrevEventButton
private

Definition at line 131 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fRecalculateViewButton
private

Definition at line 140 of file TGUIManager.hxx.

TGListBox* EDep::TGUIManager::fResultsList
private

A widget containing a list of possible TAlgorithmResult object names to be displayed (when selected).

Definition at line 162 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowClusterHitsButton
private

Definition at line 136 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowClusterUncertaintyButton
private

Definition at line 137 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowConstituentClustersButton
private

Definition at line 135 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowDigitSamplesButton
private

Definition at line 151 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowFitsButton
private

Definition at line 133 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowFitsDirectionButton
private

Definition at line 134 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowFitsHitsButton
private

Definition at line 132 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowFullDigitsButton
private

Definition at line 150 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowG4HitsButton
private

Definition at line 139 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowRawDigitsButton
private

Definition at line 149 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowTrajectoriesButton
private

Definition at line 138 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowUTimeChargeButton
private

Definition at line 145 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowVTimeChargeButton
private

Definition at line 144 of file TGUIManager.hxx.

TGButton* EDep::TGUIManager::fShowXTimeChargeButton
private

Definition at line 143 of file TGUIManager.hxx.


The documentation for this class was generated from the following files: