#include <G4VisCommandsScene.hh>
Definition at line 78 of file G4VisCommandsScene.hh.
G4VisCommandSceneEndOfEventAction::G4VisCommandSceneEndOfEventAction |
( |
| ) |
|
Definition at line 253 of file G4VisCommandsScene.cc.
255 fpCommand =
new G4UIcommand (
"/vis/scene/endOfEventAction",
this);
256 fpCommand -> SetGuidance
257 (
"Accumulate or refresh the viewer for each new event.");
258 fpCommand -> SetGuidance
259 (
"\"accumulate\": viewer accumulates hits, etc., event by event, or");
260 fpCommand -> SetGuidance
261 (
"\"refresh\": viewer shows them at end of event or, for direct-screen"
262 "\n viewers, refreshes the screen just before drawing the next event.");
264 parameter =
new G4UIparameter (
"action",
's', omitable =
true);
265 parameter -> SetParameterCandidates (
"accumulate refresh");
266 parameter -> SetDefaultValue (
"refresh");
267 fpCommand -> SetParameter (parameter);
268 parameter =
new G4UIparameter (
"maxNumber",
'i', omitable =
true);
269 parameter -> SetDefaultValue (100);
270 parameter -> SetGuidance
271 (
"Maximum number of events kept. Unlimited if negative.");
272 fpCommand -> SetParameter (parameter);
G4VisCommandSceneEndOfEventAction::~G4VisCommandSceneEndOfEventAction |
( |
| ) |
|
|
virtual |
Reimplemented from G4UImessenger.
Definition at line 283 of file G4VisCommandsScene.cc.
References G4VisManager::confirmations, G4VisManager::errors, G4VVisCommand::fpVisManager, G4cout, G4endl, G4RunManager::GetCurrentRun(), G4VisManager::GetCurrentScene(), G4VisManager::GetCurrentSceneHandler(), G4Run::GetEventVector(), G4Scene::GetRefreshAtEndOfEvent(), G4Scene::GetRefreshAtEndOfRun(), G4RunManager::GetRunManager(), G4VisManager::GetVerbosity(), G4VisManager::ResetTransientsDrawnFlags(), G4VSceneHandler::SetMarkForClearingTransientStore(), G4Scene::SetMaxNumberOfKeptEvents(), G4Scene::SetRefreshAtEndOfEvent(), and G4VisManager::warnings.
289 G4int maxNumberOfKeptEvents;
290 std::istringstream is (newValue);
291 is >> action >> maxNumberOfKeptEvents;
296 G4cout <<
"ERROR: No current scene. Please create one." <<
G4endl;
302 if (!pSceneHandler) {
304 G4cout <<
"ERROR: No current sceneHandler. Please create one." <<
G4endl;
309 if (action ==
"accumulate") {
313 else if (action ==
"refresh") {
317 "ERROR: Cannot refresh events unless runs refresh too."
318 "\n Use \"/vis/scene/endOfRun refresh\"."
330 "ERROR: unrecognised parameter \"" << action <<
"\"."
340 size_t nCurrentlyKept = 0;
345 const std::vector<const G4Event*>* events =
347 if (events) nCurrentlyKept = events->size();
352 G4cout <<
"End of event action set to ";
355 G4cout <<
"\"accumulate\"."
356 "\n Maximum number of events to be kept: "
357 << maxNumberOfKeptEvents
358 <<
" (unlimited if negative)."
359 "\n This may be changed with, e.g., "
360 "\"/vis/scene/endOfEventAction accumulate 1000\".";
366 maxNumberOfKeptEvents != 0 &&
369 if (nCurrentlyKept) {
371 "\n There are currently " << nCurrentlyKept
372 <<
" events kept for refreshing and/or reviewing.";
374 G4cout <<
"The vis manager will keep ";
375 if (maxNumberOfKeptEvents < 0)
G4cout <<
"an unlimited number of";
376 else G4cout <<
"up to " << maxNumberOfKeptEvents;
378 if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
380 "\n This may use a lot of memory."
381 "\n It may be changed with, e.g., "
382 "\"/vis/scene/endOfEventAction accumulate 10\".";
const std::vector< const G4Event * > * GetEventVector() const
G4bool GetRefreshAtEndOfEvent() const
const G4Run * GetCurrentRun() const
G4GLOB_DLL std::ostream G4cout
void SetMaxNumberOfKeptEvents(G4int)
G4bool GetRefreshAtEndOfRun() const
void ResetTransientsDrawnFlags()
static G4RunManager * GetRunManager()
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
void SetMarkForClearingTransientStore(G4bool)
G4Scene * GetCurrentScene() const
void SetRefreshAtEndOfEvent(G4bool)
static G4VisManager * fpVisManager
The documentation for this class was generated from the following files: