10#include <daq/hbasf2/connections/ZMQHistogramConnection.h>
11#include <daq/hbasf2/utils/HistogramMapping.h>
13#include <framework/pcore/zmq/messages/ZMQIdMessage.h>
15#include <framework/pcore/EvtMessage.h>
17#include <TBufferJSON.h>
54 template<
class AConnectionClass>
58 template<
class... Args>
83 template<
class AConnectionClass>
84 template<
class... Args>
87 maximalUncompressedBufferSize)
91 AConnectionClass::log(
"uncompressed_size", 0.0);
92 AConnectionClass::log(
"stored_identities", 0l);
93 AConnectionClass::log(
"histogram_clears", 0l);
94 AConnectionClass::log(
"last_clear",
"");
Add the common functionality to the histogram output classes.
std::optional< int > m_storedRun
std::vector< char > m_uncompressedBuffer
unsigned int m_maximalUncompressedBufferSize
std::optional< int > m_storedExperiment
void handleEvent(std::unique_ptr< ZMQIdMessage > message)
Handle a new message to be "sent" (what this means is up to the base class) as described above.
std::map< std::string, HistogramMapping > m_storedMessages
void clear()
Forward a clear call to the base class and clear the stored messages. Should be called on run start.
void mergeAndSend(EMessageTypes messageType=EMessageTypes::c_eventMessage)
Forward a merge call to the base class handing over the stored messages.
ZMQHistogramOutput(unsigned int maximalUncompressedBufferSize, Args &&... args)
Perfectly forward the given arguments to the base class initializer (and init the buffer size)
EMessageTypes
Type the messages can have.
Abstract base class for different kinds of events.