10import generators
as ge
11import simulation
as si
12import b2test_utils
as b2u
15__offending_warning =
'[WARNING] Unknown bitname { module: TRGGRLProjects }'
20 main.add_module(
'EventInfoSetter')
21 ge.add_kkmc_generator(main,
'mu-mu+')
22 si.add_simulation(main)
26if __name__ ==
'__main__':
27 with b2u.clean_working_directory():
29 b2.logging.log_level = b2.LogLevel.WARNING
30 b2.logging.add_file(log_file)
31 b2u.safe_process(steering_path(), max_event=1)
33 with open(log_file)
as log:
34 if __offending_warning
in log.read():
38 with open(log_file)
as log:
40 if 'bitname =' in line:
41 bits.append(line.split(
' ')[2])
42 b2.B2FATAL(
'Check the TRGGRLProjects module for the following undefined bits: ',
' '.join(bits))