Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
test_head.py
Go to the documentation of this file.
1 from os.path import join, dirname
2 import ROOT
3 
4 ROOT.gSystem.Load(join(dirname(__file__), "../lib/libKM3NeTROOT.so"))
5 
6 
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  if lines == ['aaa bbb', 'ccc ddd', 'ccc ddd eee']:
25  return 0
26 
27  print("failure")
28  return 1
29 
30 
JRange< T, JComparator_t > join(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Join ranges.
Definition: JRange.hh:659
print
Definition: JConvertDusj.sh:44
def test_multi_tag
Definition: test_head.py:7