The Gaudi Framework
v36r16 (ea80daf8)
HistoDumpEx.py
Go to the documentation of this file.
1
#!/usr/bin/env python3
2
12
13
from
__future__
import
print_function
14
15
import
random
16
17
import
ROOT
18
from
GaudiPython.HistoUtils
import
histoDump
19
20
r = random.Random()
21
22
h1 = ROOT.TH1D(
"h1"
,
"title"
, 200, -4, 4)
23
p1 = ROOT.TProfile(
"p1"
,
"title"
, 200, -4, 4, -10, 10,
"s"
)
24
p2 = ROOT.TProfile(
"p2"
,
"title"
, 200, -4, 4, -10, 10)
25
26
for
i
in
range
(0, 1000000):
27
v = r.gauss(0, 2)
28
v2 = r.gauss(0, 2)
29
if
v < 0:
30
h1.Fill(v, -1)
31
else
:
32
h1.Fill(v, 1)
33
p1.Fill(v, -0.1 * v2, 1)
34
p2.Fill(v, -0.1 * v2, 1)
35
36
print(h1.dump(50, 50,
True
))
37
print(h1.dump(60, 30))
38
39
print(
histoDump
(h1, 10, 10))
40
print(
histoDump
(h1, 10, 10,
True
))
41
42
print(
histoDump
(p1, 10, 10,
True
))
43
print(
histoDump
(p2, 10, 10,
True
))
GaudiPython.HistoUtils
Definition:
HistoUtils.py:1
GaudiPython.HistoUtils.histoDump
histoDump
Definition:
HistoUtils.py:991
Gaudi::Functional::details::zip::range
decltype(auto) range(Args &&... args)
Zips multiple containers together to form a single range.
Definition:
FunctionalDetails.h:102
GaudiExamples
scripts
HistoDumpEx.py
Generated on Fri Jul 28 2023 16:22:53 for The Gaudi Framework by
1.8.18