ATLAS Offline Software
Classes | Functions | Variables
GenerateMenuMT Namespace Reference

Classes

class  FilterChainsToGenerate
 
class  GenerateMenuMT
 
class  Singleton
 

Functions

def calibCosmicMonSignatures ()
 
def combinedSignatures ()
 
def jointSignatures ()
 
def defaultSignatures ()
 
def testSignatures ()
 
def bphysicsSignatures ()
 
def allSignatures ()
 
def generateMenuMT (flags)
 
def makeHLTTree (flags, chainConfigs)
 

Variables

 log
 

Function Documentation

◆ allSignatures()

def GenerateMenuMT.allSignatures ( )

Definition at line 30 of file GenerateMenuMT.py.

◆ bphysicsSignatures()

def GenerateMenuMT.bphysicsSignatures ( )

Definition at line 27 of file GenerateMenuMT.py.

27 def bphysicsSignatures():
28  return ['Bphysics']
29 

◆ calibCosmicMonSignatures()

def GenerateMenuMT.calibCosmicMonSignatures ( )

Definition at line 12 of file GenerateMenuMT.py.

13  return ['Streaming','Monitor','Beamspot','Cosmic', 'Calib', 'EnhancedBias']
14 

◆ combinedSignatures()

def GenerateMenuMT.combinedSignatures ( )

Definition at line 15 of file GenerateMenuMT.py.

15 def combinedSignatures():
16  return ['MinBias','Electron','Photon','Muon','Tau','Jet', 'Bjet','MET','UnconventionalTracking','HeavyIon']
17 

◆ defaultSignatures()

def GenerateMenuMT.defaultSignatures ( )

Definition at line 21 of file GenerateMenuMT.py.

21 def defaultSignatures():
22  return ['Streaming']
23 

◆ generateMenuMT()

def GenerateMenuMT.generateMenuMT (   flags)
== Main function to generates L1, L1Topo and HLT menu CA, using class GenerateMenuMT

Definition at line 516 of file GenerateMenuMT.py.

516 def generateMenuMT(flags):
517  """
518  == Main function to generates L1, L1Topo and HLT menu CA, using class GenerateMenuMT
519  """
520  # generate L1 menu
521  # This probably will go to TriggerConfig.triggerRunCfg
522  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu, createL1PrescalesFileFromMenu
523  from TriggerMenuMT.HLT.Menu.MenuPrescaleConfig import MenuPrescaleConfig
524  generateL1Menu(flags)
526 
527  # generate HLT menu
528  menu = GenerateMenuMT()
529 
530  chainsToGenerate = FilterChainsToGenerate(flags)
531  menu.setChainFilter(chainsToGenerate)
532  log.debug("Filtering chains = %d", (menu.chainFilter is not None))
533  finalListOfChainConfigs = menu.generateAllChainConfigs(flags)
534  log.info("Length of FinalListOfChainConfigs %s", len(finalListOfChainConfigs))
535 
536  # Add prescales for disabling items (e.g. MC production)
537  log.info("Applying HLT prescales")
538 
539  (menu.L1Prescales, menu.HLTPrescales, menu.chainsInMenu) = MenuPrescaleConfig(HLTMenuConfig, flags)
540  from TriggerMenuMT.HLT.Menu.MenuPrescaleConfig import applyHLTPrescale
541  applyHLTPrescale(HLTMenuConfig, menu.HLTPrescales, menu.signaturesOverwritten)
542 
543  # make sure that we didn't generate any steps that are fully empty in all chains
544  # if there are empty steps, remove them
545  finalListOfChainConfigs = menu.resolveEmptySteps(finalListOfChainConfigs)
546 
547  log.debug("finalListOfChainConfig %s", finalListOfChainConfigs)
548  log.info("Making the HLT configuration tree")
549  menuAcc, CFseq_list = makeHLTTree(flags, finalListOfChainConfigs)
550  # Configure ChainFilters for ROBPrefetching
551  from TriggerJobOpts.TriggerConfigFlags import ROBPrefetching
552  if ROBPrefetching.InitialRoI in flags.Trigger.ROBPrefetchingOptions:
553  from TrigGenericAlgs.TrigGenericAlgsConfig import prefetchingInitialRoIConfig
554  menuAcc.merge( prefetchingInitialRoIConfig(flags, CFseq_list), 'HLTBeginSeq')
555 
556  log.info("Checking the L1HLTConsistency...")
557  from TriggerMenuMT.HLT.Config.Validation.CheckL1HLTConsistency import checkL1HLTConsistency
558  checkL1HLTConsistency(flags)
559 
560  log.info("Checking the Coherent Prescale assignments...")
561  from TriggerMenuMT.HLT.Config.Validation.CheckCPSGroups import checkCPSGroups
562  checkCPSGroups(HLTMenuConfig.dictsList())
563 
564  # Cleanup menu singletons to allow garbage collection (ATR-28855)
565  GenerateMenuMT.clear()
566  from TriggerMenuMT.HLT.Config import MenuComponents
567  MenuComponents._ComboHypoPool.clear()
568 
569  return menuAcc
570 
571 

