Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
 
 _maxAllowedCustomCH
 

Function Documentation

◆ allSignatures()

def GenerateMenuMT.allSignatures ( )

Definition at line 32 of file GenerateMenuMT.py.

◆ bphysicsSignatures()

def GenerateMenuMT.bphysicsSignatures ( )

Definition at line 29 of file GenerateMenuMT.py.

29 def bphysicsSignatures():
30  return ['Bphysics']
31 

◆ calibCosmicMonSignatures()

def GenerateMenuMT.calibCosmicMonSignatures ( )

Definition at line 14 of file GenerateMenuMT.py.

15  return ['Streaming','Monitor','Beamspot','Cosmic', 'Calib', 'EnhancedBias']
16 

◆ combinedSignatures()

def GenerateMenuMT.combinedSignatures ( )

Definition at line 17 of file GenerateMenuMT.py.

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

◆ defaultSignatures()

def GenerateMenuMT.defaultSignatures ( )

Definition at line 23 of file GenerateMenuMT.py.

23 def defaultSignatures():
24  return ['Streaming']
25 

◆ generateMenuMT()

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

Definition at line 564 of file GenerateMenuMT.py.

564 def generateMenuMT(flags):
565  """
566  == Main function to generate the L1, L1Topo and HLT menu configs and CA, using the GenerateMenuMT class
567  """
568  # Generate L1 menu
569  # The L1Menu json file is produced here
570  from TrigConfigSvc.TrigConfigSvcCfg import generateL1Menu
571  generateL1Menu(flags)
572 
573 
574  menu = GenerateMenuMT()
575 
576  # Apply generation filter (enable/disable chains and signatures)
577  chains_gen_filter = FilterChainsToGenerate(flags)
578  menu.setChainFilter(chains_gen_filter)
579  log.debug('Filtering chains: %d', menu.chainFilter is not None)
580 
581  # Generate all chains configuration
582  finalListOfChainConfigs = menu.generateAllChainConfigs(flags)
583 
584  log.info('Number of configured chains: %d', len(finalListOfChainConfigs))
585  from TriggerMenuMT.HLT.Config import MenuComponents
586  if len(MenuComponents._CustomComboHypoAllowed)> _maxAllowedCustomCH:
587  log.error(f'Found {len(MenuComponents._CustomComboHypoAllowed)} ComboHypo algorithms violating the one-CH-per-step rule, only {_maxAllowedCustomCH} are allowed (which are BLS ComboHypos). This is the list of current violations: {MenuComponents._CustomComboHypoAllowed}. Please consolidate your choice of ComboHypo, by checking that it is able to handle decisions internally; if yes eventually increase the limit set by _maxAllowedCustomCH, after discussing with experts')
588  # Generate and apply the automatic prescale sets (e.g. for disabling items in an MC production)
589  menu.generatePrescales(flags)
590 
591 
592  # Remove any remaining steps that are fully empty in all chains
593  finalListOfChainConfigs = menu.resolveEmptySteps(finalListOfChainConfigs)
594  log.debug("finalListOfChainConfig: %s", finalListOfChainConfigs)
595 
596  # Make the HLT configuration tree
597  # The HLTMenu json file is produced here.
598  log.info("Making the HLT configuration tree")
599  menuAcc, CFseq_list = makeHLTTree(flags, finalListOfChainConfigs)
600 
601  # Configure ChainFilters for ROBPrefetching
602  from TriggerJobOpts.TriggerConfigFlags import ROBPrefetching
603  if ROBPrefetching.InitialRoI in flags.Trigger.ROBPrefetchingOptions:
604  from TrigGenericAlgs.TrigGenericAlgsConfig import prefetchingInitialRoIConfig
605  menuAcc.merge(prefetchingInitialRoIConfig(flags, CFseq_list), 'HLTBeginSeq')
606 
607 
608  # Post-generation checks:
609  log.info("Checking the L1HLTConsistency...")
610  from TriggerMenuMT.HLT.Config.Validation.CheckL1HLTConsistency import checkL1HLTConsistency
611  checkL1HLTConsistency(flags)
612 
613  log.info("Checking the Coherent Prescale assignments...")
614  from TriggerMenuMT.HLT.Config.Validation.CheckCPSGroups import checkCPSGroups
615  checkCPSGroups(HLTMenuConfig.dictsList())
616 
617 
618  # Cleanup menu singletons to allow garbage collection (ATR-28855)
619  GenerateMenuMT.clear()
620  from TriggerMenuMT.HLT.Config import MenuComponents
621  MenuComponents._ComboHypoPool.clear()
622  MenuComponents._CustomComboHypoAllowed.clear()
623 
624  return menuAcc
625 
626 

