Belle II Software
release-08-00-10
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
DQMHistAnalysisSVDMiraBelle_test.py
1
# !/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
4
11
12
# script to test module which create monitoring variables for SVD
13
#
14
# Usage: basf2 DQMHistAnalysisSVDMiraBelle_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 DQMHistAnalysisSVDMiraBelle_test.py /group/belle2/phase3/dqm/dqmsrv1/e0018/dqmhisto/erecodqm_e0018r001313.root
18
# Output file in format: mon_e0018r001313_online.root contains moniotring variables which can be pinted by script:
19
# dqm/analysis/examples/printDQMFile.C
20
21
import
basf2
as
b2
22
import
os
23
import
sys
24
import
re
25
26
argv = sys.argv
27
if
len(argv) < 2:
28
print(
'\nUsage: %s input_filename\n'
% argv[0])
29
exit(1)
30
inputFile = sys.argv[1]
31
32
directory, fileName = os.path.split(inputFile)
33
exp_nr = int(re.findall(
r'\d+'
, fileName)[0])
34
run_nr = int(re.findall(
r'\d+'
, fileName)[1])
35
36
# Set log level
37
b2.set_log_level(b2.LogLevel.INFO)
38
39
# Create main path
40
main = b2.create_path()
41
42
# Load histograms from file
43
main.add_module(
'DQMHistAnalysisInputRootFile'
,
44
Experiment=0,
45
RunList=[0],
46
FileList=[inputFile],
47
EventsList=[1],
48
SelectHistograms=[
"SVDExpReco/*"
,
49
"SVDClsTrk/*"
,
50
"SVDEfficiency/*"
],
51
EventInterval=1,
52
NullHistogramMode=
False
)
53
# main.add_module("DQMHistAutoCanvas") # Plot all Histo from Input not needed
54
55
# Run analysis module
56
main.add_module(
'DQMHistAnalysisSVDOnMiraBelle'
)
57
58
# Save canvases based on histograms used to prepare monitoring variables and monitoring variables to root file
59
main.add_module(
'DQMHistAnalysisOutputMonObj'
,
60
exp=exp_nr,
61
run=run_nr)
62
63
# Process the events
64
b2.print_path(main)
65
b2.process(main)
66
67
# print out the summary
68
print(b2.statistics)
dqm
analysis
examples
DQMHistAnalysisSVDMiraBelle_test.py
Generated on Fri Aug 9 2024 00:51:24 for Belle II Software by
1.9.1