Belle II Software light-2406-ragdoll
ZMQRxOutputModule.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#include <framework/datastore/StoreObjPtr.h>
12#include <framework/dataobjects/EventMetaData.h>
13#include <framework/core/RandomGenerator.h>
14#include <framework/pcore/zmq/sockets/ZMQClient.h>
15#include <framework/pcore/zmq/utils/StreamHelper.h>
16
17namespace Belle2 {
27 class ZMQRxOutputModule : public Module {
28 public:
32 void event() override;
34 void initialize() override;
36 void terminate() override;
37
38 private:
40 bool m_firstEvent = true;
41
44
46 std::string m_param_socketName;
55
60
65
70 };
72}
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
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 output 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.
ZMQRxOutputModule()
Constructor setting the moudle paramters.
void initialize() override
Initialize the streamer.
ZMQClient m_zmqClient
Our ZMQ client.
void event() override
Receive an event and store it in the datastore. Confirm to the input process.
void terminate() override
Terminate the client and tell the monitor, we are done.
unsigned int m_param_maximalWaitingTime
Maximal time to wait until aborting in ms.
StoreObjPtr< EventMetaData > m_eventMetaData
The event meta data in the data store needed for confirming events.
std::string m_param_xpubProxySocketName
Parameter: name of the pub multicast socket.
bool m_param_handleMergeable
Parameter: Can we handle mergeables?
StoreObjPtr< RandomGenerator > m_randomgenerator
The random generator in the data store.
std::string m_param_xsubProxySocketName
Parameter: name of the sub multicast socket.
int m_endRun
End Run counter.
int m_beginRun
Begin Run counter.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24