Belle II Software development
RawRevSock2Rb.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <string>
11
12#include "framework/pcore/RingBuffer.h"
13#include "daq/dataflow/RSocketLib.h"
14#include "daq/rfarm/manager/RFFlowStat.h"
15
16#define MAXBUFSIZE 20000000
17#define RBUFSIZE 100000000
18
20public:
22 RawRevSock2Rb(std::string rbuf, std::string src, int port, std::string shmname, int id);
23 ~RawRevSock2Rb(void);
24
26 int ReceiveEvent(void);
27
29 int Reconnect(int ntry);
30
31private:
32 Belle2::RingBuffer* m_rbuf;
33 Belle2::RSocketRecv* m_sock;
34 Belle2::RFFlowStat* m_flow;
35 char* m_evtbuf;
36 int* m_buf;
37
38};
39
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
int ReceiveEvent(void)
Event function.
int Reconnect(int ntry)
Reconnect.