16 from ROOT.Belle2
import TestCalibrationAlgorithm
18 from caf.framework
import Calibration, CAF
19 from caf.utils
import ExpRun, IoV
20 from caf.strategies
import SequentialRunByRun
21 from caf.backends
import Local
23 b2.set_log_level(b2.LogLevel.INFO)
30 print(
"Usage: python3 caf_ignoring_runs.py <data directory>")
36 input_files_test = [os.path.join(os.path.abspath(data_dir),
'*.root')]
42 col_test = b2.register_module(
'CaTest')
44 col_test.param(
'spread', 15)
46 alg_test = TestCalibrationAlgorithm()
48 alg_test.setMinEntries(10000)
53 input_files=input_files_test)
58 cal_test.ignored_runs = [ExpRun(0, 2), ExpRun(0, 3)]
61 cal_test.strategies = SequentialRunByRun
74 cal_test.algorithms[0].params[
"iov_coverage"] = IoV(0, 1, 0, 15)
83 cal_test.algorithms[0].params[
"step_size"] = 1
85 cal_test.max_files_per_collector_job = 1
96 cal_fw.add_calibration(cal_test)
97 cal_fw.backend = Local(max_processes=4)
108 cal_fw.run(iov=IoV(0, 3, 0, 11))
109 print(
"End of CAF processing.")
112 if __name__ ==
"__main__":
int main(int argc, char **argv)
Run all tests.