![]() |
The Gaudi Framework
v27r0
|
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface. More...
#include <GaudiHive/AlgResourcePool.h>


Public Member Functions | |
| AlgResourcePool (const std::string &name, ISvcLocator *svc) | |
| ~AlgResourcePool () | |
| virtual StatusCode | start () |
| virtual StatusCode | initialize () |
| virtual StatusCode | acquireAlgorithm (const std::string &name, IAlgorithm *&algo, bool blocking=false) |
| Acquire a certain algorithm using its name. More... | |
| virtual StatusCode | releaseAlgorithm (const std::string &name, IAlgorithm *&algo) |
| Release a certain algorithm. More... | |
| virtual StatusCode | acquireResource (const std::string &name) |
| Acquire a certain resource. More... | |
| virtual StatusCode | releaseResource (const std::string &name) |
| Release a certrain resource. More... | |
| virtual std::list< IAlgorithm * > | getFlatAlgList () |
| virtual std::list< IAlgorithm * > | getTopAlgList () |
| virtual StatusCode | beginRun () |
| virtual StatusCode | endRun () |
| virtual StatusCode | stop () |
| virtual concurrency::ExecutionFlowGraph * | getExecutionFlowGraph () const |
Public Member Functions inherited from extends< BASE, Interfaces > | |
| void * | i_cast (const InterfaceID &tid) const override |
| Implementation of IInterface::i_cast. More... | |
| StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
| Implementation of IInterface::queryInterface. More... | |
| std::vector< std::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. More... | |
| ~extends () override=default | |
| Virtual destructor. More... | |
| void * | i_cast (const InterfaceID &tid) const override |
| Implementation of IInterface::i_cast. More... | |
| StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
| Implementation of IInterface::queryInterface. More... | |
| std::vector< std::string > | getInterfaceNames () const override |
| Implementation of IInterface::getInterfaceNames. More... | |
| ~extends () override=default | |
| Virtual destructor. More... | |
Public Member Functions inherited from extend_interfaces< Interfaces...> | |
| ~extend_interfaces () override=default | |
| Virtual destructor. More... | |
| ~extend_interfaces () override=default | |
| Virtual destructor. More... | |
Private Types | |
| typedef tbb::concurrent_bounded_queue< IAlgorithm * > | concurrentQueueIAlgPtr |
| typedef std::list< SmartIF< IAlgorithm > > | ListAlg |
| typedef boost::dynamic_bitset | state_type |
Private Member Functions | |
| StatusCode | decodeTopAlgs () |
| Decode the top alg list. More... | |
| StatusCode | flattenSequencer (Algorithm *sequencer, ListAlg &alglist, const std::string &parentName, unsigned int recursionDepth=0) |
| Recursively flatten an algList. More... | |
Private Attributes | |
| std::mutex | m_resource_mutex |
| bool | m_lazyCreation |
| state_type | m_available_resources |
| std::map< size_t, concurrentQueueIAlgPtr * > | m_algqueue_map |
| std::map< size_t, state_type > | m_resource_requirements |
| std::map< size_t, size_t > | m_n_of_allowed_instances |
| std::map< size_t, unsigned int > | m_n_of_created_instances |
| std::map< std::string, unsigned int > | m_resource_indices |
| StringArrayProperty | m_topAlgNames |
| The names of the algorithms to be passed to the algorithm manager. More... | |
| ListAlg | m_algList |
| The list of all algorithms created withing the Pool which are not top. More... | |
| ListAlg | m_topAlgList |
| The list of top algorithms. More... | |
| ListAlg | m_flatUniqueAlgList |
| The flat list of algorithms w/o clones. More... | |
| std::list< IAlgorithm * > | m_flatUniqueAlgPtrList |
| The flat list of algorithms w/o clones which is returned. More... | |
| std::list< IAlgorithm * > | m_topAlgPtrList |
| The top list of algorithms. More... | |
| concurrency::ExecutionFlowGraph * | m_EFGraph |
| OMG yet another hack. More... | |
Additional Inherited Members | |
Public Types inherited from extends< BASE, Interfaces > | |
| using | base_class = extends |
| Typedef to this class. More... | |
| using | extend_interfaces_base = extend_interfaces< Interfaces...> |
| Typedef to the base of this class. More... | |
| using | base_class = extends |
| Typedef to this class. More... | |
| using | extend_interfaces_base = extend_interfaces< Interfaces...> |
| Typedef to the base of this class. More... | |
Public Types inherited from extend_interfaces< Interfaces...> | |
| using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
| take union of the ext_iids of all Interfaces... More... | |
| using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type |
| take union of the ext_iids of all Interfaces... More... | |
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
It either creates all instances upfront or lazily. Internal bookkeeping is done via hashes of the algo names.
Definition at line 34 of file AlgResourcePool.h.
|
private |
Definition at line 63 of file AlgResourcePool.h.
|
private |
Definition at line 64 of file AlgResourcePool.h.
|
private |
Definition at line 65 of file AlgResourcePool.h.
| AlgResourcePool::AlgResourcePool | ( | const std::string & | name, |
| ISvcLocator * | svc | ||
| ) |
Definition at line 19 of file AlgResourcePool.cpp.
| AlgResourcePool::~AlgResourcePool | ( | ) |
Definition at line 29 of file AlgResourcePool.cpp.
|
virtual |
Acquire a certain algorithm using its name.
Definition at line 90 of file AlgResourcePool.cpp.
|
virtual |
Acquire a certain resource.
Definition at line 153 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 373 of file AlgResourcePool.cpp.
|
private |
Decode the top alg list.
Definition at line 221 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 393 of file AlgResourcePool.cpp.
|
private |
Recursively flatten an algList.
Definition at line 171 of file AlgResourcePool.cpp.
|
inlinevirtual |
Definition at line 60 of file AlgResourcePool.h.
|
virtual |
Definition at line 355 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 364 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 42 of file AlgResourcePool.cpp.
|
virtual |
Release a certain algorithm.
Definition at line 136 of file AlgResourcePool.cpp.
|
virtual |
Release a certrain resource.
Definition at line 162 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 72 of file AlgResourcePool.cpp.
|
virtual |
Definition at line 417 of file AlgResourcePool.cpp.
|
private |
The list of all algorithms created withing the Pool which are not top.
Definition at line 86 of file AlgResourcePool.h.
|
private |
Definition at line 70 of file AlgResourcePool.h.
|
private |
Definition at line 69 of file AlgResourcePool.h.
|
private |
OMG yet another hack.
Definition at line 101 of file AlgResourcePool.h.
|
private |
The flat list of algorithms w/o clones.
Definition at line 92 of file AlgResourcePool.h.
|
private |
The flat list of algorithms w/o clones which is returned.
Definition at line 95 of file AlgResourcePool.h.
|
private |
Definition at line 68 of file AlgResourcePool.h.
|
private |
Definition at line 72 of file AlgResourcePool.h.
|
private |
Definition at line 73 of file AlgResourcePool.h.
|
private |
Definition at line 74 of file AlgResourcePool.h.
|
private |
Definition at line 67 of file AlgResourcePool.h.
|
private |
Definition at line 71 of file AlgResourcePool.h.
|
private |
The list of top algorithms.
Definition at line 89 of file AlgResourcePool.h.
|
private |
The names of the algorithms to be passed to the algorithm manager.
Definition at line 83 of file AlgResourcePool.h.
|
private |
The top list of algorithms.
Definition at line 98 of file AlgResourcePool.h.