Belle II Software development
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
29namespace Belle2 {
34
36 public:
38 RawRevRb2Sock(std::string rbuf, int port, std::string shmname, int id);
39 ~RawRevRb2Sock(void);
41 RawRevRb2Sock(const RawRevRb2Sock&) = delete;
42
45
47 int SendEvent(void);
48
50 int Reconnect(void);
51
52 private:
53 RingBuffer* m_rbuf;
54 RSocketSend* m_sock;
55 RFFlowStat* m_flow;
56 int* m_evtbuf;
57
58 };
59
61}
int SendEvent(void)
Event function.
RawRevRb2Sock(const RawRevRb2Sock &)=delete
Copy constructor (disabled).
int Reconnect(void)
Reconnect.
RawRevRb2Sock & operator=(const RawRevRb2Sock &)=delete
Operator = (disabled).
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.