4 path_to_output =
'rawdata/tests/digits.root'
7 import simulation
as sim
10 from ROOT
import Belle2
14 import multiprocessing
as mp
16 b2.set_random_seed(
"L1V0RN0")
17 b2.set_log_level(b2.LogLevel.WARNING)
20 b2.conditions.disable_globaltag_replay()
26 """Create the file 'digits.root' needed for testing the packers if it does not exist"""
28 child_path = b2.create_path()
29 child_path.add_module(
'EventInfoSetter',
31 child_path.add_module(
'EvtGenInput')
32 sim.add_simulation(path=child_path)
33 child_path.add_module(
'RootOutput',
34 outputFileName=
'${BELLE2_LOCAL_DIR}/' + path_to_output,
35 branchNames=[
'ARICHDigits',
43 child_path.add_module(
'Progress')
44 b2.process(child_path)
49 child = mp.Process(target=create_digits)
54 if child.exitcode != 0:
55 sys.exit(child.exitcode)
58 main_path = b2.create_path()
59 main_path.add_module(
'RootInput',
61 raw.add_packers(path=main_path)
62 main_path.add_module(
'Progress')