13 Prescales = PrescaleClass()
15 menu_name = flags.Trigger.triggerMenuSetup
17 log.info(
'Menu name: %s', menu_name)
20 base_menu_name = re.match(
r'\w*_v\d*',menu_name).
group(0)
22 menu_module = importlib.import_module(f
'TriggerMenuMT.HLT.Menu.{base_menu_name}')
23 except Exception
as e:
24 log.fatal(f
'Failed to import menu module "{base_menu_name}" inferred from menu "{menu_name}"!')
26 chains = menu_module.setupMenu()
40 if 'Primary_prescale' in menu_name:
41 filterChains(chains, Prescales.HLTPrescales_primary_prescale,
42 [
'Primary:L1Muon',
'Primary:Legacy',
'Primary:PhaseI',
'Primary:CostAndRate',
43 'Support:TagAndProbe',
'Support:LegacyTagAndProbe',
'Support:PhaseITagAndProbe'],
45 L1Prescales = Prescales.L1Prescales_primary_prescale
46 HLTPrescales = Prescales.HLTPrescales_primary_prescale
47 elif 'BulkMCProd_prescale' in menu_name:
48 assert(menu_name.startswith(
'Dev')
or menu_name.startswith(
'MC'))
49 filterChains(chains, Prescales.HLTPrescales_bulkmcprod_prescale, [
"PS:NoHLTRepro",
"PS:NoTrigVal",
"PS:NoBulkMCProd"])
50 L1Prescales = Prescales.L1Prescales_bulkmcprod_prescale
51 HLTPrescales = Prescales.HLTPrescales_bulkmcprod_prescale
52 elif 'TriggerValidation_prescale' in menu_name:
53 filterChains(chains, Prescales.HLTPrescales_trigvalid_prescale, [
"PS:NoHLTRepro",
"PS:NoTrigVal"])
54 L1Prescales = Prescales.L1Prescales_trigvalid_prescale
55 HLTPrescales = Prescales.HLTPrescales_trigvalid_prescale
56 elif 'HLTReprocessing_prescale' in menu_name:
57 filterChains(chains, Prescales.HLTPrescales_HLTRepro_prescale, [
"PS:NoHLTRepro"])
58 L1Prescales = Prescales.L1Prescales_HLTRepro_prescale
59 HLTPrescales = Prescales.HLTPrescales_HLTRepro_prescale
60 elif 'prescale' in menu_name:
61 log.error(f
'Unknown menu prescale set for menu {menu_name}!')
62 raise RuntimeError(
'Unknown menu prescale set')
64 L1Prescales = Prescales.L1Prescales
65 HLTPrescales = Prescales.HLTPrescales
67 return (L1Prescales, HLTPrescales, chains)