![]() |
The Gaudi Framework
v27r0
|
This SchedulerSvc implements the IScheduler interface. More...
#include <src/ParallelSequentialSchedulerSvc.h>


Public Member Functions | |
| ParallelSequentialSchedulerSvc (const std::string &name, ISvcLocator *svc) | |
| Constructor. More... | |
| ~ParallelSequentialSchedulerSvc () | |
| Destructor. More... | |
| virtual StatusCode | initialize () |
| Initialise. More... | |
| virtual StatusCode | finalize () |
| Finalise. More... | |
| virtual StatusCode | pushNewEvent (EventContext *eventContext) |
| Make an event available to the scheduler. More... | |
| virtual StatusCode | pushNewEvents (std::vector< EventContext * > &eventContexts) |
| virtual StatusCode | popFinishedEvent (EventContext *&eventContext) |
| Blocks until an event is availble. More... | |
| virtual StatusCode | tryPopFinishedEvent (EventContext *&eventContext) |
| Try to fetch an event from the scheduler. More... | |
| virtual unsigned int | freeSlots () |
| Get free slots number. More... | |
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 Attributes | |
| bool | m_useTopAlgList |
| Decide if the top alglist or its flat version has to be used. More... | |
| std::list< IAlgorithm * > | m_algList |
| Cache the list of algs to be executed. More... | |
| tbb::concurrent_bounded_queue< EventContext * > | m_finishedEvents |
| Queue of finished events. More... | |
| std::atomic_int | m_freeSlots |
| Atomic to account for asyncronous updates by the scheduler wrt the rest. More... | |
| SmartIF< IHiveWhiteBoard > | m_whiteboard |
| A shortcut to the whiteboard. More... | |
| std::string | m_whiteboardSvcName |
| The whiteboard name. More... | |
| SmartIF< IAlgResourcePool > | m_algResourcePool |
| Cache for the algorithm resource pool. More... | |
| int | m_threadPoolSize |
| Size of the threadpool initialised by TBB; a value of -1 gives TBB the freedom to choose. More... | |
| std::unique_ptr< tbb::task_scheduler_init > | m_tbb_sched |
| concurrency::ExecutionFlowManager | m_controlFlow |
| std::vector< std::string > | m_algname_vect |
| Vector to bookkeep the information necessary to the index2name conversion. More... | |
| std::unordered_map< std::string, unsigned int > | m_algname_index_map |
| Map to bookkeep the information necessary to the name2index conversion. More... | |
| std::vector< std::vector< std::string > > | m_algosDependencies |
| Ugly, will disappear when the deps are declared only within the C++ code of the algos. More... | |
Friends | |
| class | SequentialTask |
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... | |
This SchedulerSvc implements the IScheduler interface.
It executes all the algorithms in sequence for several events in flight. It pulls the algorithms from the AlgResourcePool
Definition at line 41 of file ParallelSequentialSchedulerSvc.h.
| ParallelSequentialSchedulerSvc::ParallelSequentialSchedulerSvc | ( | const std::string & | name, |
| ISvcLocator * | svc | ||
| ) |
Constructor.
Definition at line 27 of file ParallelSequentialSchedulerSvc.cpp.
| ParallelSequentialSchedulerSvc::~ParallelSequentialSchedulerSvc | ( | ) |
|
virtual |
Finalise.
Definition at line 147 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Get free slots number.
Given that the scheduler is sequential and its methods non reentrant, this is always 1.
Definition at line 219 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Initialise.
Definition at line 42 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Blocks until an event is availble.
Get a finished event or block until one becomes available.
Definition at line 191 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Make an event available to the scheduler.
Immediately the algortihms are executed.
Definition at line 159 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Definition at line 166 of file ParallelSequentialSchedulerSvc.cpp.
|
virtual |
Try to fetch an event from the scheduler.
Try to get a finished event, if not available just return a failure.
Definition at line 204 of file ParallelSequentialSchedulerSvc.cpp.
|
friend |
Definition at line 114 of file ParallelSequentialSchedulerSvc.h.
|
private |
Cache the list of algs to be executed.
Definition at line 77 of file ParallelSequentialSchedulerSvc.h.
|
private |
Map to bookkeep the information necessary to the name2index conversion.
Definition at line 108 of file ParallelSequentialSchedulerSvc.h.
|
private |
Vector to bookkeep the information necessary to the index2name conversion.
Definition at line 105 of file ParallelSequentialSchedulerSvc.h.
|
private |
Ugly, will disappear when the deps are declared only within the C++ code of the algos.
Definition at line 111 of file ParallelSequentialSchedulerSvc.h.
|
private |
Cache for the algorithm resource pool.
Definition at line 93 of file ParallelSequentialSchedulerSvc.h.
|
private |
Definition at line 102 of file ParallelSequentialSchedulerSvc.h.
|
private |
Queue of finished events.
Definition at line 80 of file ParallelSequentialSchedulerSvc.h.
|
private |
Atomic to account for asyncronous updates by the scheduler wrt the rest.
Definition at line 84 of file ParallelSequentialSchedulerSvc.h.
|
private |
Definition at line 99 of file ParallelSequentialSchedulerSvc.h.
|
private |
Size of the threadpool initialised by TBB; a value of -1 gives TBB the freedom to choose.
Definition at line 96 of file ParallelSequentialSchedulerSvc.h.
|
private |
Decide if the top alglist or its flat version has to be used.
Definition at line 74 of file ParallelSequentialSchedulerSvc.h.
|
private |
A shortcut to the whiteboard.
Definition at line 87 of file ParallelSequentialSchedulerSvc.h.
|
private |
The whiteboard name.
Definition at line 90 of file ParallelSequentialSchedulerSvc.h.