13def generateChainConfigs(flags, chainDict ):
14
15 if log.isEnabledFor(logging.DEBUG):
16 log.debug('bjet full dictionary is: %s\n', pprint.pformat(chainDict))
17
18 listOfChainDicts = splitChainDict(chainDict)
19 listOfChainDefs = []
20
21 for subChainDict in listOfChainDicts:
22
23 jet_cfg = JetChainConfiguration(chainDict)
24 jet_cfg.prepareDataDependencies(flags)
25 jet = jet_cfg.assembleChain(flags)
26 jet_name = jet_cfg.jetName
27
28
29
30 if subChainDict['chainParts'][0]['signature'] != 'Bjet':
31 listOfChainDefs += [jet]
32 else:
33 log.debug('input jet collection name is: %s\n', jet_name)
34 Bjet = BjetChainConfiguration(subChainDict, jet_name).assembleChain(flags)
35 jet.append_bjet_steps(Bjet.steps)
36 listOfChainDefs += [ jet ]
37
38 if len(listOfChainDefs)>1:
39 theBjetChainDef = mergeChainDefs(listOfChainDefs, chainDict)
40 else:
41 theBjetChainDef = listOfChainDefs[0]
42
43 return theBjetChainDef