Belle II Software development
assert_parallel_certificate.py
1
8
9# Test for the parallel certified flag in all modules in the standard simulation.
10
11import basf2 as b2
12from simulation import add_simulation
13
14# Create an empty path
15path = b2.create_path()
16
17# Add only the simulation
18add_simulation(path, bkgfiles="some_file", simulateT0jitter=True)
19
20# Assert that all modules have a parallel processing certified flag, except for BGOverlayInput.
21for m in path.modules():
22 if m.name() == 'BGOverlayInput':
23 continue
24 assert m.has_properties(
25 b2.ModulePropFlags.PARALLELPROCESSINGCERTIFIED), f'{m} is missing c_ParallelProcessingCertified flag!'