MarlinMT  0.1.0
IScheduler.h
Go to the documentation of this file.
1 #ifndef MARLINMT_ISCHEDULER_h
2 #define MARLINMT_ISCHEDULER_h 1
3 
4 // -- std headers
5 #include <memory>
6 #include <vector>
7 
8 // -- marlinmt headers
9 #include <marlinmt/Component.h>
10 
11 namespace marlinmt {
12 
13  class Application ;
14  class EventStore ;
15  class RunHeader ;
16 
23  class IScheduler :public Component {
24  public:
26  IScheduler() ;
27 
28  virtual ~IScheduler() = default ;
29 
34  virtual void initialize() override ;
35 
40  virtual void end() = 0 ;
41 
47  virtual void processRunHeader( std::shared_ptr<RunHeader> rhdr ) = 0 ;
48 
54  virtual void pushEvent( std::shared_ptr<EventStore> event ) = 0 ;
55 
61  virtual void popFinishedEvents( std::vector<std::shared_ptr<EventStore>> &events ) = 0 ;
62 
66  virtual std::size_t freeSlots() const = 0 ;
67  };
68 
69 } // end namespace marlinmt
70 
71 #endif
IScheduler()
Constructor.
Definition: IScheduler.cc:8
IScheduler interface Interface for implementing a scheduling algorithm for event processing.
Definition: IScheduler.h:23
virtual void initialize() override
Initialize the scheduler.
Definition: IScheduler.cc:15
virtual void processRunHeader(std::shared_ptr< RunHeader > rhdr)=0
Process a run header.
virtual void pushEvent(std::shared_ptr< EventStore > event)=0
Push a new event to the scheduler for processing.
virtual void end()=0
Terminate the scheduler activites Cleanup memory, etc ...
Component class.
Definition: Component.h:22
virtual void popFinishedEvents(std::vector< std::shared_ptr< EventStore >> &events)=0
Retrieve finished events from the scheduler.
virtual std::size_t freeSlots() const =0
Get the number of free event slots.
virtual ~IScheduler()=default