BOSS
7.1.1
BESIII Offline Software System
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
z
Typedefs
c
d
e
g
h
i
l
m
n
o
p
r
s
t
Enumerations
Enumerator
a
b
c
d
e
f
i
k
l
m
n
o
p
r
s
t
u
w
x
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
m
n
p
r
s
t
v
w
Enumerations
b
c
d
e
f
g
h
i
k
l
m
n
p
r
s
t
v
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Related Symbols
:
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
w
x
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
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
h
i
j
k
l
m
n
p
r
s
t
u
v
w
z
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
m
n
o
p
r
s
t
u
w
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
z
▼
BOSS
Used Packages
Requirements
►
How to use the ERS package
Todo List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
7.1.1
►
Analysis
►
BesCxxPolicy
►
BesExamples
►
BesPolicy
►
Calibration
►
Control
►
Database
►
DetectorDescription
▼
DistBoss
►
ClientErrHandler
►
DistBossServer
▼
DistBossUtil
▼
DistBossUtil-00-00-04
▼
DistBossUtil
►
template
►
AutoEnlargeBuffer.h
►
DimErrorMsg.h
►
DistBossCode.h
►
GetPropertyValue.h
►
PthrReaderBufPool.h
►
PthrWriterBufPool.h
►
NetDataReader
►
NetDataWriter
►
RootFile
►
DQA
►
Emc
►
Event
►
EventDisplay
►
EventFilter
►
EvtPreSelect
►
External
►
Generator
►
InstallArea
►
LumTauAlg
►
MagneticField
►
Mdc
►
Muc
►
OfflineEvtFilter
►
Reconstruction
►
RootPolicy
►
Simulation
►
Tof
►
Trigger
►
Utilities
►
Validation
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
AutoEnlargeBuffer.h
Go to the documentation of this file.
1
#ifndef AUTO_ENLARGE_BUFFER_H
2
#define AUTO_ENLARGE_BUFFER_H
3
4
#include <stdlib.h>
5
#include <string.h>
//for memcpy
6
7
class
AutoEnlargeBuffer
8
{
9
public :
10
11
inline
AutoEnlargeBuffer
(
int
size
= 128*1024);
12
13
inline
~AutoEnlargeBuffer
();
14
15
inline
void
copy
(
void
*src,
int
size
);
16
17
inline
int
size
() {
return
m_size; }
18
inline
void
*
data
() {
return
m_buffer; }
19
20
21
private
:
22
23
int
m_SIZE;
24
int
m_size;
25
void
* m_buffer;
26
};
7
class
AutoEnlargeBuffer
{
…
};
27
28
inline
AutoEnlargeBuffer::AutoEnlargeBuffer
(
int
size)
29
: m_SIZE( size ),
30
m_size( 0 )
31
{
32
m_buffer = malloc(
size
);
33
}
28
inline
AutoEnlargeBuffer::AutoEnlargeBuffer
(
int
size) {
…
}
34
35
inline
AutoEnlargeBuffer::~AutoEnlargeBuffer
()
36
{
37
free( m_buffer );
38
}
35
inline
AutoEnlargeBuffer::~AutoEnlargeBuffer
() {
…
}
39
40
inline
void
AutoEnlargeBuffer::copy
(
void
*src,
int
size)
41
{
42
if
(
size
> m_SIZE ) {
43
do
{
44
m_SIZE *= 2;
45
}
46
while
(
size
> m_SIZE );
47
48
free( m_buffer );
49
m_buffer = malloc(m_SIZE);
50
}
51
52
m_size =
size
;
53
memcpy(m_buffer, src,
size
);
54
}
40
inline
void
AutoEnlargeBuffer::copy
(
void
*src,
int
size) {
…
}
55
56
#endif
private
#define private
Definition
McEventDict_dict.cpp:6
AutoEnlargeBuffer
Definition
AutoEnlargeBuffer.h:8
AutoEnlargeBuffer::~AutoEnlargeBuffer
~AutoEnlargeBuffer()
Definition
AutoEnlargeBuffer.h:35
AutoEnlargeBuffer::size
int size()
Definition
AutoEnlargeBuffer.h:17
AutoEnlargeBuffer::AutoEnlargeBuffer
AutoEnlargeBuffer(int size=128 *1024)
Definition
AutoEnlargeBuffer.h:28
AutoEnlargeBuffer::copy
void copy(void *src, int size)
Definition
AutoEnlargeBuffer.h:40
AutoEnlargeBuffer::data
void * data()
Definition
AutoEnlargeBuffer.h:18
7.1.1
DistBoss
DistBossUtil
DistBossUtil-00-00-04
DistBossUtil
AutoEnlargeBuffer.h
Generated by
1.12.0