12basf2.set_random_seed(501)
16 """Count the number of events passing this module"""
19 """Start number of events at zero"""
24 """Increment number of events each event"""
29expected_success_events = 6
32main.add_module(
"EventInfoSetter", evtNumList=[input_events], expList=[0], runList=[0])
33prescale_mod = main.add_module(
'Prescale', prescale=0.01)
35success_path = basf2.Path()
36success_count = success_path.add_module(
CountEvents())
37prescale_mod.if_true(success_path)
41print(basf2.statistics)
43assert success_count.num_events == expected_success_events
num_events
Stores the total number of events passing this module.