Jpp
20.0.0
the software that should make you happy
Loading...
Searching...
No Matches
externals
km3net-dataformat
tests
test_head.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
import
ROOT
3
4
ROOT.gSystem.Load(
"libKM3NeTROOT"
)
5
6
7
def
test_multi_tag
():
8
h = ROOT.Head()
9
10
h.set_line(
"seed"
,
"42"
)
11
h.set_line(
"detector"
,
"aaa bbb"
)
12
h.set_line(
"detector"
,
"ccc ddd"
)
13
h.set_line(
"detector"
,
"ccc ddd eee"
)
14
15
ROOT.write(h, ROOT.std.cout)
16
17
keys = h.matching_keys(
"detector"
)
18
print
(
"keys = "
, keys)
19
20
v = h.get_lines(
"detector"
)
21
lines = list(v)
# okay, but keep v alive
22
print
(lines)
23
24
assert
lines == [
'aaa bbb'
,
'ccc ddd'
,
'ccc ddd eee'
]
25
26
27
if
__name__ ==
"__main__"
:
28
test_multi_tag
()
29
print
(
"OK"
)
print
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
Definition
JTriggerMonitor.cc:38
test_head.test_multi_tag
test_multi_tag()
Definition
test_head.py:7
Generated by
1.12.0