CbmRoot
|
#include <HistogramSender.h>
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. | |
Definition at line 25 of file HistogramSender.h.
|
inline |
Definition at line 27 of file HistogramSender.h.
References fHistComChan, fHistHighWaterMark, and fZmqSocket.
|
inline |
Serialize object and send it to the histogram server.
obj | object to be serialized in the message, e.g. config pairs of strings or QaData |
flags | or'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.
|
private |
Definition at line 82 of file HistogramSender.h.
Referenced by PrepareAndSendMsg().
|
private |
Definition at line 80 of file HistogramSender.h.
Referenced by HistogramSender().
|
private |
Definition at line 81 of file HistogramSender.h.
Referenced by HistogramSender().
|
private |
ZMQ context FIXME: should be only one context per binary!
Definition at line 83 of file HistogramSender.h.
|
private |
ZMQ socket to histogram server.
Definition at line 84 of file HistogramSender.h.
Referenced by HistogramSender(), and PrepareAndSendMsg().