ATLAS Offline Software
GeneratePhotonChainDefs.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from TriggerMenuMT.HLT.Config.Utility.ChainDictTools import splitChainDict
4 from TriggerMenuMT.HLT.Config.Utility.ChainMerging import mergeChainDefs
5 from ..Photon.PhotonChainConfiguration import PhotonChainConfiguration
6 
7 import pprint
8 from AthenaCommon.Logging import logging
9 log = logging.getLogger(__name__)
10 log.debug("Importing %s",__name__)
11 
12 
13 
14 def generateChainConfigs(flags, chainDict, perSig_lengthOfChainConfigs):
15 
16  if log.isEnabledFor(logging.DEBUG): # pprint.pformat is expensive
17  log.debug('dictionary is: %s\n', pprint.pformat(chainDict))
18 
19  listOfChainDicts = splitChainDict(chainDict)
20  listOfChainDefs = []
21 
22  for subChainDict in listOfChainDicts:
23  log.debug('Assembling subChainsDict %s for chain %s', len(listOfChainDefs), subChainDict['chainName'] )
24  Photon = PhotonChainConfiguration(subChainDict).assembleChain(flags)
25 
26  listOfChainDefs += [Photon]
27 
28 
29  if len(listOfChainDefs)>1:
30  theChainDef, perSig_lengthOfChainConfigs = mergeChainDefs(listOfChainDefs, chainDict, perSig_lengthOfChainConfigs)
31  else:
32  theChainDef = listOfChainDefs[0]
33 
34  return theChainDef, perSig_lengthOfChainConfigs
35 
36 
37 
38 
39 
40 
python.HLT.Egamma.GeneratePhotonChainDefs.generateChainConfigs
def generateChainConfigs(flags, chainDict, perSig_lengthOfChainConfigs)
Definition: GeneratePhotonChainDefs.py:14
PhotonChainConfiguration
Definition: PhotonChainConfiguration.py:1
ChainDictTools.splitChainDict
def splitChainDict(chainDict)
Definition: ChainDictTools.py:104
ChainMerging.mergeChainDefs
def mergeChainDefs(listOfChainDefs, chainDict, perSig_lengthOfChainConfigs=None)
Definition: ChainMerging.py:15