ATLAS Offline Software
GenerateStreamingChainDefs.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 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 .StreamingChainConfiguration import StreamingChainConfiguration
6 
7 
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 ):
15 
16  listOfChainDicts = splitChainDict(chainDict)
17  log.debug("Will generate Config for streamer: %s", chainDict['chainName'])
18 
19  listOfChainDefs = []
20 
21  #streamers will never have more than one chainPart but this is still
22  #needed to move to the correct format [{}]->{}
23  for subChainDict in listOfChainDicts:
24 
25  Streaming = StreamingChainConfiguration(subChainDict).assembleChain(flags)
26 
27  listOfChainDefs += [Streaming]
28  log.debug('length of chaindefs %s', len(listOfChainDefs) )
29 
30  if len(listOfChainDefs)>1:
31  log.warning("This is a streamer with more than one chainPart, is this really intended?")
32  theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
33  else:
34  theChainDef = listOfChainDefs[0]
35 
36  log.debug("theChainDef %s" , theChainDef)
37 
38  return theChainDef
39 
python.HLT.CalibCosmicMon.StreamingChainConfiguration.StreamingChainConfiguration
Definition: StreamingChainConfiguration.py:12
python.HLT.CalibCosmicMon.GenerateStreamingChainDefs.generateChainConfigs
def generateChainConfigs(flags, chainDict)
Definition: GenerateStreamingChainDefs.py:14
ChainDictTools.splitChainDict
def splitChainDict(chainDict)
Definition: ChainDictTools.py:104
ChainMerging.mergeChainDefs
def mergeChainDefs(listOfChainDefs, chainDict, perSig_lengthOfChainConfigs=None)
Definition: ChainMerging.py:15