◆ jointSignatures()

def GenerateMenuMT.jointSignatures ( )

Definition at line 20 of file GenerateMenuMT.py.

20 def jointSignatures():
21  return ['Bjet', 'Egamma', 'Combined']
22 

◆ makeHLTTree()

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

Definition at line 627 of file GenerateMenuMT.py.

627 def makeHLTTree(flags, chainConfigs):
628  """
629  Generate appropriate Control Flow Graph wiht all HLT algorithms
630  """
631  from TriggerMenuMT.HLT.Config.ControlFlow.HLTCFConfig import decisionTreeFromChains, sequenceScanner
632  from TriggerJobOpts.TriggerConfig import collectViewMakers
633  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
634  from AthenaCommon.CFElements import seqAND
635 
636  acc = ComponentAccumulator()
637  steps = seqAND('HLTAllSteps')
638  finalDecisions, CFseq_list, menuAcc = decisionTreeFromChains(flags, steps, chainConfigs, HLTMenuConfig.dictsList())
639  if log.getEffectiveLevel() <= logging.DEBUG:
640  menuAcc.printConfig()
641 
642  acc.merge(menuAcc)
643  successful_scan = sequenceScanner( steps )
644  if not successful_scan:
645  raise Exception("[makeHLTTree] At least one sequence is expected in more than one step. Check error messages and fix!")
646 
647  flatDecisions=[]
648  for step in finalDecisions:
649  flatDecisions.extend (step)
650 
651  viewMakers = collectViewMakers(steps)
652  viewMakerMap = {vm.name:vm for vm in viewMakers}
653  for vmname, vm in viewMakerMap.items():
654  log.debug(f"[makeHLTTree] {vmname} InputMakerOutputDecisions: {vm.InputMakerOutputDecisions}")
655  if vmname.endswith("_probe"):
656  try:
657  log.debug(f"Setting InputCachedViews on {vmname} to read decisions from tag leg {vmname[:-6]}: {vm.InputMakerOutputDecisions}")
658  vm.InputCachedViews = viewMakerMap[vmname[:-6]].InputMakerOutputDecisions
659  except KeyError: # We may be using a probe leg that has different reco from the tag
660  log.debug(f"Tag leg does not match probe: '{vmname[:-6]}', will not use cached views")
661 
662 
663  # Generate JSON representation of the config
664  from TriggerMenuMT.HLT.Config.JSON.HLTMenuJSON import generateJSON
665  generateJSON(flags, HLTMenuConfig.dictsList(), menuAcc.getSequence("HLTAllSteps"))
666 
667  # Store the HLTMonitoring json file
668  from TriggerMenuMT.HLT.Config.JSON.HLTMonitoringJSON import generateDefaultMonitoringJSON
669  generateDefaultMonitoringJSON(flags, HLTMenuConfig.dictsList())
670 
671 
672  from AthenaCommon.CFElements import checkSequenceConsistency
674  return acc, CFseq_list

◆ testSignatures()

def GenerateMenuMT.testSignatures ( )

Definition at line 26 of file GenerateMenuMT.py.

26 def testSignatures():
27  return ['Test']
28 

Variable Documentation

◆ _maxAllowedCustomCH

GenerateMenuMT._maxAllowedCustomCH
private

Definition at line 12 of file GenerateMenuMT.py.

◆ log

GenerateMenuMT.log

Definition at line 9 of file GenerateMenuMT.py.

GenerateMenuMT.calibCosmicMonSignatures
def calibCosmicMonSignatures()
Definition: GenerateMenuMT.py:14
GenerateMenuMT.allSignatures
def allSignatures()
Definition: GenerateMenuMT.py:32
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
GenerateMenuMT.defaultSignatures
def defaultSignatures()
Definition: GenerateMenuMT.py:23
python.TrigConfigSvcCfg.generateL1Menu
def generateL1Menu(flags)
Definition: TrigConfigSvcCfg.py:189
GenerateMenuMT.makeHLTTree
def makeHLTTree(flags, chainConfigs)
Definition: GenerateMenuMT.py:627
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:29
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:17
python.CFElements.checkSequenceConsistency
def checkSequenceConsistency(seq)
Definition: CFElements.py:69
GenerateMenuMT.generateMenuMT
def generateMenuMT(flags)
Definition: GenerateMenuMT.py:564
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
GenerateMenuMT.jointSignatures
def jointSignatures()
Definition: GenerateMenuMT.py:20
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:26