13 from ROOT
import Belle2
17 parser = argparse.ArgumentParser()
18 parser.add_argument(
"input_data", help=(
"The path to the input data directory you want to use."
19 "It must contain a CollectorOutput.root file."))
23 parser.add_argument(
"iteration",
25 help=
"The iteration number used by the algorithm.")
27 parser.add_argument(
"--resetdb-after-execute",
30 help=(
"Should we reset the database chain each time we execute the algorithm. "
31 "Or only set the database once before all executions (default)."))
34 args = parser.parse_args()
36 b2.set_log_level(b2.LogLevel.DEBUG)
38 b2.set_debug_level(100)
45 inputFileNames = [pathlib.Path(args.input_data,
"CollectorOutput.root").absolute().as_posix()]
46 algo.setInputFileNames(inputFileNames)
50 b2.conditions.prepend_testing_payloads(
"localdb/database.txt")
58 b2.conditions.prepend_testing_payloads(
"localdb/database.txt")
59 print(
"Result of calibration =", algo.execute([(0, i)], args.iteration))
Test class implementing calibration algorithm.