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]
53 if inspect.signature(comboHypoCfg).parameters
and all(inspect.signature(comboTool).parameters
for comboTool
in comboTools):
55 if 'flags' in inspect.signature(comboHypoCfg).parameters:
56 comboHypoCfg = functools.partial(comboHypoCfg, flags)
58 comboHypoCfg = functools.partial(comboHypoCfg)
59 return ChainStep(stepName, seqArray,
60 [self.
dict], comboHypoCfg = comboHypoCfg, comboToolConfs = comboTools)
63 raise RuntimeError(
"[getStep] No sequences generated for step %s!", stepName)
73 alignmentGroups = [self.
chainPart[
'alignmentGroup']]
76 alignmentGroups = [cp[
'alignmentGroup']
for cp
in self.
chainPart]
77 testAlignGrps = list(
set(alignmentGroups))
78 if not(len(testAlignGrps) == 1
and testAlignGrps[0] ==
'JetMET'):
79 log.error(
"ChainConfigurationBase.buildChain(): number of chainParts does not correspond chainSteps")
80 log.error(
'ChainConfigurationBase.buildChain() chainPart: %s',self.
chainPart)
81 log.error(
"ChainConfigurationBase.buildChain() alignmentGroups: %s", alignmentGroups)
82 log.error(
"ChainConfigurationBase.buildChain() chainName: %s", self.
chainName)
83 log.error(
"ChainConfigurationBase.buildChain() chainSteps: %s", chainSteps)
85 alignmentGroups = testAlignGrps
88 log.error(
"ChainConfigurationBase.buildChain(): chainPart is not a list or dict, not sure what to do here! %s ", self.
chainPart)
90 L1decision = mapThresholdToL1DecisionCollection(self.
L1Threshold)
92 ChainSteps = chainSteps,
93 L1decisions = [L1decision],
94 nSteps = [len(chainSteps)],
95 alignmentGroups = alignmentGroups