Belle II Software
release-08-02-06
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
x
z
Typedefs
a
b
c
d
e
g
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
a
b
c
e
f
g
n
p
s
v
z
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
Typedefs
Macros
DQMHistAnalysisTOP_test.py
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
# script to analyze raw histograms from TOP
13
#
14
# Usage: basf2 DQMHistAnalysisTOP_test.py input_files
15
# input_files: one of the raw dqm files placed under /group/belle2/phase3/dqm/dqmsrv1/
16
#
17
# i.e basf2 DQMHistAnalysisTOP_test.py /group/belle2/phase3/dqm/dqmsrv1/e0018/dqmhisto/erecodqm_e0018r001313.root
18
# -----------------------------------------------------------------------------------------------
19
20
21
import
basf2
as
b2
22
import
sys
23
24
argv = sys.argv
25
if
len(argv) < 2:
26
print(
'\nUsage: %s input_filename\n'
% argv[0])
27
exit(1)
28
inputFile = sys.argv[1]
29
30
# Set log level
31
b2.set_log_level(b2.LogLevel.INFO)
32
33
# Create main path
34
main = b2.create_path()
35
36
# Load histograms from file
37
main.add_module(
'DQMHistAnalysisInputRootFile'
,
38
Experiment=0,
39
RunList=[0],
40
FileList=[inputFile],
41
EventsList=[1],
42
SelectHistograms=[
"DQMInfo/rtype"
,
"DAQ/Nevent"
,
"TOP/*"
],
43
EventInterval=1,
44
NullHistogramMode=
False
)
45
46
# Plot all histograms from the file
47
main.add_module(
"DQMHistAutoCanvas"
)
48
49
# Analysis module
50
main.add_module(
'DQMHistAnalysisTOP'
)
51
52
# Output canvases to root file
53
main.add_module(
'DQMHistAnalysisOutputFile'
,
54
HistoFile=
"output_dqmHistAnalysis.root"
,
55
SaveHistos=
False
,
56
SaveCanvases=
True
)
57
58
# Process all event at main path
59
b2.process(main)
60
61
# Print modules' statistics
62
print(b2.statistics)
dqm
analysis
examples
DQMHistAnalysisTOP_test.py
Generated on Tue Jan 28 2025 01:53:44 for Belle II Software by
1.9.1