| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

SequentialSchedulerSvc.h
Go to the documentation of this file.
1 #ifndef GAUDIHIVE_SEQUENTIALSCHEDULERSVC_H
2 #define GAUDIHIVE_SEQUENTIALSCHEDULERSVC_H
3
4 // Framework include files
5 #include "GaudiKernel/IScheduler.h"
6 #include "GaudiKernel/IRunable.h"
7 #include "GaudiKernel/Service.h"
8 #include "GaudiKernel/IAlgResourcePool.h"
9
10 // C++ include files
11 #include <vector>
12 #include <string>
13 #include <unordered_map>
14 #include <functional>
15 #include <thread>
16
17 // External libs
18 #include "tbb/concurrent_queue.h"
19
20
21 //---------------------------------------------------------------------------
22
36 class SequentialSchedulerSvc: public extends<Service,
37 IScheduler> {
38 public:
40 SequentialSchedulerSvc( const std::string& name, ISvcLocator* svc );
41
43 ~SequentialSchedulerSvc();
44
46 virtual StatusCode initialize();
47
49 virtual StatusCode finalize();
50
52 virtual StatusCode pushNewEvent(EventContext* eventContext);
53
54 // Make multiple events available to the scheduler
55 virtual StatusCode pushNewEvents(std::vector<EventContext*>& eventContexts);
56
58 virtual StatusCode popFinishedEvent(EventContext*& eventContext);
59
61 virtual StatusCode tryPopFinishedEvent(EventContext*& eventContext);
62
64 virtual unsigned int freeSlots();
65
66
67 private:
68
70 bool m_useTopAlgList;
71
73 std::list<IAlgorithm*> m_algList;
74
76 EventContext* m_eventContext;
77
79 int m_freeSlots;
80
81 };
82
83 #endif // GAUDIHIVE_SEQUENTIALSCHEDULERSVC_H
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
SequentialSchedulerSvc::m_algList
std::list< IAlgorithm * > m_algList
Cache the list of algs to be executed.
Definition: SequentialSchedulerSvc.h:73
IRunable.h
IAlgResourcePool.h
SequentialSchedulerSvc::tryPopFinishedEvent
virtual StatusCode tryPopFinishedEvent(EventContext *&eventContext)
Try to fetch an event from the scheduler.
Definition: SequentialSchedulerSvc.cpp:165
SequentialSchedulerSvc::pushNewEvents
virtual StatusCode pushNewEvents(std::vector< EventContext * > &eventContexts)
Definition: SequentialSchedulerSvc.cpp:143
IScheduler.h
SequentialSchedulerSvc::finalize
virtual StatusCode finalize()
Finalise.
Definition: SequentialSchedulerSvc.cpp:57
SequentialSchedulerSvc::freeSlots
virtual unsigned int freeSlots()
Get free slots number.
Definition: SequentialSchedulerSvc.cpp:173
EventContext
This class represents an entry point to all the event specific data.
Definition: EventContext.h:25
std::string
STL class.
Service.h
SequentialSchedulerSvc::SequentialSchedulerSvc
SequentialSchedulerSvc(const std::string &name, ISvcLocator *svc)
Constructor.
Definition: SequentialSchedulerSvc.cpp:23
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
SequentialSchedulerSvc::~SequentialSchedulerSvc
~SequentialSchedulerSvc()
Destructor.
Definition: SequentialSchedulerSvc.cpp:31
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::list< IAlgorithm * >
SequentialSchedulerSvc::pushNewEvent
virtual StatusCode pushNewEvent(EventContext *eventContext)
Make an event available to the scheduler.
Definition: SequentialSchedulerSvc.cpp:69
SequentialSchedulerSvc::m_freeSlots
int m_freeSlots
The number of free slots (0 or 1)
Definition: SequentialSchedulerSvc.h:79
SequentialSchedulerSvc::initialize
virtual StatusCode initialize()
Initialise.
Definition: SequentialSchedulerSvc.cpp:34
std::vector< EventContext * >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
SequentialSchedulerSvc::popFinishedEvent
virtual StatusCode popFinishedEvent(EventContext *&eventContext)
Blocks until an event is availble.
Definition: SequentialSchedulerSvc.cpp:154
SequentialSchedulerSvc::m_useTopAlgList
bool m_useTopAlgList
Decide if the top alglist or its flat version has to be used.
Definition: SequentialSchedulerSvc.h:70
SequentialSchedulerSvc
This SchedulerSvc implements the IScheduler interface.
Definition: SequentialSchedulerSvc.h:36
SequentialSchedulerSvc::m_eventContext
EventContext * m_eventContext
The context of the event being processed.
Definition: SequentialSchedulerSvc.h:76