Go to the documentation of this file.
20 #include <boost/dynamic_bitset.hpp>
25 #include <string_view>
26 #include <tbb/concurrent_queue.h>
27 #include <unordered_map>
41 using extends::extends;
89 this,
"TopAlg", {},
"Names of the algorithms to be passed to the algorithm manager" };
91 "Override the un-clonability of algorithms. Use with caution!" };
93 this,
"CountAlgorithmInstanceMisses",
false,
94 "Count and print out algorithm instance misses. Useful for finding ways to improve throughput scalability." };
~AlgResourcePool() override
StatusCode initialize() override
std::list< SmartIF< IAlgorithm > > ListAlg
Gaudi::Property< bool > m_countAlgInstMisses
state_type m_available_resources
StatusCode releaseResource(std::string_view name) override
Release a certain resource.
ListAlg m_algList
The list of all algorithms created within the Pool which are not top.
ListAlg m_flatUniqueAlgList
The flat list of algorithms w/o clones.
boost::dynamic_bitset state_type
std::list< IAlgorithm * > m_flatUniqueAlgPtrList
The flat list of algorithms w/o clones which is returned.
std::map< size_t, unsigned int > m_n_of_created_instances
StatusCode finalize() override
std::map< size_t, state_type > m_resource_requirements
const std::string & name() const override
Retrieve name of the service
std::map< std::string_view, unsigned int > m_resource_indices
Base class from which all concrete algorithm classes should be derived.
StatusCode stop() override
void dumpInstanceMisses() const
Dump recorded Algorithm instance misses.
StatusCode decodeTopAlgs()
Decode the top Algorithm list.
tbb::concurrent_bounded_queue< IAlgorithm * > concurrentQueueIAlgPtr
Gaudi::Property< bool > m_overrideUnClonable
Base class used to extend a class implementing other interfaces.
std::map< size_t, size_t > m_n_of_allowed_instances
StatusCode start() override
std::unordered_map< std::string_view, unsigned int > m_algInstanceMisses
Counters for Algorithm instance misses.
Gaudi::Property< bool > m_lazyCreation
StatusCode acquireResource(std::string_view name) override
Acquire a certain resource.
Gaudi::Property< std::vector< std::string > > m_topAlgNames
StatusCode flattenSequencer(Gaudi::Algorithm *sequencer, ListAlg &alglist, unsigned int recursionDepth=0)
Recursively flatten an algList.
std::map< size_t, concurrentQueueIAlgPtr * > m_algqueue_map
StatusCode acquireAlgorithm(std::string_view name, IAlgorithm *&algo, bool blocking=false) override
Acquire a certain algorithm using its name.
std::list< IAlgorithm * > getFlatAlgList() override
std::mutex m_resource_mutex
StatusCode releaseAlgorithm(std::string_view name, IAlgorithm *&algo) override
Release a certain algorithm.
std::list< IAlgorithm * > m_topAlgPtrList
The top list of algorithms.
ListAlg m_topAlgList
The list of top algorithms.
std::list< IAlgorithm * > getTopAlgList() override