8#include <daq/hbasf2/apps/ZMQClasses.h>
9#include <framework/logging/Logger.h>
24 (
"input", boost::program_options::value<std::string>(&
m_inputAddress)->required(),
25 "where to read the events from")
27 "how many events to keep in the buffer");
41 (
"input", boost::program_options::value<std::string>(&
m_inputAddress)->required(),
42 "where to read the events from");
56 (
"input", boost::program_options::value<std::string>(&
m_inputAddress)->required(),
57 "where to read the events from")
58 (
"output", boost::program_options::value<std::string>(&
m_outputAddress)->required(),
59 "where to send the events to")
61 "how many events to keep in the buffer");
66 auto message =
m_input->handleIncomingData();
67 B2ASSERT(
"There should always be a message", message);
69 if (message->isMessage(EMessageTypes::c_terminateMessage)) {
73 m_output->handleEvent(std::move(message));
std::string m_inputAddress
Parameter: input address.
void initialize() final
Initialize the two connections using the command line arguments.
void addOptions(po::options_description &desc) final
Add the parameters to the cmd line arguments.
Output part of a confirmed connection.
Connection doing just nothing: without the capability to pull, send or receive. Useful for template i...
unsigned int m_bufferSize
Parameter: buffer size.
std::string m_inputAddress
Parameter: input address.
void initialize() final
Initialize the two connections using the command line arguments.
void addOptions(po::options_description &desc) final
Add the parameters to the cmd line arguments.
std::shared_ptr< ZMQParent > m_parent
Pointer to the ZMQParent to be used as base for all connections.
std::unique_ptr< ZMQNullConnection > m_output
Pointer to the output connection. Should be set in initialize.
bool m_terminate
Can be set by functions to terminate the main loop at the next possibility.
std::unique_ptr< ZMQLoadBalancedInput > m_input
Pointer to the input connection. Should be set in initialize.
unsigned int m_bufferSize
Parameter: buffer size.
std::string m_inputAddress
Parameter: input address.
void initialize() final
Initialize the two connections using the command line arguments.
void addOptions(po::options_description &desc) final
Add the parameters to the cmd line arguments.
std::string m_outputAddress
Parameter: output address.
void handleInput() final
Transport the message from the input to the output connection.
virtual void initialize()
Override in a derived class to initialize the connections from the given command line arguments....
virtual void addOptions(po::options_description &desc)
Override in a derived class to add the command line arguments. Do not forget to call this base functi...
Abstract base class for different kinds of events.