 |
Belle II Software
release-05-01-25
|
12 #include <daq/hbasf2/apps/ZMQApp.h>
13 #include <framework/pcore/zmq/connections/ZMQConfirmedConnection.h>
14 #include <framework/pcore/zmq/connections/ZMQLoadBalancedConnection.h>
15 #include <framework/pcore/zmq/connections/ZMQRawConnection.h>
16 #include <daq/hbasf2/connections/ZMQROIConnection.h>
18 #include <boost/program_options.hpp>
20 namespace po = boost::program_options;
34 class ZMQCollector :
public ZMQStandardApp<ZMQConfirmedInput, ZMQLoadBalancedOutput> {
39 void addOptions(po::options_description& desc) final;
69 void addOptions(po::options_description& desc)
final;
94 void addOptions(po::options_description& desc) final;
124 void addOptions(po::options_description& desc) final;
149 void addOptions(po::options_description& desc)
final;
163 std::string m_dataOutputAddress;
165 std::string m_roiOutputAddress;
void handleExternalSignal(EMessageTypes type) final
Send a stop message on stop or clear the counters on start from the monitoring connection.
std::string m_inputAddress
Parameter: input address.
bool m_lax
Parameter: Do not wait for a ready worker if set to true, but dismiss the incoming event.
EMessageTypes
Type the messages can have.
Generic base class for all standalone ZMQ applications.
Final collector app: receive messages on the input reacting with a confirmation message and sends the...
std::string m_outputAddress
Parameter: output address.
void initialize() final
Initialize the two connections using the command line arguments.
Special collector app for translating between ZMQ and raw connections: send ready messages (like a ty...
void addOptions(po::options_description &desc) final
Add the parameters to the cmd line arguments.
Abstract base class for different kinds of events.
void handleTimeout() final
When a timeout is set (= we are waiting for all messages after a stop), send a stop message once we h...
Special collector app: receive messages on the input reacting with a confirmation message and sends t...
unsigned int m_stopWaitingTime
Parameter: how long to wait after no events come anymore.
Helper connection hosting both a normal raw and a ROI output and sending to both at the same time.
Output connection to speak to non-zmq sockets via a ZMQ_STREAM socket.
Special form of the ZMQFinalCollector for sending out the additional data message to a ROI receiver.
virtual void fillMonitoringJSON(std::stringstream &buffer) const
Using the connections, fill up a buffer with the content to be monitored.
void handleInput() final
Pass the message from the input connection to the output connection (if there is a message)