8#ifndef Belle2_SharedEventBuffer_h
9#define Belle2_SharedEventBuffer_h
11#include "daq/slc/system/SharedMemory.h"
12#include "daq/slc/system/MMutex.h"
13#include "daq/slc/system/MCond.h"
28 unsigned int count_in;
29 unsigned int count_out;
30 unsigned long long nword_in;
31 unsigned long long nword_out;
32 unsigned short nwriter;
33 unsigned short nreader;
44 if (m_buf != NULL) m_memory.close();
48 size_t size() throw();
49 bool open(const
std::
string& nodename,
50 size_t nword,
bool recreate = false);
55 bool unlock() throw();
57 bool wait(
int time) throw();
58 bool notify() throw();
60 bool isOpened() {
return m_memory.isOpened(); }
63 const std::string getPath()
const throw() {
return m_path; }
64 Header* getHeader() throw() {
return m_header; }
65 int* getBuffer() throw() {
return m_buf; }
66 bool isWritable(
int nword)
throw();
67 bool isReadable(
int nword)
throw();
68 unsigned int write(
const int* buf,
unsigned int nword,
69 bool fouce,
unsigned int serial = 0)
71 return write(buf, nword, fouce, serial,
false);
73 unsigned int write(
const int* buf,
unsigned int nword,
74 bool fouce,
unsigned int serial,
bool unlocked);
75 unsigned int read(
int* buf,
bool fouce,
bool unlocked, Header* hdr = NULL);
79 SharedMemory m_memory;
Abstract base class for different kinds of events.