20from ROOT.Belle2
import TestCalibrationAlgorithm
21from caf.framework
import Calibration, CAF
22from caf
import backends
24b2.set_log_level(b2.LogLevel.INFO)
31 print(
"Usage: python3 caf_htcondor_backend.py <data directory>")
38 input_files_test = [os.path.join(os.path.abspath(data_dir),
'*.root')]
40 from caf.strategies
import SequentialRunByRun
46 col_test = b2.register_module(
'CaTest')
47 col_test.set_name(f
'Test{i}')
48 col_test.param(
'spread', 15)
49 col_test.param(
'granularity',
'run')
51 alg_test = TestCalibrationAlgorithm()
55 alg_test.setPrefix(f
'Test{i}')
60 input_files=input_files_test)
65 cal_test.max_files_per_collector_job = 1
67 cal_test.backend_args = {
"request_memory":
"2 GB"}
69 cal_test.max_iterations = 2
72 cal_test.heartbeat = 15
76 cal_test.collector_full_update_interval = 30
78 cal_test.strategies = SequentialRunByRun
81 cal_test.output_patterns.append(
"*.mille")
83 calibrations.append(cal_test)
89 for cal
in calibrations:
90 cal_fw.add_calibration(cal)
92 cal_fw.backend = backends.HTCondor()
95 print(
"End of CAF processing.")
98if __name__ ==
"__main__":