ATLAS Offline Software
Loading...
Searching...
No Matches
GenerateMinBiasChainDefs.py
Go to the documentation of this file.
1# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2
3from TriggerMenuMT.HLT.Config.Utility.ChainDictTools import splitChainDict
4from TriggerMenuMT.HLT.Config.Utility.ChainMerging import mergeChainDefs
5from .MinBiasChainConfiguration import MinBiasChainConfig
6
7
8from AthenaCommon.Logging import logging
9log = logging.getLogger( __name__ )
10log.debug("Importing %s",__name__)
11
12
13
14def 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