Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
v
w
x
z
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
GitLab
LXR
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Trigger
TrigAccel
TrigAccelEvent
TrigAccelEvent
DataExportBuffer.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TRIGACCELEVENT_DATAEXPORTBUFFER_H
6
#define TRIGACCELEVENT_DATAEXPORTBUFFER_H
7
8
9
#include <string>
10
#include <fstream>
11
12
namespace
TrigAccel
{
13
14
typedef
struct
DataExportBuffer
{
15
public
:
16
DataExportBuffer
() :
m_size
(0),
m_buffer
(0) {};
17
DataExportBuffer
(
size_t
s
) :
m_size
(
s
) {
18
m_buffer
=
new
char
[
s
];
19
}
20
~DataExportBuffer
() {
delete
[]
m_buffer
;}
21
22
// no copy/assign
23
DataExportBuffer
(
const
DataExportBuffer
&) =
delete
;
24
DataExportBuffer
&
operator=
(
const
DataExportBuffer
&) =
delete
;
25
26
inline
bool
fit
(
size_t
s
) {
27
return
s
<=
m_size
;
28
}
29
30
void
reallocate
(
size_t
s
) {
31
delete
[]
m_buffer
;
32
m_buffer
=
new
char
[
s
];
33
m_size
=
s
;
34
}
35
36
void
save
(
const
std::string&
name
)
const
{
37
std::ofstream binFile(
name
, std::ios::binary);
38
binFile.write(
m_buffer
,
m_size
);
39
binFile.close();
40
}
41
42
size_t
load
(
const
std::string&
name
) {
43
std::ifstream binFile(
name
, std::ios::binary);
44
if
(!binFile) {
45
return
0;
46
}
47
binFile.seekg(0, binFile.end);
48
size_t
fileSize = binFile.tellg();
49
binFile.seekg (0, binFile.beg);
50
reallocate
(fileSize);
51
binFile.read(
m_buffer
,
m_size
);
52
binFile.close();
53
return
fileSize;
54
}
55
56
size_t
m_size
;
57
char
*
m_buffer
;
58
}
DATA_EXPORT_BUFFER
;
59
}
60
61
#endif
TrigAccel::DataExportBuffer
Definition:
DataExportBuffer.h:14
TrigAccel::DataExportBuffer::fit
bool fit(size_t s)
Definition:
DataExportBuffer.h:26
TrigAccel::DATA_EXPORT_BUFFER
struct TrigAccel::DataExportBuffer DATA_EXPORT_BUFFER
TrigAccel::DataExportBuffer::operator=
DataExportBuffer & operator=(const DataExportBuffer &)=delete
TrigAccel::DataExportBuffer::reallocate
void reallocate(size_t s)
Definition:
DataExportBuffer.h:30
TrigAccel::DataExportBuffer::m_size
size_t m_size
Definition:
DataExportBuffer.h:56
TrigAccel::DataExportBuffer::DataExportBuffer
DataExportBuffer(const DataExportBuffer &)=delete
TrigAccel::DataExportBuffer::DataExportBuffer
DataExportBuffer(size_t s)
Definition:
DataExportBuffer.h:17
TrigAccel::DataExportBuffer::load
size_t load(const std::string &name)
Definition:
DataExportBuffer.h:42
TrigAccel::DataExportBuffer::~DataExportBuffer
~DataExportBuffer()
Definition:
DataExportBuffer.h:20
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:240
TrigAccel::DataExportBuffer::m_buffer
char * m_buffer
Definition:
DataExportBuffer.h:57
TrigAccel::DataExportBuffer::DataExportBuffer
DataExportBuffer()
Definition:
DataExportBuffer.h:16
python.SystemOfUnits.s
float s
Definition:
SystemOfUnits.py:146
TrigAccel
Definition:
DataExportBuffer.h:12
TrigAccel::DataExportBuffer::save
void save(const std::string &name) const
Definition:
DataExportBuffer.h:36
Generated on Fri May 9 2025 21:08:29 for ATLAS Offline Software by
1.8.18