Belle II Software
release-08-00-10
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
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
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
Typedefs
Macros
tmemread.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
9
#include "daq/dqm/DqmSharedMem.h"
10
11
#include "TH1F.h"
12
#include "TMemFile.h"
13
14
using namespace
Belle2
;
15
using namespace
std;
16
17
int
main
(
int
/*argc*/
,
char
**
/*argv*/
)
18
{
19
20
DqmSharedMem
* shm =
new
DqmSharedMem
(
"testhisto"
, 2000000);
21
char
* buf =
new
char
[8000000];
22
23
for
(;;) {
24
shm->lock();
25
memcpy(buf, shm->ptr(), 8000000);
26
shm->unlock();
27
TMemFile* file =
new
TMemFile(
"TestHisto"
, (
char
*)shm->ptr(), 2000000,
"READ"
,
""
, 0);
28
file->ls();
29
file->Print();
30
TH1F* h1 = (TH1F*) file->Get(
"testhisto"
);
31
h1->Print();
32
sleep(1);
33
delete
file;
34
}
35
// file->Write();
36
// file->Close();
37
return
0;
38
}
Belle2::DqmSharedMem
Definition:
DqmSharedMem.h:19
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
main
int main(int argc, char **argv)
Run all tests.
Definition:
test_main.cc:91
daq
dqm
tools
tmemread.cc
Generated on Fri Aug 9 2024 00:49:27 for Belle II Software by
1.9.1