Belle II Software  release-06-02-00
RawRevRb2Sock.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 <stdio.h>
10 #include <stdlib.h>
11 #include <unistd.h>
12 #include <netdb.h>
13 #include <sys/socket.h>
14 #include <netinet/in.h>
15 #include <arpa/inet.h>
16 #include <signal.h>
17 #include <sys/time.h>
18 
19 #include <vector>
20 #include <string>
21 
22 #include "framework/pcore/RingBuffer.h"
23 #include "daq/dataflow/REvtSocket.h"
24 #include "daq/rfarm/manager/RFFlowStat.h"
25 
26 #define RBUFSIZE 100000000
27 
28 namespace Belle2 {
34  class RawRevRb2Sock {
35  public:
37  RawRevRb2Sock(std::string rbuf, int port, std::string shmname, int id);
38  ~RawRevRb2Sock(void);
39 
41  int SendEvent(void);
42 
44  int Reconnect(void);
45 
46  private:
47  RingBuffer* m_rbuf;
48  RSocketSend* m_sock;
49  RFFlowStat* m_flow;
50  int* m_evtbuf;
51 
52  };
53 
55 }
int SendEvent(void)
Event function.
int Reconnect(void)
Reconnect.
RawRevRb2Sock(std::string rbuf, int port, std::string shmname, int id)
Constuctor and Destructor.
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition: RingBuffer.h:39
Abstract base class for different kinds of events.