Example of within-event macro file with /run/beamOn?

Does anyone have an example of how to write and use a macro file that is called from within the event loop? The documentation for /run/beamOn says

Command /run/beamOn

Guidance :
Start a Run.
If G4 kernel is not initialized, it will be initialized. Default number of events to be processed is 1. The second and third arguments can be used for executing a macro file at the end of each event. If the second argument, i.e. name of the macro file, is given but the third argument is not, the macro file will be executed for all of the event.

I did not find any further explanation for the second argument in the App Guide, nor are there any examples in the G4 10.06.p02 distribution which make use of this feature (using grep /run/beamOn on every .mac file in the examples/ directory tree).

If anyone has made use of this, I’d love to hear more. Is the event number available as an alias, for instance? If aliases are modified within the macro, are the new values preserved across events? Are the new values available back in the main macro when the run finishes?