Belle II Software development
test_standalone_reco_exp1003.py
1
8
9import os
10import pathlib
11import subprocess
12
13import basf2 as b2
14
15
16if __name__ == "__main__":
17
18 prepare_path = os.getenv("BELLE2_PREPARE_PATH", "")
19 if prepare_path == "":
20 parent_path = pathlib.Path(b2.find_file('framework')).parent.absolute()
21 prepare_path = os.path.join(parent_path, "prepare_tests")
22 try:
23 os.mkdir(prepare_path)
24 except FileExistsError:
25 pass
26
27 # Generate and simulate few events for exp. 1003
28 steering = b2.find_file(os.path.join('reconstruction', 'tests', 'prepare', 'evtgen.py_noexec'))
29 output_file = os.path.join(prepare_path, 'test_standalone_reco_bbbar_exp1003.root')
30 subprocess.check_call(
31 ['basf2', steering, '--experiment', '1003', '--run', '0', '-n', '3', '-o', output_file]
32 )