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