Belle II Software  release-08-01-10
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 #pragma once
9 
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <unistd.h>
13 #include <netdb.h>
14 #include <sys/socket.h>
15 #include <netinet/in.h>
16 #include <arpa/inet.h>
17 #include <signal.h>
18 #include <sys/time.h>
19 
20 #include <vector>
21 #include <string>
22 
23 #include "framework/pcore/RingBuffer.h"
24 #include "daq/dataflow/REvtSocket.h"
25 #include "daq/rfarm/manager/RFFlowStat.h"
26 
27 #define RBUFSIZE 100000000
28 
29 namespace Belle2 {
35  class RawRevRb2Sock {
36  public:
38  RawRevRb2Sock(std::string rbuf, int port, std::string shmname, int id);
39  ~RawRevRb2Sock(void);
40 
42  int SendEvent(void);
43 
45  int Reconnect(void);
46 
47  private:
48  RingBuffer* m_rbuf;
49  RSocketSend* m_sock;
50  RFFlowStat* m_flow;
51  int* m_evtbuf;
52 
53  };
54 
56 }
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.