Skip to content

Make LArPileUpTool reentrant

Walter Lampl requested to merge wlampl/athena:LArPUTool_reenantrant1 into main

This MR tries to make the LArPileUpTool reentrant, while maintaining backward compatibility. This implies a const-version of the processAllSubEvents-method. Reentrancy is obtained by storing all per-event data in a struct that is passed through the call-chain (used to be data-members or the AlgTool). The non-const version of processAllSubEvents needs to be maintained for now to satisfy the IPileUpTool interface. It calls to the const version.

To achieve backward compatibility, there is some code-duplication between prepareEvent() and processAllSubEvents(). If these methods are both called, the per-event initialization happens twice which is somewhat wasteful.

cc @bstanisl, @tlari

Merge request reports