20from caf
import backends
21from caf.framework
import CAF
22from basf2
import B2ERROR
23from top_calibration
import channel_mask_calibration
27globalTags = [
'online']
29data_dir =
'/group/belle2/dataprod/Data/OfficialReco/proc11/'
30skim_dir =
'skim/hlt_hadron/cdst/sub00'
31main_output_dir =
'top_calibration'
39 print(
"usage: basf2", argvs[0],
"experiment runFirst runLast")
41experiment = int(argvs[1])
42run_first = int(argvs[2])
43run_last = int(argvs[3])
47expNo =
'e' + f
'{experiment:04d}'
48for run
in range(run_first, run_last + 1):
49 runNo =
'r' + f
'{run:05d}'
50 filename = f
"{data_dir}/{expNo}/*/{runNo}/{skim_dir}/cdst*.root"
51 inputFiles += glob.glob(filename)
53if len(inputFiles) == 0:
54 B2ERROR(
'No cdst files found in ' + data_dir +
' for exp=' + str(experiment) +
55 ' runFirst=' + str(run_first) +
' runLast=' + str(run_last) +
56 ' (skim_dir=' + skim_dir +
')')
60run_range =
'r' + f
'{run_first:05d}' +
'-' + f
'{run_last:05d}'
61output_dir = f
"{main_output_dir}/channelMask-{expNo}-{run_range}"
64cal = channel_mask_calibration(inputFiles, globalTags, localDBs, unpack)
65cal.backend_args = {
"queue":
"s"}
69cal_fw.add_calibration(cal)
70cal_fw.output_dir = output_dir
71cal_fw.backend = backends.LSF()