◆ jointSignatures()

def GenerateMenuMT.jointSignatures ( )

Definition at line 18 of file GenerateMenuMT.py.

18 def jointSignatures():
19  return ['Bjet', 'Egamma', 'Combined']
20 

◆ makeHLTTree()

def GenerateMenuMT.makeHLTTree (   flags,
  chainConfigs 
)
Generate appropriate Control Flow Graph wiht all HLT algorithms

Definition at line 572 of file GenerateMenuMT.py.

572 def makeHLTTree(flags, chainConfigs):
573  """
574  Generate appropriate Control Flow Graph wiht all HLT algorithms
575  """
576  from TriggerMenuMT.HLT.Config.ControlFlow.HLTCFConfig import decisionTreeFromChains, sequenceScanner
577  from TriggerJobOpts.TriggerConfig import collectViewMakers
578  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
579  from AthenaCommon.CFElements import seqAND
580 
581  acc = ComponentAccumulator()
582  steps = seqAND('HLTAllSteps')
583  finalDecisions, CFseq_list, menuAcc = decisionTreeFromChains(flags, steps, chainConfigs, HLTMenuConfig.dictsList())
584  if log.getEffectiveLevel() <= logging.DEBUG:
585  menuAcc.printConfig()
586 
587  acc.merge(menuAcc)
588  successful_scan = sequenceScanner( steps )
589  if not successful_scan:
590  raise Exception("[makeHLTTree] At least one sequence is expected in more than one step. Check error messages and fix!")
591 
592  flatDecisions=[]
593  for step in finalDecisions:
594  flatDecisions.extend (step)
595 
596  viewMakers = collectViewMakers(steps)
597  viewMakerMap = {vm.name:vm for vm in viewMakers}
598  for vmname, vm in viewMakerMap.items():
599  log.debug(f"[makeHLTTree] {vmname} InputMakerOutputDecisions: {vm.InputMakerOutputDecisions}")
600  if vmname.endswith("_probe"):
601  try:
602  log.debug(f"Setting InputCachedViews on {vmname} to read decisions from tag leg {vmname[:-6]}: {vm.InputMakerOutputDecisions}")
603  vm.InputCachedViews = viewMakerMap[vmname[:-6]].InputMakerOutputDecisions
604  except KeyError: # We may be using a probe leg that has different reco from the tag
605  log.debug(f"Tag leg does not match probe: '{vmname[:-6]}', will not use cached views")
606 
607 
608  # generate JSON representation of the config
609  from TriggerMenuMT.HLT.Config.JSON.HLTMenuJSON import generateJSON
610  generateJSON(flags, HLTMenuConfig.dictsList(), menuAcc.getSequence("HLTAllSteps"))
611 
612  from TriggerMenuMT.HLT.Config.JSON.HLTPrescaleJSON import generatePrescaleJSON
613  generatePrescaleJSON(flags, HLTMenuConfig.dictsList())
614 
615  from TriggerMenuMT.HLT.Config.JSON.HLTMonitoringJSON import generateDefaultMonitoringJSON
616  generateDefaultMonitoringJSON(flags, HLTMenuConfig.dictsList())
617 
618  from AthenaCommon.CFElements import checkSequenceConsistency
620  return acc, CFseq_list

