use g4exprparser to add convenient --print and --plot options, for instance:
sb_xxx_sim --print="step.pre.ekin/meV:step,trk.is_primary where trk.is_neutron and step.volname=='Sample'"
To get on-the-fly lines printed from the simulation for neutrons stepping through volumes named Sample of two variables: kinetic energy in meV and a number indication that the particle is primary (1) or secondary (0).
We could also extract .shist files in this manner!