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