11 #ifndef GAUDIHIVE_ALGRESOURCEPOOL_H 12 #define GAUDIHIVE_ALGRESOURCEPOOL_H 25 #include <string_view> 29 #include "boost/dynamic_bitset.hpp" 30 #include "tbb/concurrent_queue.h" 43 using extends::extends;
85 this,
"TopAlg", {},
"Names of the algorithms to be passed to the algorithm manager"};
87 "Override the un-clonability of algorithms. Use with caution!"};
105 #endif // GAUDIHIVE_ALGRESOURCEPOOL_H ListAlg m_flatUniqueAlgList
The flat list of algorithms w/o clones.
StatusCode releaseResource(std::string_view name) override
Release a certain resource.
Implementation of property with value of concrete type.
StatusCode acquireAlgorithm(std::string_view name, IAlgorithm *&algo, bool blocking=false) override
Acquire a certain algorithm using its name.
std::map< std::string_view, unsigned int > m_resource_indices
std::mutex m_resource_mutex
std::list< SmartIF< IAlgorithm > > ListAlg
StatusCode stop() override
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
state_type m_available_resources
Gaudi::Property< bool > m_overrideUnClonable
StatusCode acquireResource(std::string_view name) override
Acquire a certain resource.
boost::dynamic_bitset state_type
const std::string & name() const override
Retrieve name of the service.
tbb::concurrent_bounded_queue< IAlgorithm * > concurrentQueueIAlgPtr
std::list< IAlgorithm * > m_flatUniqueAlgPtrList
The flat list of algorithms w/o clones which is returned.
This class is used for returning status codes from appropriate routines.
std::map< size_t, state_type > m_resource_requirements
StatusCode start() override
~AlgResourcePool() override
std::list< IAlgorithm * > m_topAlgPtrList
The top list of algorithms.
std::list< IAlgorithm * > getFlatAlgList() override
Gaudi::Property< std::vector< std::string > > m_topAlgNames
std::list< IAlgorithm * > getTopAlgList() override
The IAlgorithm is the interface implemented by the Algorithm base class.
std::map< size_t, concurrentQueueIAlgPtr * > m_algqueue_map
StatusCode decodeTopAlgs()
Decode the top Algorithm list.
StatusCode flattenSequencer(Gaudi::Algorithm *sequencer, ListAlg &alglist, unsigned int recursionDepth=0)
Recursively flatten an algList.
Base class used to extend a class implementing other interfaces.
Base class from which all concrete algorithm classes should be derived.
std::map< size_t, unsigned int > m_n_of_created_instances
StatusCode initialize() override
ListAlg m_topAlgList
The list of top algorithms.
StatusCode releaseAlgorithm(std::string_view name, IAlgorithm *&algo) override
Release a certain algorithm.
std::map< size_t, size_t > m_n_of_allowed_instances
ListAlg m_algList
The list of all algorithms created within the Pool which are not top.
Gaudi::Property< bool > m_lazyCreation