FairRoot
FairRoot copied to clipboard
feat(sim): Allow branch registration in `FairGenerator`
Introduced new function FairMCApplication::InitFinalizer()
which initializes event generator, tasks, and triggers FairRootManager::WriteFolder()
function.
This new function is called from the latter of
InitGeometry()
and AddIons()
.
Previously the funcionality of InitFinalizer
was split between InitGeometry()
and AddIons()
, which caused problems because
TGeant3 calls AddIons()
first, InitGeometry()
second, TGeant4 calls InitGeometry()
first, AddIons()
second.
Current implementation assures that initialization of event generators and tasks come before WriteFolder
.
Fixes issues #1183 and #1567.
Checklist:
- [x] Followed the Contributing Guidelines