Belle II Software
release-05-02-19
RawRevRb2Sock.h
1
//+
2
// File : Rb2Sock.h
3
// Description : Pick an event from RingBuffer and send it to EvtSocket
4
//
5
// Author : Ryosuke Itoh, IPNS, KEK
6
// Date : 10 - Dec - 2002, Orignal for RFARM
7
// 26 - Apr - 2012, for Belle II RFARM
8
//-
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
}
Belle2::RFFlowStat
Definition:
RFFlowStat.h:28
Belle2::RingBuffer
Class to manage a Ring Buffer placed in an IPC shared memory.
Definition:
RingBuffer.h:36
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::RSocketSend
Definition:
RSocketLib.h:25
Belle2::RawRevRb2Sock::RawRevRb2Sock
RawRevRb2Sock(std::string rbuf, int port, std::string shmname, int id)
Constuctor and Destructor.
Definition:
RawRevRb2Sock.cc:15
Belle2::RawRevRb2Sock::Reconnect
int Reconnect(void)
Reconnect.
Definition:
RawRevRb2Sock.cc:48
Belle2::RawRevRb2Sock::SendEvent
int SendEvent(void)
Event function.
Definition:
RawRevRb2Sock.cc:32
Belle2::RawRevRb2Sock
Definition:
RawRevRb2Sock.h:35
daq
rfarm
event
include
RawRevRb2Sock.h
Generated on Tue Jan 4 2022 02:53:52 for Belle II Software by
1.8.17