Belle II Software  release-06-01-15
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 
9 #include <string>
10 
11 #include "framework/pcore/RingBuffer.h"
12 #include "daq/dataflow/RSocketLib.h"
13 #include "daq/rfarm/manager/RFFlowStat.h"
14 
15 #define MAXBUFSIZE 20000000
16 #define RBUFSIZE 100000000
17 
19 public:
21  RawRevSock2Rb(std::string rbuf, std::string src, int port, std::string shmname, int id);
22  ~RawRevSock2Rb(void);
23 
25  int ReceiveEvent(void);
26 
28  int Reconnect(int ntry);
29 
30 private:
31  Belle2::RingBuffer* m_rbuf;
32  Belle2::RSocketRecv* m_sock;
33  Belle2::RFFlowStat* m_flow;
34  char* m_evtbuf;
35  int* m_buf;
36 
37 };
38 
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
RawRevSock2Rb(std::string rbuf, std::string src, int port, std::string shmname, int id)
Constuctor and Destructor.
int ReceiveEvent(void)
Event function.
int Reconnect(int ntry)
Reconnect.