17from simulation
import add_simulation
18from reconstruction
import add_reconstruction, add_cdst_output
21basf2.set_log_level(basf2.LogLevel.INFO)
23input = basf2.register_module(
'RootInput')
24input.param(
'inputFileName', sys.argv[1])
27main = basf2.create_path()
30background_files =
None
31if 'BELLE2_BACKGROUND_DIR' in os.environ:
32 background_directory = os.environ[
'BELLE2_BACKGROUND_DIR']
33 background_files = glob.glob(background_directory +
'/*.root')
35 basf2.B2WARNING(
'The variable BELLE2_BACKGROUND_DIR is not set. '
36 'Beam background is not used in the simulation')
37add_simulation(main, bkgfiles=background_files)
39add_reconstruction(main, reconstruct_cdst=
'rawFormat')
40add_cdst_output(main, filename=sys.argv[2])
41main.add_module(
'Progress')
47print(basf2.statistics)