302{
305 "\"/vis/reviewKeptEvents\" not allowed within an already started review."
306 "\n No action taken."
308 return;
309 }
310
313
316 const std::vector<const G4Event*>* events =
318 size_t nKeptEvents = events ? events->size() : 0;
319
320 if (!nKeptEvents) {
323 "ERROR: G4VisCommandReviewKeptEvents::SetNewValue: No kept events,"
324 "\n or kept events not accessible."
326 }
327 return;
328 }
329
331 if (!viewer) {
334 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
336 }
337 return;
338 }
339
341 if (!pScene) {
343 G4warn <<
"ERROR: No current scene. Please create one." <<
G4endl;
344 }
345 return;
346 }
347
352 newVerbose = 2;
354
357
358
360
361
365 if (macroFileName.empty()) {
366
367
369 for (size_t i = 0; i < nKeptEvents; ++i) {
370 const G4Event*
event = (*events)[i];
372 G4warn <<
"Drawing event : " <<
event->GetEventID() <<
373 ". At EndOfEvent, enter any command, then \"cont[inue]\"..."
375 static G4bool first =
true;
376 if (first) {
377 first = false;
379 " Useful commands might be:"
380 "\n \"/vis/scene/add/trajectories\" if not already added."
381 "\n \"/vis/viewer/...\" to change the view (zoom, set/viewpoint,...)."
382 "\n \"/vis/ogl/export\" to get hard copy."
383 "\n \"/vis/open\" to get alternative viewer."
384 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort."
386 }
387 }
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
406 session->PauseSessionStart(
"EndOfEvent");
409 }
411
412 } else {
413
414
415 for (size_t i = 0; i < nKeptEvents; ++i) {
416 const G4Event*
event = (*events)[i];
418 G4warn <<
"Drawing event : " <<
event->GetEventID()
419 <<
" with macro file \"" << macroFileName <<
G4endl;
420 }
422 UImanager->
ApplyCommand(
"/control/execute " + macroFileName);
424 }
425 }
428
432}
static G4RunManager * GetMasterRunManager()
const G4Run * GetCurrentRun() const
std::vector< const G4Event * > * GetEventVector() const
G4bool GetRefreshAtEndOfEvent() const
void SetRefreshAtEndOfEvent(G4bool)
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
G4UIsession * GetSession() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
static G4VisManager * fpVisManager
static G4VVisManager * GetConcreteInstance()
G4Scene * GetCurrentScene() const
G4bool GetAbortReviewKeptEvents() const
void SetAbortReviewKeptEvents(G4bool)
G4VViewer * GetCurrentViewer() const
void SetRequestedEvent(const G4Event *)
void SetReviewingKeptEvents(G4bool)
static Verbosity GetVerbosity()
G4bool GetReviewingKeptEvents() const