ATLAS Offline Software
GenerateMinBiasChainDefs.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 .MinBiasChainConfiguration import MinBiasChainConfig
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("Implement case for minbias chain with %d legs ",len(listOfChainDicts))
18 
19  listOfChainDefs = []
20 
21  for subChainDict in listOfChainDicts:
22 
23  MinBias = MinBiasChainConfig(subChainDict).assembleChain(flags)
24 
25  listOfChainDefs += [MinBias]
26  log.debug('length of chaindefs %s', len(listOfChainDefs) )
27 
28 
29  if len(listOfChainDefs)>1:
30  log.debug("Implement case for mulit-leg minbias chain")
31  theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
32  else:
33  theChainDef = listOfChainDefs[0]
34 
35  log.debug("theChainDef %s" , theChainDef)
36 
37  return theChainDef
python.HLT.MinBias.MinBiasChainConfiguration.MinBiasChainConfig
Definition: MinBiasChainConfiguration.py:16
python.HLT.MinBias.GenerateMinBiasChainDefs.generateChainConfigs
def generateChainConfigs(flags, chainDict)
Definition: GenerateMinBiasChainDefs.py:14
ChainDictTools.splitChainDict
def splitChainDict(chainDict)
Definition: ChainDictTools.py:104
ChainMerging.mergeChainDefs
def mergeChainDefs(listOfChainDefs, chainDict, perSig_lengthOfChainConfigs=None)
Definition: ChainMerging.py:15