 |
Belle II Software
release-05-02-19
|
12 #include <framework/core/Module.h>
13 #include <framework/core/EventProcessor.h>
14 #include <framework/core/Path.h>
15 #include <framework/pcore/ProcessMonitor.h>
25 class ZMQEventProcessor :
public EventProcessor {
Class to monitor all started framework processes (input, workers, output), kill them if requested and...
ProcessMonitor m_processMonitor
Instance of the process monitor.
void runInput(const PathPtr &inputPath, const ModulePtrList &terminateGlobally, long maxEvent)
Fork out the input process.
void forkAndRun(long maxEvent, const PathPtr &inputPath, const PathPtr &mainPath, const PathPtr &outputPath, const ModulePtrList &terminateGlobally)
Second step in the process: fork out the processes we need to have and call the event loop.
void runMonitoring(const PathPtr &inputPath, const PathPtr &mainPath, const ModulePtrList &terminateGlobally, long maxEvent)
Start the monitoring (without forking)
Abstract base class for different kinds of events.
void process(const PathPtr &spath, long maxEvent)
Processes the full module chain using parallel processing, starting with the first module in the give...
std::list< ModulePtr > ModulePtrList
Defines a std::list of shared module pointers.
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
void cleanup()
clean up IPC resources (should only be called in one process).
void initialize(const ModulePtrList &moduleList, const ModulePtr &histogramManager)
First step in the process: init the module in the list.
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
void processPath(const PathPtr &localPath, const ModulePtrList &terminateGlobally, long maxEvent)
Basic function run in every process: process the event loop of the given path.
void runWorker(unsigned int numProcesses, const PathPtr &inputPath, const PathPtr &mainPath, const ModulePtrList &terminateGlobally, long maxEvent)
Fork out the N worker process.
virtual ~ZMQEventProcessor()
Make sure we remove all sockets cleanly.
void terminateAndCleanup(const ModulePtr &histogramManager)
Last step in the process: run the termination and cleanup (kill all remaining processes)
ZMQEventProcessor()
Init the socket cleaning at exit.
void runOutput(const PathPtr &outputPath, const ModulePtrList &terminateGlobally, long maxEvent)
Fork out the output process.