Belle II Software  release-06-02-00
ZMQTxWorkerModule.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #pragma once
9 
10 #include <framework/core/Module.h>
11 
12 #include <framework/pcore/zmq/sockets/ZMQClient.h>
13 #include <framework/pcore/zmq/utils/StreamHelper.h>
14 
15 
16 namespace Belle2 {
25  class ZMQTxWorkerModule : public Module {
26  public:
30  void event() override;
32  void terminate() override;
33 
34  private:
36  bool m_firstEvent = true;
37 
39  std::string m_param_socketName;
48 
53  };
55 }
Base class for Modules.
Definition: Module.h:72
Helper class for data store serialization.
Definition: StreamHelper.h:23
A helper class for communicating over ZMQ. Includes a multicast and (if needed) also a data socket.
Definition: ZMQClient.h:22
Module connecting the worker path with the output path on the worker side.
int m_param_compressionLevel
Parameter: Compression level of the streamer.
bool m_firstEvent
Set to false if the objects are initialized.
std::string m_param_socketName
Parameter: name of the data socket.
StreamHelper m_streamer
The data store streamer.
ZMQTxWorkerModule()
Constructor setting the moudle paramters.
ZMQClient m_zmqClient
Our ZMQ client.
void event() override
Pack the datastore and stream it.
void terminate() override
Terminate the client and tell the monitor, we are done.
std::string m_param_xpubProxySocketName
Parameter: name of the pub multicast socket.
bool m_param_handleMergeable
Parameter: Can we handle mergeables?
std::string m_param_xsubProxySocketName
Parameter: name of the sub multicast socket.
Abstract base class for different kinds of events.