5 import simulation
as sim
6 import reconstruction
as rec
9 from ROOT
import Belle2
13 import multiprocessing
as mp
15 path_to_output =
'rawdata/tests/digits.root'
16 b2.set_random_seed(
"L1V0RN0")
17 b2.set_log_level(b2.LogLevel.WARNING)
20 b2.conditions.disable_globaltag_replay()
24 """Create the file 'digits.root' needed for testing the packers if it does not exist"""
25 child_path = b2.create_path()
26 child_path.add_module(
'EventInfoSetter',
28 child_path.add_module(
'EvtGenInput')
29 sim.add_simulation(path=child_path)
30 child_path.add_module(
32 outputFileName=
'${BELLE2_LOCAL_DIR}/' +
34 branchNames=list(rec.DIGITS_OBJECTS))
35 child_path.add_module(
'Progress')
36 b2.process(child_path)
42 child = mp.Process(target=create_digits)
47 if child.exitcode != 0:
48 sys.exit(child.exitcode)
51 main_path = b2.create_path()
52 main_path.add_module(
'RootInput',
54 raw.add_packers(path=main_path)
55 main_path.add_module(
'Progress')