14#include "framework/pcore/SeqFile.h"
15#include "framework/pcore/RingBuffer.h"
17#define RBUFSIZE 100000000
18#define MAXEVTSIZE 400000000
23int main(
int argc,
char** argv)
26 printf(
"file2rb : rbufname filename neof\n");
31 if (file->status() <= 0) {
39 char* evbuf =
new char[MAXEVTSIZE];
42 int is = file->read(evbuf, MAXEVTSIZE);
43 if (is <= 0) exit(-1);
46 int isN = file->read(evbuf, MAXEVTSIZE);
48 if (isN > MAXEVTSIZE) {
49 printf(
"Event size too large : %d\n", isN);
55 int irb = rbuf->
insq((
int*)evbuf, (isN - 1) / 4 + 1);
Class to manage a Ring Buffer placed in an IPC shared memory.
void dump_db()
Print some info on the RingBufInfo structure.
int insq(const int *buf, int size, bool checkTx=false)
Append a buffer to the RingBuffer.
A class to manage I/O for a chain of blocked files.
Abstract base class for different kinds of events.