ATLAS Offline Software
Loading...
Searching...
No Matches
GenerateTestChainDefs.py
Go to the documentation of this file.
1# Copyright (C) 2002-2023 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 .TestChainConfiguration import TestChainConfiguration
6
7from AthenaCommon.Logging import logging
8log = logging.getLogger(__name__)
9log.debug("Importing %s",__name__)
10
11
12
13def generateChainConfigs(flags, chainDict ):
14
15 listOfChainDicts = splitChainDict(chainDict)
16 listOfChainDefs = []
17
18 for subChainDict in listOfChainDicts:
19 log.debug('Assembling subChainsDict %s for chain %s', len(listOfChainDefs), subChainDict['chainName'] )
20 Test = TestChainConfiguration(subChainDict).assembleChain(flags)
21
22 listOfChainDefs += [Test]
23
24
25 if len(listOfChainDefs)>1:
26 theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
27 else:
28 theChainDef = listOfChainDefs[0]
29
30 return theChainDef
31
32
33
34
35
36