14 b2.set_log_level(b2.LogLevel.INFO)
16 if len(sys.argv) != 6:
17 print(
'Usage: basf2 generate_test_data.py data_output_directory experiment_number run_number_low run_number_high num_events')
20 output_dir = sys.argv[1]
21 experiment = int(sys.argv[2])
22 run_low = int(sys.argv[3])
23 run_high = int(sys.argv[4])
24 nevents = int(sys.argv[5])
26 runs = [run
for run
in range(run_low, run_high+1)]
29 main = b2.create_path()
30 main.add_module(
'EventInfoSetter', expList=[experiment]*len(runs), runList=runs, evtNumList=[nevents]*len(runs))
31 main.add_module(
'RootOutput',
32 outputFileName=output_dir +
'/DST_exp{:d}_run{:d}_run{:d}.root'.format(experiment, run_low, run_high))