Event refreshing
Redrawing events on switching viewers, etc.
John Allison
University of Manchester

Persistent and transient objects
Persistent or run-duration objects can always be refreshed
Geometry, axes, scale…
Transient (end-of-event or user drawn) objects are lost on change of view or viewer
Trajectories, hits…
Except for simple change of view parameters for “stored” drivers
Spawned or off-line viewers (DAWNFILE, HepRep/WIRED)
Valuable but limited

(A) Re-issue /run/beamOn
Vis manager stores random number status
Start of last run and start of last event
Before primary event generation
/vis/scene/transientsAction rerun
When scene is reprocessed, re-issues /run/beamOn for last run or last event (depending on endOfEventAction)
Refreshes even after switch to a different driver
Cannot handle primary events from file (N04)
Relies on existence of G4RunManager
This method is currently available (8.1)

(B) Event copying
At end of event, vis manager
Copies events’ primary tracks and vertices
Stores random number status after primary event generation
Scene reprocessing
Reprocess event (eventManager->ProcessOneEvent)
Last run or last event (endOfEventAction)
Needs enhancement to G4Event, G4PrimaryTrack and G4PrimaryVertex
Not currently approved

(C) Keep events
Would be the simplest way
All information is there, including hits and trajectories
But events not available after end of run
Run manager deletes
G4RunManager manages multiple events (SetNumberOfEventsToBeStored)
Needs a reference counting scheme* for events so that run manager and vis manager can manage multiple events independently

(D) Some other way
Needs discussion

Currently available method (A) is limited
Cannot handle input of primary tracks and vertices from file
Relies on existence of G4RunManager
(B) and (C) need kernel enhancement
But decouples Vis and Run categories
(C) looks most attractive
Needs discussion