275{
278 "\"/vis/reviewKeptEvents\" not allowed within an already started review."
279 "\n No action taken."
281 return;
282 }
283
286
289 const std::vector<const G4Event*>* events =
291 size_t nKeptEvents = events ? events->size() : 0;
292
293 if (!nKeptEvents) {
296 "ERROR: G4VisCommandReviewKeptEvents::SetNewValue: No kept events,"
297 "\n or kept events not accessible."
299 }
300 return;
301 }
302
304 if (!viewer) {
307 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
309 }
310 return;
311 }
312
314 if (!pScene) {
316 G4cerr <<
"ERROR: No current scene. Please create one." <<
G4endl;
317 }
318 return;
319 }
320
325 newVerbose = 2;
327
330
331
333
334
338 if (macroFileName.empty()) {
339
340
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;
349 if (first) {
350 first = false;
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/oglx/printEPS\" to get hard copy."
356 "\n \"/vis/open\" to get alternative viewer."
357 "\n \"/vis/abortReviewKeptEvents\", then \"cont[inue]\", to abort."
359 }
360 }
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
382 }
384
385 } else {
386
387
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;
393 }
395 UImanager->
ApplyCommand(
"/control/execute " + macroFileName);
397 }
398 }
401
405}
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
static G4RunManager * GetMasterRunManager()
const G4Run * GetCurrentRun() const
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)
virtual void PauseSessionStart(const G4String &Prompt)
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