Belle II Software
development
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
▼
Belle II Software
►
Modules
►
Namespaces
►
Classes
▼
Files
►
File List
►
File Members
submitAll.py
1
#!/usr/bin/env python3
2
3
10
11
import
glob
12
import
subprocess
13
from
functools
import
reduce
14
15
'''
16
Simple script submitting jobs to process all data.
17
Usage:
18
basf2 submitAll.py
19
'''
20
21
# Experimantl number
22
exp = 1
23
24
# Data directory
25
# GCR 2017
26
dir = f
'/hsm/belle2/bdata/Data/Raw/e{exp:0>4}'
27
# pre GCR period
28
# dir = '/ghi/fs01/belle2/bdata/group/detector/CDC/unpacked/'
29
# files = glob.glob(dir + exp + '/gcr.cdc.*.root')
30
31
# run lists
32
# runs = [3118, 3119]
33
runs = [3944, 3948, 3964, 4011, 3966, 3980, 3996, 4002, 4004, 4005]
34
# runs = [3860, 3871, 3883, 3912, 3917, 3927]
35
# runs = [3944, 3948, 3964, 4011, 3966,3980,3996,4002,4004,4005,
36
# 3860, 3871, 3883, 3912, 3917, 3927, 3965, 3967, 3981]
37
# runs = [i for i in range(3939,4020)]
38
39
40
files_nested = [glob.glob(dir + f
'/r{run:0>5}/sub00/cosmic.{exp:0>4}.{run:0>5}'
+
'.HLT1.f*.root'
)
for
run
in
runs]
41
# flatting nested list.
42
files = reduce(
lambda
x, y: x + y, files_nested)
43
44
if
not
files:
45
print(
"No data are found."
)
46
quit()
47
48
for
f
in
files:
49
input = f
# input file name.
50
name = f.split(
'/'
)
51
logfile = name[-1].replace(
'.root'
,
'.log'
)
# input file name.
52
output =
'output_'
+ name[-1]
# output file name.
53
command =
' '
.join([
'basf2 runReconstruction.py'
, input, output,
'>&'
, logfile])
54
# Check submitting job list
55
# print('bsub -q s \"' + command + ' \"')
56
# Submit jobs.
57
subprocess.run([
"bsub"
,
"-q"
,
"l"
, command])
cdc
examples
performance
submitAll.py
Generated on Wed Apr 9 2025 02:37:11 for Belle II Software by
1.9.6