Belle II Software
release-06-01-15
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
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
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
b2hlt_read_histos.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
#include <daq/dqm/DqmMemFile.h>
9
#include <daq/rfarm/event/hltsocket/HLTMainLoop.h>
10
#include <framework/logging/Logger.h>
11
12
#include <boost/program_options.hpp>
13
#include <iostream>
14
#include <thread>
15
#include <chrono>
16
17
18
namespace
po = boost::program_options;
19
using namespace
Belle2
;
20
21
int
main
(
int
argc,
char
* argv[])
22
{
23
std::string dqmFileName;
24
25
po::options_description
26
desc(
"b2hlt_read_histos - helper tool to check the content of a DQM shared memory file repeatedly (every 5s)."
);
27
desc.add_options()
28
(
"help,h"
,
"Print this help message"
)
29
(
"dqmFileName"
, po::value<std::string>(&dqmFileName)->required(),
30
"where to read the shared memory from"
);
31
32
po::positional_options_description p;
33
34
po::variables_map vm;
35
try
{
36
po::store(
37
po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
38
}
catch
(std::exception& e) {
39
B2FATAL(e.what());
40
}
41
42
if
(vm.count(
"help"
)) {
43
std::cout << desc << std::endl;
44
exit(1);
45
}
46
47
try
{
48
po::notify(vm);
49
}
catch
(std::exception& e) {
50
B2FATAL(e.what());
51
}
52
53
Belle2::DqmMemFile
file(dqmFileName,
"read"
);
54
HLTMainLoop
mainLoop;
55
while
(mainLoop.isRunning()) {
56
57
auto
memFile = file.LoadMemFile();
58
memFile->GetListOfKeys()->Print();
59
60
using namespace
std::chrono_literals;
61
std::this_thread::sleep_for(5s);
62
}
63
}
Belle2::DqmMemFile
Definition:
DqmMemFile.h:28
Belle2::HLTMainLoop
Definition:
HLTMainLoop.h:18
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:75
daq
hbasf2
tools
b2hlt_read_histos.cc
Generated on Fri Dec 8 2023 04:15:54 for Belle II Software by
1.9.1