Skip to content

Add re-entrant Algorithm support to Gaudi

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) and bool Algorithm::isReEntrant()

    • execute_r only gets called for re-entrant algs
  • base class ReEntAlgorithm that inherits from Algorithm. User Algorithms will inherit from this.

    • this provides StatusCode sysExecute_r(const EventContext&) const which calls Algorithm::execute_r(const EventContext& const)
  • 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 AlgExecMgr that keeps track of the execution state of each algorithm, its return code, and the filterPassed bit. it also keeps track of the overall status of the event in each slot

  • the AlgResourcePool needs to create only one instance of any re-entrant algorithm

  • the AlgoExecutionTask needs to call the appropriate execute/execute_r depending on the type of Algorithm

Merge request reports