20from caf
import backends
21from caf.framework
import CAF
22from basf2
import B2ERROR
23from top_calibration
import BS13d_calibration_cdst
27globalTags = [
'Reco_master_patch',
'data_reprocessing_proc10']
29data_dir =
'/group/belle2/dataprod/Data/OfficialReco/proc10/'
30skim_dir =
'skim/hlt_bhabha/cdst/sub00'
31main_output_dir =
'top_calibration'
34new_cdst_format =
False
41 print(
"usage: basf2", argvs[0],
"experiment runFirst runLast")
43experiment = int(argvs[1])
44run_first = int(argvs[2])
45run_last = int(argvs[3])
49expNo =
'e' + f
'{experiment:04d}'
50for run
in range(run_first, run_last + 1):
51 runNo =
'r' + f
'{run:05d}'
52 filename = f
"{data_dir}/{expNo}/*/{runNo}/{skim_dir}/cdst*.root"
53 files = glob.glob(filename)
55 for i
in range(min(len(files), maxFiles)):
56 inputFiles.append(files[i])
60if len(inputFiles) == 0:
61 B2ERROR(
'No cdst files found in ' + data_dir +
' for exp=' + str(experiment) +
62 ' runFirst=' + str(run_first) +
' runLast=' + str(run_last) +
63 ' (skim_dir=' + skim_dir +
')')
67run_range =
'r' + f
'{run_first:05d}' +
'-' + f
'{run_last:05d}'
68output_dir = f
"{main_output_dir}/BS13d-bhabha-{expNo}-{run_range}"
71cal = BS13d_calibration_cdst(inputFiles, time_offset, globalTags, localDBs, new_cdst_format)
72cal.backend_args = {
"queue":
"s"}
76cal_fw.add_calibration(cal)
77cal_fw.output_dir = output_dir
78cal_fw.backend = backends.LSF()