Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ophBuffer.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file ophBuffer.h
1
#ifndef __OPHBUFFER_H
2
#define __OPHBUFFER_H
3
4
#include "
event_io.h
"
5
6
#include "
phenixTypes.h
"
7
#include "
oBuffer.h
"
8
#include "
oEvent.h
"
9
#include "
Event.h
"
10
11
12
class
ophBuffer
:
public
oBuffer
{
13
14
public
:
15
16
//** Constructors
17
18
// ophBuffer( FILE *fpp, PHDWORD * , const int length
19
// , const int iseq = 1, const int irun=1);
20
21
ophBuffer
() {};
22
23
ophBuffer
(
int
fd
,
PHDWORD
* where,
const
int
length
,
24
const
int
irun=1 ,
const
int
iseq=0 );
25
26
ophBuffer
(
const
char
*
filename
,
PHDWORD
* where,
const
int
length
,
27
int
&
status
,
28
const
int
irun=1 ,
const
int
iseq=0 );
29
30
31
~ophBuffer
();
32
33
// this creates a new event on the next address
34
int
nextEvent
(
const
unsigned
int
evtsize,
const
int
etype =0,
const
int
evtseq =0);
35
36
37
// frame and packet adding
38
39
int
addRawEvent
(
unsigned
int
*);
40
41
int
addEvent
(
Event
*);
42
43
int
addFrame
(
PHDWORD
*);
44
45
int
addPacket
(
const
Packet
*
p
);
46
47
int
addUnstructPacketData
(
PHDWORD
*
data
,
48
const
int
length
,
49
const
int
id
,
50
const
int
wordsize,
51
const
int
hitformat);
52
53
int
writeout
();
54
55
// now the re-sizing of buffer
56
int
setMaxSize
(
const
int
size
);
57
58
// and the query
59
int
getMaxSize
()
const
;
60
61
// and the query`
62
unsigned
long
long
getBytesWritten
()
const
;
63
64
int
addEoB
();
65
66
67
protected
:
68
69
int
prepare_next
();
70
71
72
buffer_ptr
bptr
;
73
buffer_ptr
bptr_being_written
;
74
75
buffer_ptr
bptr0
;
76
buffer_ptr
bptr1
;
77
PHDWORD
*
data_ptr
;
78
int
current_index
;
79
int
max_length
;
80
int
max_size
;
81
unsigned
int
left
;
82
int
sequence
;
83
int
runnumber
;
84
unsigned
long
long
byteswritten
;
85
oEvent
*
current_event
;
86
int
eventsequence
;
87
int
current_etype
;
88
int
has_end
;
89
int
dirty
;
90
int
fd
;
91
int
our_fd
;
92
int
good_object
;
93
94
95
};
96
97
#endif
98
online_distribution
blob
master
newbasic
ophBuffer.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration