Jpp 20.0.0
the software that should make you happy
Loading...
Searching...
No Matches
test_head.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2import ROOT
3
4ROOT.gSystem.Load("libKM3NeTROOT")
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 assert lines == ['aaa bbb', 'ccc ddd', 'ccc ddd eee']
25
26
27if __name__ == "__main__":
29 print("OK")
void print(const TH1 &h1, std::ostream &out)
Print histogram parameters.
test_multi_tag()
Definition test_head.py:7