CbmRoot
Loading...
Searching...
No Matches
cbm::algo::HistogramSender Class Reference

#include <HistogramSender.h>

Collaboration diagram for cbm::algo::HistogramSender:
[legend]

Public Member Functions

 HistogramSender (std::string_view address, int32_t hwm=1, bool compression=false)
 
template<typename Object >
void PrepareAndSendMsg (const Object &obj, zmq::send_flags flags)
 Serialize object and send it to the histogram server.
 

Private Attributes

std::string fHistComChan = "tcp://127.0.0.1:56800"
 
int32_t fHistHighWaterMark = 1
 
bool fbCompression = false
 
zmq::context_t fZmqContext
 ZMQ context FIXME: should be only one context per binary!
 
zmq::socket_t fZmqSocket
 ZMQ socket to histogram server.
 

Detailed Description

Definition at line 25 of file HistogramSender.h.

Constructor & Destructor Documentation

◆ HistogramSender()

cbm::algo::HistogramSender::HistogramSender ( std::string_view address,
int32_t hwm = 1,
bool compression = false )
inline

Definition at line 27 of file HistogramSender.h.

References fHistComChan, fHistHighWaterMark, and fZmqSocket.

Member Function Documentation

◆ PrepareAndSendMsg()

template<typename Object >
void cbm::algo::HistogramSender::PrepareAndSendMsg ( const Object & obj,
zmq::send_flags flags )
inline

Serialize object and send it to the histogram server.

Parameters
objobject to be serialized in the message, e.g. config pairs of strings or QaData
flagsor'ed values from zmq::send_flags, typ. zmq::send_flags::sndmore to indicate multi-parts message

Needed ressources (serializd string, boost inserter, boost stream, boost binary output archive)

FIXME: read return value to catch EAGAIN indicating a failed emission, use it outside to skip histo reset

Definition at line 43 of file HistogramSender.h.

References fbCompression, and fZmqSocket.

Member Data Documentation

◆ fbCompression

bool cbm::algo::HistogramSender::fbCompression = false
private

Definition at line 82 of file HistogramSender.h.

Referenced by PrepareAndSendMsg().

◆ fHistComChan

std::string cbm::algo::HistogramSender::fHistComChan = "tcp://127.0.0.1:56800"
private

Definition at line 80 of file HistogramSender.h.

Referenced by HistogramSender().

◆ fHistHighWaterMark

int32_t cbm::algo::HistogramSender::fHistHighWaterMark = 1
private

Definition at line 81 of file HistogramSender.h.

Referenced by HistogramSender().

◆ fZmqContext

zmq::context_t cbm::algo::HistogramSender::fZmqContext
private

ZMQ context FIXME: should be only one context per binary!

Definition at line 83 of file HistogramSender.h.

◆ fZmqSocket

zmq::socket_t cbm::algo::HistogramSender::fZmqSocket
private

ZMQ socket to histogram server.

Definition at line 84 of file HistogramSender.h.

Referenced by HistogramSender(), and PrepareAndSendMsg().


The documentation for this class was generated from the following file: