Belle II Software development
assert_parallel_certificate.py
1
8
9# Test for the parallel certified flag in all modules in the standard reconstruction.
10# It creates a path and fills it with all reconstruction modules, without anything else
11# (this path can never be executed, but we do not want that anyway).
12# Then it goes through all modules and checks it flag.
13
14import basf2
15import reconstruction
16
17# Create an empty path
18path = basf2.create_path()
19
20# Add only the reconstruction
22
23# Assert that all modules have a parallel processing certified flag.
24modules = path.modules()
25for m in modules:
26 assert m.has_properties(
27 basf2.ModulePropFlags.PARALLELPROCESSINGCERTIFIED), f'{m} is missing c_ParallelProcessingCertified flag!'
def add_reconstruction(path, components=None, pruneTracks=True, add_trigger_calculation=True, skipGeometryAdding=False, trackFitHypotheses=None, addClusterExpertModules=True, use_second_cdc_hits=False, add_muid_hits=False, reconstruct_cdst=None, event_abort=default_event_abort, use_random_numbers_for_hlt_prescale=True, pxd_filtering_offline=False, create_intercepts_for_pxd_ckf=False, append_full_grid_cdc_eventt0=True, legacy_ecl_charged_pid=False, emulate_HLT=False, skip_full_grid_cdc_eventt0_if_svd_time_present=True)