[WIP] enabling re-entrant Algorithms
I've marked this WIP, but it's fully functional, though I haven't tested all corners of phase space. I will still add something to GaudiExamples
In order to allow re-entrant Algorithms to be used in Gaudi, where only one instance of the Algorithm is instantiated, but can be executed concurrently in multiple threads, a number of modifications need to be made:
- add
StatusCode Algorithm::execute_R(const EventContext& const)andboot Algorithm::isReEntrant()- execute_R only gets called for re-entrant algs
- base class
ReEntAlgorithmthat inherits from Algorithm. User Algorithms will inherit from this.- this provides
StatusCode sysExecute_R(const EventContext&) constwhich callsAlgorithm::execute_R(const EventContext& const)
- this provides
- several bits of status information and flags are kept in the Algorithm and EventContext. This won't work, and we need to move them elsewhere.
- create a new service
AlgExecMgrthat keeps track of the execution state of each algorithm, it's return code, and the filterPassed bit. it also keeps track of the overall status of the event in each slot
- create a new service
- the
AlgResourcePoolneeds to create only one instance of any re-entrant algorithm - the
AlgoExecutionTaskneeds to call the appropriate execute/execute_R depending on the type of Algorithm