292 G4int maxNumberOfKeptEvents;
293 std::istringstream is (newValue);
294 is >> action >> maxNumberOfKeptEvents;
299 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
305 if (!pSceneHandler) {
307 G4cerr <<
"ERROR: No current sceneHandler. Please create one." <<
G4endl;
312 if (action ==
"accumulate") {
316 else if (action ==
"refresh") {
320 "ERROR: Cannot refresh events unless runs refresh too." 321 "\n Use \"/vis/scene/endOfRun refresh\"." 333 "ERROR: unrecognised parameter \"" << action <<
"\"." 343 size_t nCurrentlyKept = 0;
345 #ifdef G4MULTITHREADED 352 const std::vector<const G4Event*>* events =
354 if (events) nCurrentlyKept = events->size();
359 G4cout <<
"End of event action set to ";
362 G4cout <<
"\"accumulate\"." 363 "\n Maximum number of events to be kept: " 364 << maxNumberOfKeptEvents
365 <<
" (unlimited if negative)." 366 "\n This may be changed with, e.g., " 367 "\"/vis/scene/endOfEventAction accumulate 1000\".";
373 maxNumberOfKeptEvents != 0 &&
376 if (nCurrentlyKept) {
378 "\n There are currently " << nCurrentlyKept
379 <<
" events kept for refreshing and/or reviewing.";
381 G4cout <<
"The vis manager will keep ";
382 if (maxNumberOfKeptEvents < 0)
G4cout <<
"an unlimited number of";
383 else G4cout <<
"up to " << maxNumberOfKeptEvents;
385 if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
387 "\n This may use a lot of memory." 388 "\n It may be changed with, e.g., " 389 "\"/vis/scene/endOfEventAction accumulate 10\".";
G4Scene * GetCurrentScene() const
G4bool GetRefreshAtEndOfEvent() const
G4VSceneHandler * GetCurrentSceneHandler() const
G4GLOB_DLL std::ostream G4cout
void SetMaxNumberOfKeptEvents(G4int)
static G4MTRunManager * GetMasterRunManager()
void ResetTransientsDrawnFlags()
const G4Run * GetCurrentRun() const
G4bool IsMultithreadedApplication()
static G4RunManager * GetRunManager()
G4bool GetRefreshAtEndOfRun() const
static Verbosity GetVerbosity()
void SetMarkForClearingTransientStore(G4bool)
void SetRefreshAtEndOfEvent(G4bool)
G4GLOB_DLL std::ostream G4cerr
const std::vector< const G4Event * > * GetEventVector() const
static G4VisManager * fpVisManager