46 def getStep(self, flags, stepName, sequenceCfgArray, comboHypoCfg=ComboHypoCfg, comboTools=[], **stepArgs):
47 log.debug(
"Configuring step %s with %d chainParts", stepName, len(self.
dict[
'chainParts']))
50 seqArray = [functools.partial(gen, flags, **stepArgs)
for gen
in sequenceCfgArray]
54 if 'flags' in inspect.signature(comboHypoCfg).parameters:
55 comboHypoCfg = functools.partial(comboHypoCfg, flags)
57 comboHypoCfg = functools.partial(comboHypoCfg)
58 return ChainStep(stepName, seqArray,
59 [self.
dict], comboHypoCfg = comboHypoCfg, comboToolConfs = comboTools)
62 raise RuntimeError(
"[getStep] No sequences generated for step %s!", stepName)
72 alignmentGroups = [self.
chainPart[
'alignmentGroup']]
75 alignmentGroups = [cp[
'alignmentGroup']
for cp
in self.
chainPart]
76 testAlignGrps = list(
set(alignmentGroups))
77 if not(len(testAlignGrps) == 1
and testAlignGrps[0] ==
'JetMET'):
78 log.error(
"ChainConfigurationBase.buildChain(): number of chainParts does not correspond chainSteps")
79 log.error(
'ChainConfigurationBase.buildChain() chainPart: %s',self.
chainPart)
80 log.error(
"ChainConfigurationBase.buildChain() alignmentGroups: %s", alignmentGroups)
81 log.error(
"ChainConfigurationBase.buildChain() chainName: %s", self.
chainName)
82 log.error(
"ChainConfigurationBase.buildChain() chainSteps: %s", chainSteps)
84 alignmentGroups = testAlignGrps
87 log.error(
"ChainConfigurationBase.buildChain(): chainPart is not a list or dict, not sure what to do here! %s ", self.
chainPart)
89 L1decision = mapThresholdToL1DecisionCollection(self.
L1Threshold)
91 ChainSteps = chainSteps,
92 L1decisions = [L1decision],
93 nSteps = [len(chainSteps)],
94 alignmentGroups = alignmentGroups