2 import generators
as ge
3 import simulation
as si
5 import b2test_utils
as b2u
8 __offending_warning =
'[WARNING] Unknown bitname { module: TRGGRLProjects }'
13 main.add_module(
'EventInfoSetter')
14 ge.add_kkmc_generator(main,
'mu-mu+')
15 si.add_simulation(main)
20 if __name__ ==
'__main__':
21 with b2u.clean_working_directory():
23 b2.logging.log_level = b2.LogLevel.WARNING
24 b2.logging.add_file(log_file)
25 b2u.safe_process(steering_path(), max_event=1)
27 with open(log_file,
'r')
as log:
28 if __offending_warning
in log.read():
32 with open(log_file,
'r')
as log:
34 if 'bitname =' in line:
35 bits.append(line.split(
' ')[2])
36 b2.B2FATAL(
'Check the TRGGRLProjects module for the following undefined bits: ',
' '.join(bits))