20from caf
import backends
21from caf.framework
import CAF
22from basf2
import B2ERROR
23from top_calibration
import BS13d_calibration_rawdata
27globalTags = [
'Reco_master_patch',
'data_reprocessing_proc10']
29data_dir =
'/group/belle2/dataprod/Data/Raw'
30main_output_dir =
'top_calibration'
38 print(
"usage: basf2", argvs[0],
"experiment runFirst runLast")
40experiment = int(argvs[1])
41run_first = int(argvs[2])
42run_last = int(argvs[3])
46expNo =
'e' + f
'{experiment:04d}'
47for run
in range(run_first, run_last + 1):
48 runNo =
'r' + f
'{run:05d}'
49 filename = f
"{data_dir}/{expNo}/{runNo}/sub00/physics.*.root"
50 files = glob.glob(filename)
52 for i
in range(min(len(files), maxFiles)):
53 inputFiles.append(files[i])
57if len(inputFiles) == 0:
58 B2ERROR(
'No rawdata files found in ' + data_dir +
' for exp=' + str(experiment) +
59 ' runFirst=' + str(run_first) +
' runLast=' + str(run_last))
63run_range =
'r' + f
'{run_first:05d}' +
'-' + f
'{run_last:05d}'
64output_dir = f
"{main_output_dir}/BS13d-rawdata-{expNo}-{run_range}"
67cal = BS13d_calibration_rawdata(inputFiles, globalTags, localDBs)
68cal.backend_args = {
"queue":
"s"}
72cal_fw.add_calibration(cal)
73cal_fw.output_dir = output_dir
74cal_fw.backend = backends.LSF()