56 fpCommand -> SetGuidance(
"Abort review of kept events.");
57 fpCommand -> SetParameterName(
"abort", omitable=
true);
72 G4cout <<
"Type \"continue\" to complete the abort." <<
G4endl;
83 (
"DURING A RUN draw only those events that have been \"to be kept\" by the user"
84 "\nwith G4EventManager::GetEventManager()->KeepTheCurrentEvent() or"
85 "\nwith \"/event/keepCurrentEvent\".");
87 "To draw selected events the user should set this flag, then in a user action:"
88 "\n if ( some criterion ) {"
89 "\n G4EventManager::GetEventManager()->KeepTheCurrentEvent();"
91 fpCommand -> SetParameterName(
"draw", omitable=
true);
109 G4cout <<
"Only events that have been kept will be drawn." <<
G4endl;
122 fpCommand -> SetGuidance(
"Enables/disables visualization system.");
123 fpCommand -> SetParameterName(
"enabled", omitable=
true);
127 fpCommand1 -> SetGuidance(
"Disables visualization system.");
154 fpCommand -> SetGuidance(
"Initialise visualisation manager.");
173 fpCommand -> SetGuidance(
"Lists visualization parameters.");
174 fpCommand -> SetParameterName(
"verbosity", omitable=
true);
175 fpCommand -> SetDefaultValue(
"warnings");
190 G4String& verbosityString = newValue;
203 UImanager->
ApplyCommand(
"/vis/scene/list ! " + newValue);
204 UImanager->
ApplyCommand(
"/vis/viewer/list ! " + newValue);
207 "\nAttributes available for modeling and filtering with"
208 "\n \"/vis/modeling/trajectories/create/drawByAttribute\" and"
209 "\n \"/vis/filtering/trajectories/create/attributeFilter\" commands"
225 "\nGeometry attributes available for touchables by picking:\n";
231 "\nTo get more information, \"/vis/list all\" or use individual commands"
232 "\n such as (use \"ls\" or \"help\"):"
233 "\n /vis/scene/list all all"
234 "\n /vis/viewer/list all all"
235 "\n /vis/modeling/trajectories/list"
236 "\n /vis/filtering/trajectories/list"
247 fpCommand -> SetGuidance(
"Review kept events.");
249 (
"If a macro file is specified, it is executed for each event.");
251 "If a macro file is not specified, each event is drawn to the current"
252 "\nviewer. After each event, the session is paused. The user may issue"
253 "\nany allowed command. Then enter \"cont[inue]\" to continue to the next"
255 "\nUseful commands might be:"
256 "\n \"/vis/viewer/...\" to change the view (zoom, set/viewpoint,...)."
257 "\n \"/vis/ogl/export\" to get hard copy."
258 "\n \"/vis/open\" to get alternative viewer."
259 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort.");
260 fpCommand -> SetParameterName(
"macro-file-name", omitable=
true);
278 "\"/vis/reviewKeptEvents\" not allowed within an already started review."
279 "\n No action taken."
289 const std::vector<const G4Event*>* events =
290 run ?
run->GetEventVector() :
nullptr;
291 size_t nKeptEvents = events ? events->size() : 0;
296 "ERROR: G4VisCommandReviewKeptEvents::SetNewValue: No kept events,"
297 "\n or kept events not accessible."
307 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
316 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
338 if (macroFileName.empty()) {
342 for (
size_t i = 0; i < nKeptEvents; ++i) {
343 const G4Event*
event = (*events)[i];
345 G4cout <<
"Drawing event : " <<
event->GetEventID() <<
346 ". At EndOfEvent, enter any command, then \"cont[inue]\"..."
348 static G4bool first =
true;
352 " Useful commands might be:"
353 "\n \"/vis/scene/add/trajectories\" if not already added."
354 "\n \"/vis/viewer/...\" to change the view (zoom, set/viewpoint,...)."
355 "\n \"/vis/ogl/export\" to get hard copy."
356 "\n \"/vis/open\" to get alternative viewer."
357 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort."
379 session->PauseSessionStart(
"EndOfEvent");
388 for (
size_t i = 0; i < nKeptEvents; ++i) {
389 const G4Event*
event = (*events)[i];
391 G4cout <<
"Drawing event : " <<
event->GetEventID()
392 <<
" with macro file \"" << macroFileName <<
G4endl;
395 UImanager->
ApplyCommand(
"/control/execute " + macroFileName);
416 fpCommand -> SetParameterName(
"verbosity", omitable=
true);
417 fpCommand -> SetDefaultValue(
"warnings");
434 G4cout <<
"Visualization verbosity changed to "
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static G4RunManager * GetMasterRunManager()
const G4Run * GetCurrentRun() const
G4bool GetRefreshAtEndOfEvent() const
void SetRefreshAtEndOfEvent(G4bool)
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static G4bool ConvertToBool(const char *st)
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
G4UIsession * GetSession() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
static G4VisManager * fpVisManager
static G4VVisManager * GetConcreteInstance()
virtual ~G4VisCommandAbortReviewKeptEvents()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandAbortReviewKeptEvents()
G4UIcmdWithABool * fpCommand
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandDrawOnlyToBeKeptEvents()
G4UIcmdWithABool * fpCommand
G4VisCommandDrawOnlyToBeKeptEvents()
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandEnable()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithABool * fpCommand
G4UIcmdWithoutParameter * fpCommand1
virtual ~G4VisCommandInitialize()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithoutParameter * fpCommand
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandList()
G4UIcmdWithAString * fpCommand
G4UIcmdWithAString * fpCommand
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandReviewKeptEvents()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandReviewKeptEvents()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithAString * fpCommand
virtual ~G4VisCommandVerbose()
G4Scene * GetCurrentScene() const
void SetDrawEventOnlyIfToBeKept(G4bool)
void PrintAvailableModels(Verbosity) const
static std::vector< G4String > VerbosityGuidanceStrings
static G4String VerbosityString(Verbosity)
G4bool GetAbortReviewKeptEvents() const
void SetAbortReviewKeptEvents(G4bool)
G4VViewer * GetCurrentViewer() const
void SetRequestedEvent(const G4Event *)
G4bool GetDrawEventOnlyIfToBeKept() const
void PrintAvailableGraphicsSystems(Verbosity) const
void SetReviewingKeptEvents(G4bool)
static Verbosity GetVerbosity()
void PrintAvailableColours(Verbosity) const
void SetVerboseLevel(G4int)
void PrintAvailableUserVisActions(Verbosity) const
G4bool GetReviewingKeptEvents() const
static Verbosity GetVerbosityValue(const G4String &)