39 #ifdef G4MULTITHREADED
59 fpCommand -> SetGuidance(
"Abort review of kept events.");
60 fpCommand -> SetParameterName(
"abort", omitable=
true);
75 G4cout <<
"Type \"continue\" to complete the abort." <<
G4endl;
86 (
"DURING A RUN draw only those events that have been \"to be kept\" by the user"
87 "\nwith G4EventManager::GetEventManager()->KeepTheCurrentEvent() or"
88 "\nwith \"/event/keepCurrentEvent\".");
90 "To draw selected events the user should set this flag, then in a user action:"
91 "\n if ( some criterion ) {"
92 "\n G4EventManager::GetEventManager()->KeepTheCurrentEvent();"
94 fpCommand -> SetParameterName(
"draw", omitable=
true);
112 G4cout <<
"Only events that have been kept will be drawn." <<
G4endl;
125 fpCommand -> SetGuidance(
"Enables/disables visualization system.");
126 fpCommand -> SetParameterName(
"enabled", omitable=
true);
130 fpCommand1 -> SetGuidance(
"Disables visualization system.");
157 fpCommand -> SetGuidance(
"Initialise visualisation manager.");
176 fpCommand -> SetGuidance(
"Lists visualization parameters.");
177 fpCommand -> SetParameterName(
"verbosity", omitable=
true);
178 fpCommand -> SetDefaultValue(
"warnings");
193 G4String& verbosityString = newValue;
206 UImanager->
ApplyCommand(
"/vis/scene/list ! " + newValue);
207 UImanager->
ApplyCommand(
"/vis/viewer/list ! " + newValue);
210 "\nAttributes available for modeling and filtering with"
211 "\n \"/vis/modeling/trajectories/create/drawByAttribute\" and"
212 "\n \"/vis/filtering/trajectories/create/attributeFilter\" commands"
228 "\nGeometry attributes available for touchables by picking:\n";
234 "\nTo get more information, \"/vis/list all\" or use individual commands"
235 "\n such as (use \"ls\" or \"help\"):"
236 "\n /vis/scene/list all all"
237 "\n /vis/viewer/list all all"
238 "\n /vis/modeling/trajectories/list"
239 "\n /vis/filtering/trajectories/list"
250 fpCommand -> SetGuidance(
"Review kept events.");
252 (
"If a macro file is specified, it is executed for each event.");
254 "If a macro file is not specified, each event is drawn to the current"
255 "\nviewer. After each event, the session is paused. The user may issue"
256 "\nany allowed command. Then enter \"cont[inue]\" to continue to the next"
258 "\nUseful commands might be:"
259 "\n \"/vis/viewer/...\" to change the view (zoom, set/viewpoint,...)."
260 "\n \"/vis/oglx/printEPS\" to get hard copy."
261 "\n \"/vis/open\" to get alternative viewer."
262 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort.");
263 fpCommand -> SetParameterName(
"macro-file-name", omitable=
true);
279 static bool reviewing =
false;
282 "\"/vis/reviewKeptEvents\" not allowed within an already started review."
283 "\n No action taken."
292 #ifdef G4MULTITHREADED
297 const std::vector<const G4Event*>* events = run? run->
GetEventVector(): 0;
298 size_t nKeptEvents = events? events->size(): 0;
303 "ERROR: G4VisCommandReviewKeptEvents::SetNewValue: No kept events,"
304 "\n or kept events not accessible."
314 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
323 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
342 if (macroFileName.empty()) {
346 for (
size_t i = 0; i < nKeptEvents; ++i) {
347 const G4Event*
event = (*events)[i];
349 G4cout <<
"Drawing event : " <<
event->GetEventID() <<
350 ". At EndOfEvent, enter any command, then \"cont[inue]\"..."
356 " Useful commands might be:"
357 "\n \"/vis/scene/add/trajectories\" if not already added."
358 "\n \"/vis/viewer/...\" to change the view (zoom, set/viewpoint,...)."
359 "\n \"/vis/oglx/printEPS\" to get hard copy."
360 "\n \"/vis/open\" to get alternative viewer."
361 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort."
392 for (
size_t i = 0; i < nKeptEvents; ++i) {
393 const G4Event*
event = (*events)[i];
395 G4cout <<
"Drawing event : " <<
event->GetEventID()
396 <<
" with macro file \"" << macroFileName <<
G4endl;
399 UImanager->
ApplyCommand(
"/control/execute " + macroFileName);
420 fpCommand -> SetParameterName(
"verbosity", omitable=
true);
421 fpCommand -> SetDefaultValue(
"warnings");
438 G4cout <<
"Visualization verbosity changed to "
void SetNewValue(G4UIcommand *command, G4String newValue)
static G4MTRunManager * GetMasterRunManager()
static G4RunManager * GetRunManager()
const G4Run * GetCurrentRun() const
virtual ~G4VisCommandVerbose()
G4String GetCurrentValue(G4UIcommand *command)
const std::map< G4String, G4AttDef > * GetAttDefs() const
G4bool GetAbortReviewKeptEvents() const
static G4UIterminal * session
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithAString * fpCommand
void SetDrawEventOnlyIfToBeKept(G4bool)
static Verbosity GetVerbosityValue(const G4String &)
G4int ApplyCommand(const char *aCommand)
void PrintAvailableColours(Verbosity) const
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandReviewKeptEvents()
G4VisCommandReviewKeptEvents()
static G4bool ConvertToBool(const char *st)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithABool * fpCommand
void PrintAvailableUserVisActions(Verbosity) const
static std::vector< G4String > VerbosityGuidanceStrings
void SetVerboseLevel(G4int val)
G4Scene * GetCurrentScene() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int)
void SetNewValue(G4UIcommand *command, G4String newValue)
void PrintAvailableModels(Verbosity) const
virtual ~G4VisCommandDrawOnlyToBeKeptEvents()
static G4VVisManager * GetConcreteInstance()
G4UIsession * GetSession() const
G4String GetCurrentValue(G4UIcommand *command)
void PrintAvailableGraphicsSystems(Verbosity) const
virtual ~G4VisCommandList()
G4UIcmdWithABool * fpCommand
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
void SetNewValue(G4UIcommand *command, G4String newValue)
G4bool GetRefreshAtEndOfEvent() const
virtual void PauseSessionStart(const G4String &Prompt)
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4VisCommandDrawOnlyToBeKeptEvents()
G4UIcmdWithABool * fpCommand
G4VViewer * GetCurrentViewer() const
void SetAbortReviewKeptEvents(G4bool)
virtual ~G4VisCommandInitialize()
void SetRequestedEvent(const G4Event *)
virtual ~G4VisCommandAbortReviewKeptEvents()
G4VisCommandAbortReviewKeptEvents()
G4String GetCurrentValue(G4UIcommand *command)
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static Verbosity GetVerbosity()
G4bool GetDrawEventOnlyIfToBeKept() const
const std::map< G4String, G4AttDef > * GetAttDefs() const
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
void SetRefreshAtEndOfEvent(G4bool)
G4UIcmdWithoutParameter * fpCommand
G4GLOB_DLL std::ostream G4cerr
G4UIcmdWithAString * fpCommand
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4bool IsMultithreadedApplication()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4int GetVerboseLevel() const
const std::vector< const G4Event * > * GetEventVector() const
G4GLOB_DLL std::ostream G4cout
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4UIcmdWithAString * fpCommand
G4UIcmdWithoutParameter * fpCommand1
virtual ~G4VisCommandEnable()
static G4VisManager * fpVisManager
static G4String VerbosityString(Verbosity)