◆ testSignatures()

def GenerateMenuMT.testSignatures ( )

Definition at line 24 of file GenerateMenuMT.py.

24 def testSignatures():
25  return ['Test']
26 

Variable Documentation

◆ log

GenerateMenuMT.log

Definition at line 9 of file GenerateMenuMT.py.

GenerateMenuMT.calibCosmicMonSignatures
def calibCosmicMonSignatures()
Definition: GenerateMenuMT.py:12
GenerateMenuMT.allSignatures
def allSignatures()
Definition: GenerateMenuMT.py:30
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GenerateMenuMT.defaultSignatures
def defaultSignatures()
Definition: GenerateMenuMT.py:21
python.TrigConfigSvcCfg.createL1PrescalesFileFromMenu
def createL1PrescalesFileFromMenu(flags)
Definition: TrigConfigSvcCfg.py:165
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:184
GenerateMenuMT.makeHLTTree
def makeHLTTree(flags, chainConfigs)
Definition: GenerateMenuMT.py:572
GenerateMenuMT
Definition: GenerateMenuMT.py:1
CheckL1HLTConsistency.checkL1HLTConsistency
def checkL1HLTConsistency(flags)
Definition: CheckL1HLTConsistency.py:48
HLTCFConfig.decisionTreeFromChains
def decisionTreeFromChains(flags, HLTNode, chains, allDicts)
Definition: HLTCFConfig.py:166
GenerateMenuMT.bphysicsSignatures
def bphysicsSignatures()
Definition: GenerateMenuMT.py:27
python.CFElements.seqAND
def seqAND(name, subs=[])
Definition: CFElements.py:25
HLTCFConfig.sequenceScanner
def sequenceScanner(HLTNode)
Definition: HLTCFConfig.py:110
GenerateMenuMT.combinedSignatures
def combinedSignatures()
Definition: GenerateMenuMT.py:15
python.CFElements.checkSequenceConsistency
def checkSequenceConsistency(seq)
Definition: CFElements.py:69
GenerateMenuMT.generateMenuMT
def generateMenuMT(flags)
Definition: GenerateMenuMT.py:516
python.HLT.Menu.MenuPrescaleConfig.applyHLTPrescale
def applyHLTPrescale(triggerPythonConfig, HLTPrescale, ignoreUnknownChains=False)
Definition: MenuPrescaleConfig.py:82
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.HLT.Menu.MenuPrescaleConfig.MenuPrescaleConfig
def MenuPrescaleConfig(hltMenuConfig, flags)
Definition: MenuPrescaleConfig.py:9
GenerateMenuMT.jointSignatures
def jointSignatures()
Definition: GenerateMenuMT.py:18
python.TriggerConfig.collectViewMakers
def collectViewMakers(steps)
Definition: TriggerConfig.py:67
HLTMonitoringJSON.generateDefaultMonitoringJSON
def generateDefaultMonitoringJSON(flags, chainDicts)
Definition: HLTMonitoringJSON.py:21
python.TrigGenericAlgsConfig.prefetchingInitialRoIConfig
def prefetchingInitialRoIConfig(flags, CFseq_list)
Definition: TrigGenericAlgsConfig.py:159
HLTMenuJSON.generateJSON
def generateJSON(flags, chainDicts, HLTAllSteps)
Definition: HLTMenuJSON.py:83
CheckCPSGroups.checkCPSGroups
def checkCPSGroups(chainDicts)
Definition: CheckCPSGroups.py:19
GenerateMenuMT.testSignatures
def testSignatures()
Definition: GenerateMenuMT.py:24
HLTPrescaleJSON.generatePrescaleJSON
def generatePrescaleJSON(flags, chainDicts)
Definition: HLTPrescaleJSON.py:8