12 from ROOT
import Belle2
16 parser = argparse.ArgumentParser()
17 parser.add_argument(
"input_data", help=(
"The path to the input data directory you want to use."
18 "It must contain a CollectorOutput.root file."))
22 parser.add_argument(
"iteration",
24 help=
"The iteration number used by the algorithm.")
26 parser.add_argument(
"--resetdb-after-execute",
29 help=(
"Should we reset the database chain each time we execute the algorithm. "
30 "Or only set the database once before all executions (default)."))
33 args = parser.parse_args()
35 b2.set_log_level(b2.LogLevel.DEBUG)
37 b2.set_debug_level(100)
44 inputFileNames = [pathlib.Path(args.input_data,
"CollectorOutput.root").absolute().as_posix()]
45 algo.setInputFileNames(inputFileNames)
49 b2.conditions.prepend_testing_payloads(
"localdb/database.txt")
57 b2.conditions.prepend_testing_payloads(
"localdb/database.txt")
58 print(
"Result of calibration =", algo.execute([(0, i)], args.iteration))
Test class implementing calibration algorithm.