Belle II Software development
Sock2Rb.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/EvtSocket.h"
14
15#define RBUFSIZE 100000000
16
17namespace Belle2 {
22
23 class Sock2Rb {
24 public:
26 Sock2Rb(const std::string& rbuf, int port);
27 ~Sock2Rb(void);
29 Sock2Rb(const Sock2Rb&) = delete;
30
32 Sock2Rb& operator=(const Sock2Rb&) = delete;
33
35 int ReceiveEvent(void);
36
37 private:
38 RingBuffer* m_rbuf;
39 EvtSocketRecv* m_sock;
40 char* m_evtbuf;
41
42 };
43
45}
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition RingBuffer.h:39
int ReceiveEvent(void)
Event function.
Definition Sock2Rb.cc:31
Sock2Rb(const Sock2Rb &)=delete
Copy constructor (disabled).
Sock2Rb & operator=(const Sock2Rb &)=delete
Operator = (disabled).
Sock2Rb(const std::string &rbuf, int port)
Constuctor and Destructor.
Definition Sock2Rb.cc:16
Abstract base class for different kinds of events.