20from caf.framework
import Calibration, CAF
21from caf
import backends
23b2.set_log_level(b2.LogLevel.INFO)
30 print(
"Usage: python3 caf_htcondor_backend.py <data directory>")
37 input_files_test = [os.path.join(os.path.abspath(data_dir),
'*.root')]
39 from caf.strategies
import SequentialRunByRun
42 from ROOT
import Belle2
43 from ROOT.Belle2
import TestCalibrationAlgorithm
47 col_test = b2.register_module(
'CaTest')
48 col_test.set_name(f
'Test{i}')
49 col_test.param(
'spread', 15)
50 col_test.param(
'granularity',
'run')
52 alg_test = TestCalibrationAlgorithm()
56 alg_test.setPrefix(f
'Test{i}')
61 input_files=input_files_test)
66 cal_test.max_files_per_collector_job = 1
68 cal_test.backend_args = {
"request_memory":
"2 GB"}
70 cal_test.max_iterations = 2
73 cal_test.heartbeat = 15
77 cal_test.collector_full_update_interval = 30
79 cal_test.strategies = SequentialRunByRun
82 cal_test.output_patterns.append(
"*.mille")
84 calibrations.append(cal_test)
90 for cal
in calibrations:
91 cal_fw.add_calibration(cal)
93 cal_fw.backend = backends.HTCondor()
96 print(
"End of CAF processing.")
99if __name__ ==
"__main__":