9#include "daq/rfarm/event/RevSock2Rb.h"
21 m_evtbuf =
new char[MAXEVTSIZE];
22 m_flow =
new RFFlowStat(
const_cast<char*
>(shmname.c_str()),
id, m_rbuf);
26RevSock2Rb::~RevSock2Rb(
void)
40 if (msg->
type() == MSG_TERMINATE) {
45 m_flow->log(msg->
size());
50 stat = m_rbuf->insq(
reinterpret_cast<int*
>(msg->
buffer()), msg->
paddedSize());
61 return (m_sock->sock())->reconnect(ntimes);
Class to manage streamed object.
int paddedSize() const
Same as size(), but as size of an integer array.
ERecordType type() const
Get record type.
char * buffer()
Get buffer address.
int size() const
Get size of message including headers.
int ReceiveEvent(void)
Event function.
RevSock2Rb(const std::string &rbuf, std::string src, int port, std::string shmname, int id)
Constuctor and Destructor.
int Reconnect(int ntry)
Reconnect.
Class to manage a Ring Buffer placed in an IPC shared memory.
Abstract base class for different kinds of events.