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
oBuffer.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file oBuffer.h
1
#ifndef __OBUFFER_H
2
#define __OBUFFER_H
3
4
#include "
phenixTypes.h
"
5
#include "
Event.h
"
6
7
8
class
oBuffer
{
9
10
public
:
11
12
13
oBuffer
();
14
15
/* oBuffer (int fd, PHDWORD * where, const int length, */
16
/* const int irun=1 , const int iseq=0 ); */
17
18
19
/* oBuffer (const char *filename, PHDWORD * where, const int length, */
20
/* int &status, */
21
/* const int irun=1 , const int iseq=0 ); */
22
23
24
virtual
~oBuffer
();
25
26
// this creates a new event on the next address
27
virtual
int
nextEvent
(
const
unsigned
int
evtsize,
const
int
etype =0,
const
int
evtseq =0) = 0;
28
29
30
// frame and packet adding
31
32
virtual
int
addRawEvent
(
unsigned
int
*) =0;
33
34
virtual
int
addEvent
(
Event
*) = 0;
35
36
// we have this here since not all subclasses have this
37
virtual
int
addFrame
(
PHDWORD
*) {
return
0;};
38
39
virtual
int
addPacket
(
const
Packet
*
p
) = 0;
40
41
virtual
int
addUnstructPacketData
(
PHDWORD
*
data
,
42
const
int
length
,
43
const
int
id
,
44
const
int
wordsize,
45
const
int
hitformat) = 0;
46
47
virtual
int
writeout
() = 0;
48
49
// now the re-sizing of buffer
50
virtual
int
setMaxSize
(
const
int
size
) = 0;
51
52
virtual
int
getMaxSize
()
const
=0 ;
53
54
virtual
unsigned
long
long
getBytesWritten
()
const
= 0;
55
56
virtual
int
addEoB
() = 0;
57
58
59
protected
:
60
61
// virtual int prepare_next();
62
63
typedef
struct
64
{
65
unsigned
int
Length
;
66
int
ID
;
67
int
Bufseq
;
68
int
Runnr
;
69
PHDWORD
data
[1];
70
} *
buffer_ptr
;
71
72
73
};
74
75
#endif
76
online_distribution
blob
master
newbasic
oBuffer.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration