ATLAS Offline Software
Loading...
Searching...
No Matches
GenerateHeavyIonChainDefs.py
Go to the documentation of this file.
1# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2
3from AthenaCommon.Logging import logging
4logging.getLogger().info('Importing %s', __name__)
5log = logging.getLogger(__name__)
6
7from TriggerMenuMT.HLT.Config.Utility.ChainDictTools import splitChainDict
8from TriggerMenuMT.HLT.Config.Utility.ChainMerging import mergeChainDefs
9from .HeavyIonChainConfiguration import HeavyIonChainConfig
10
11def generateChainConfigs(flags, chainDict):
12
13 listOfChainDicts = splitChainDict(chainDict)
14 log.debug('Implement case for heavy ion chain with %d legs', len(listOfChainDicts))
15
16 listOfChainDefs = []
17
18 for subChainDict in listOfChainDicts:
19 HeavyIon = HeavyIonChainConfig(subChainDict).assembleChain(flags)
20
21 listOfChainDefs += [HeavyIon]
22 log.debug('length of chaindefs: %d', len(listOfChainDefs))
23
24 if len(listOfChainDefs) > 1:
25 log.debug('Implement case for multi-leg heavy ion chain')
26 theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
27 else:
28 theChainDef = listOfChainDefs[0]
29
30 log.debug('theChainDef %s', theChainDef)
31
32 return theChainDef
33