Belle II Software
light-2409-toyger
Toggle main menu visibility
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
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
Variables
Typedefs
a
b
c
d
l
m
n
p
r
s
w
Enumerations
Enumerator
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
_
c
d
e
f
h
i
m
o
p
r
s
t
v
w
Enumerations
b
c
e
g
h
m
p
s
t
v
Enumerator
b
c
k
t
Related Functions
Files
File List
File Members
All
Functions
test_b2info-luminosity.py
1
8
9
'''
10
Test if b2info-luminosity works.
11
Note that the RunDB token must be passed to the test as environment variable (BELLE2_RUNDB_TOKEN).
12
'''
13
14
15
import
os
16
import
subprocess
17
18
import
b2test_utils
as
b2tu
19
20
lumiDB_path = b2tu.require_file(
'luminosity/'
,
'validation'
)
21
22
if
__name__ ==
'__main__'
:
23
24
rundb_token = os.getenv(
'BELLE2_RUNDB_TOKEN'
,
''
)
25
if
rundb_token ==
''
:
26
b2tu.skip_test(
'The BELLE2_RUNDB_TOKEN environment variable is not set'
)
27
28
with
b2tu.clean_working_directory():
29
30
# Check few configurations
31
# Please note: --what offline cannot be properly tested (it works only at KEKCC)
32
33
subprocess.check_call(
34
[
'b2info-luminosity'
,
'--exp'
,
'18'
,
'--runs'
,
'100,200-300,600-650'
,
'--what'
,
35
'online'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
36
)
37
38
subprocess.check_call(
39
[
'b2info-luminosity'
,
'--exp'
,
'18'
,
'--runs'
,
'100,200-300,600-650'
,
'--what'
,
40
'online'
,
'--verbose'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
41
)
42
43
subprocess.check_call(
44
[
'b2info-luminosity'
,
'--exp'
,
'18'
,
'--runs'
,
'200-300'
,
'--what'
,
'online'
,
45
'--good'
,
'--beam-energy'
,
'4S'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
46
)
47
48
subprocess.check_call(
49
[
'b2info-luminosity'
,
'--exp'
,
'18'
,
'--runs'
,
'100,600-650'
,
'--what'
,
'online'
,
50
'--beam-energy'
,
'4S_offres'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
51
)
52
53
subprocess.check_call(
54
[
'b2info-luminosity'
,
'--exp'
,
'12,14'
,
'--what'
,
'offline'
,
55
'--dboffline'
, f
'{lumiDB_path}/test_OffLineLuminosityProc.db'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
56
)
57
58
subprocess.check_call(
59
[
'b2info-luminosity'
,
'--exp'
,
'12,14'
,
'--what'
,
'offline'
,
'--proc'
,
'proc12'
,
60
'--dboffline'
, f
'{lumiDB_path}/test_OffLineLuminosityProc.db'
,
'--token'
, os.environ[
'BELLE2_RUNDB_TOKEN'
]]
61
)
analysis
tests
test_b2info-luminosity.py
Generated on Sat Sep 28 2024 03:40:59 for Belle II Software by
1.9.6