24from caf.framework
import Calibration, CAF
25from caf
import backends
32 print(
"Usage: python3 caf_multiple_options.py <data directory>")
39 input_files = [os.path.join(os.path.abspath(data_dir),
'*.root')]
43 dep_col = b2.register_module(
'CaTest')
44 dep_col.set_name(
'Dependent')
46 dep_col.param(
'granularity',
'run')
48 dep_col.param(
'spread', 15)
50 from ROOT
import Belle2
51 from ROOT.Belle2
import TestDBAccessAlgorithm
52 dep_alg = TestDBAccessAlgorithm()
57 dep_alg.setPrefix(
'Dependent')
63 input_files=input_files)
66 dep_cal.max_files_per_collector_job = 1
67 dep_cal.max_iterations = 5
70 last_col = b2.register_module(
'CaTest')
71 last_col.set_name(
'Last')
73 last_col.param(
'granularity',
'run')
75 last_col.param(
'spread', 15)
77 last_alg = TestDBAccessAlgorithm()
78 last_alg.setGeneratePayloads(
False)
79 last_alg.setPrefix(
'Last')
85 input_files=input_files)
88 last_cal.max_files_per_collector_job = 1
89 last_cal.max_iterations = 5
92 last_cal.depends_on(dep_cal)
97 cal_fw.add_calibration(dep_cal)
98 cal_fw.add_calibration(last_cal)
103 cal_fw.backend = backends.Local(max_processes=4)
106 print(
"End of CAF processing.")
109if __name__ ==
"__main__":