diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h index 30cd0bda763df884b7b72ce0db17818e65230b1a..e66e532e93f4e7bc4c465feb3a82fa7dbe812912 100644 --- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h +++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h @@ -169,6 +169,22 @@ class AthReentrantAlgorithm virtual StatusCode execute_r (const EventContext& ctx) const = 0; #endif + + /** Specify if the algorithm is clonable + * + * Reentrant algorithms are clonable. + */ + virtual bool isClonable() const override; + + + /** Cardinality (Maximum number of clones that can exist) + * special value 0 means that algorithm is reentrant + * + * Override this to return 0 for reentrant algorithms. + */ + virtual unsigned int cardinality() const override; + + private: // to keep track of VarHandleKeyArrays for data dep registration diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx index 2446a1305487c0faddf5e8b0e5fb11e988199b0d..73bccbd4488ac70a39f6aef0d07ffafb0aabf652 100644 --- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx +++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx @@ -150,6 +150,25 @@ StatusCode AthReentrantAlgorithm::execute() #endif +/** Specify if the algorithm is clonable + */ +bool AthReentrantAlgorithm::isClonable() const +{ + // Reentrant algorithms are clonable. + return true; +} + +/** Cardinality (Maximum number of clones that can exist) + * special value 0 means that algorithm is reentrant + * + * Override this to return 0 for reentrant algorithms. + */ +unsigned int AthReentrantAlgorithm::cardinality() const +{ + return 0; +} + + /** * @brief Perform system initialization for an algorithm. *