Skip to content

WIP: ReEntrantAlgorithms

Charles Leggett requested to merge leggett/Gaudi:dev/ReEntAlg_3 into master

Provides mechanism to declare and run re-entrant Algorithms, where only a single instance of the Algorithm is created, but can be used concurrently in different Events.

Common functionality of Algorithms is moved to the Gaudi::AlgorithmBase class. Both non-re-entrant and re-entrant Algorithms inherit from this class. Non-re-entrant Algorithms are now Gaudi::LegacyAlgorithms, but are aliased to Algorithm in GaudiKernel/Algorithm.h. This may be changed at a future time. Re-entrant Algorithms are now Gaudi::ReEntAlgorithm from GaudiKernel/ReEntAlgorithm.h.

Re-entrant Algorithms should implement the method StatusCode execute_R(const EventContext&) const and must not implement StatusCode execute(). The opposite is true for non-re-entrant (Legacy) Algorithms.

A new method bool isReEntrant() is also provided to simplify testing the type of Algorithm.

Re-entrant Algorithms are created by default with Cardinality == 0. If desired, this can be overriden at configuration time, and multiple instances of the Algorithm will be created by the AlgResourcePool.

Edited by Marco Clemencic

Merge request reports

Loading