14def generateChainConfigs(flags, chainDict ):
15
16 if log.isEnabledFor(logging.DEBUG):
17 log.debug('dictionary is: %s\n', pprint.pformat(chainDict))
18
19 listOfChainDicts = splitChainDict(chainDict)
20 log.debug("Implement case for met chain with %d legs ",len(listOfChainDicts))
21
22 listOfChainDefs = []
23
24 for subChainDict in listOfChainDicts:
25
26 MET = METChainConfiguration(subChainDict).assembleChain(flags)
27
28 listOfChainDefs += [MET]
29 log.debug('length of chaindefs %s', len(listOfChainDefs) )
30
31
32 if len(listOfChainDefs)>1:
33 log.debug("Implement case for mulit-leg met chain")
34 theChainDef = mergeChainDefs(listOfChainDefs, chainDict)
35 else:
36 theChainDef = listOfChainDefs[0]
37
38 log.debug("theChainDef %s" , theChainDef)
39
40 return theChainDef