Introduce Possibility to Abort Event
Up till now, any exception e.g. thrown in Geant4 would be a ModuleError
exception that ends the run without calling even finalize()
. To be a bit more graceful but also more flexible, I suggest introducing a AbortEventException
that stops processing the current event, to mark it as complete and to move on.
The effect is that no modules further down the simulation chain are called. I still have to ensure that this also works in the way e.g. the ROOTObjectWriter currently works and we don't get hickups. But since everything is parallel already
This also would allow us to define our own (per-module) criteria for aborting events, (cc)-ing @hwennlof for ideas such as very large energy depositions that might cause OOM down the line.