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