forked from sPHENIX-Collaboration/online_distribution
/
prdfBuffer.h
53 lines (39 loc) · 870 Bytes
/
prdfBuffer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __PRDFBUFFER_H
#define __PRDFBUFFER_H
#include "buffer.h"
#include "phenixTypes.h"
#include "BufferConstants.h"
#include "Event.h"
#ifndef __CINT__
class WINDOWSEXPORT prdfBuffer : public buffer {
#else
class prdfBuffer : public buffer {
#endif
public:
//** Constructors
prdfBuffer();
prdfBuffer( PHDWORD *array, const int length);
~prdfBuffer();
// this creates a new event on the next address
Event * getEvent();
int * getEventData();
int isGood() const { return is_good; } ;
int buffer_swap();
int frame_swap(PHDWORD * fp, const int eventlength);
protected:
typedef struct
{
unsigned int Length;
unsigned int ID;
int Bufseq;
int Runnr;
PHDWORD data[1];
} *buffer_ptr;
buffer_ptr bptr;
PHDWORD *data_ptr;
int buffer_size;
int max_length;
int current_index;
int is_good;
};
#endif