Class to store the Step + its Filter (CFSequence) plus the chains and dictionaries of the legs using that step
Definition at line 173 of file HLTCFComponents.py.
◆ __init__()
def HLTCFComponents.CFGroup.__init__ |
( |
|
self, |
|
|
|
ChainStep, |
|
|
|
FilterAlg |
|
) |
| |
Definition at line 175 of file HLTCFComponents.py.
175 def __init__(self, ChainStep, FilterAlg):
178 self.comboToolConfs = []
179 self.createCFSequence(ChainStep, FilterAlg)
180 log.debug(
"CFGroup.__init: created for %s ",ChainStep.name)
◆ addStepLeg()
def HLTCFComponents.CFGroup.addStepLeg |
( |
|
self, |
|
|
|
newstep, |
|
|
|
chainName |
|
) |
| |
Definition at line 188 of file HLTCFComponents.py.
188 def addStepLeg(self, newstep, chainName):
189 self.stepDicts.
append(newstep.stepDicts)
190 self.chains.
append(chainName)
191 self.comboToolConfs.
append(newstep.comboToolConfs)
◆ connect()
def HLTCFComponents.CFGroup.connect |
( |
|
self, |
|
|
|
connections |
|
) |
| |
Connect filter to ChainStep (and all its sequences) through these connections (which are sets of filter outputs)
if a ChainStep contains the same sequence multiple times (for multi-leg chains),
the filter is connected only once (to avoid multiple DH links)
Definition at line 194 of file HLTCFComponents.py.
194 def connect(self, connections):
195 """Connect filter to ChainStep (and all its sequences) through these connections (which are sets of filter outputs)
196 if a ChainStep contains the same sequence multiple times (for multi-leg chains),
197 the filter is connected only once (to avoid multiple DH links)
199 if log.isEnabledFor(logging.DEBUG):
200 log.debug(
"CFGroup: connect Filter %s with %d menuSequences of step %s, using %d connections", self.sequenceCA.filterNode.Alg.name, len(self.sequenceCA.step.sequences), self.sequenceCA.step.name, len(connections))
201 log.debug(
" --- sequences: ")
202 for seq
in self.sequenceCA.step.sequences:
205 if len(connections) == 0:
206 log.error(
"No filter outputs are set!")
208 if len(self.sequenceCA.step.sequences):
210 if len(connections) != len(self.sequenceCA.step.sequences):
211 log.error(
"CFGroup: Found %d connections and %d MenuSequences in Step %s", len(connections), len(self.sequenceCA.step.sequences), self.sequenceCA.step.name)
212 raise Exception(
"[CFGroup] Connections and sequences do not match, this must be fixed!")
214 for nseq, seq
in enumerate(self.sequenceCA.step.sequences):
215 filter_out = connections[nseq]
216 log.debug(
"CFGroup: Found input %s to sequence::%s from Filter::%s", filter_out, seq.name, self.sequenceCA.filterNode.Alg.name)
217 seq.connectToFilter( filter_out )
219 log.debug(
"This CFGroup has no sequences: outputs are the Filter outputs, which are %d", len(self.sequenceCA.decisions))
◆ createCFSequence()
def HLTCFComponents.CFGroup.createCFSequence |
( |
|
self, |
|
|
|
ChainStep, |
|
|
|
FilterAlg |
|
) |
| |
This creates the CAs for the menu sequences, if fastMenu style, and the CFSequence
Definition at line 182 of file HLTCFComponents.py.
182 def createCFSequence(self, ChainStep, FilterAlg):
183 '''This creates the CAs for the menu sequences, if fastMenu style, and the CFSequence'''
184 log.debug(
"CFGroup.creating CFSEquence")
185 self.sequenceCA = CFSequence(ChainStep, FilterAlg)
186 return self.sequenceCA
◆ createHypoTools()
def HLTCFComponents.CFGroup.createHypoTools |
( |
|
self, |
|
|
|
flags |
|
) |
| |
set and create HypoTools accumulated on the self.step from an input step configuration
Definition at line 221 of file HLTCFComponents.py.
221 def createHypoTools(self, flags):
222 """ set and create HypoTools accumulated on the self.step from an input step configuration
224 if self.sequenceCA.step.combo
is None:
227 log.debug(
"CFGroup.createHypoTools for Step %s", self.sequenceCA.step.name)
228 for sdict
in self.stepDicts:
229 for seq, onePartChainDict
in zip(self.sequenceCA.step.sequences, sdict):
230 log.debug(
' seq: %s, onePartChainDict:', seq.name)
231 log.debug(
' %s', onePartChainDict)
232 if not isinstance(seq, EmptyMenuSequence):
233 hypoToolConf=seq.getHypoToolConf()
234 if hypoToolConf
is None:
235 log.error(
"HypoToolConf not found ", seq.name)
236 hypoToolConf.setConf( onePartChainDict )
237 hypo = HypoAlgNode(Alg = self.sequenceCA.ca.getEventAlgo(seq.hypo.Alg.getName()))
238 hypoToolAcc = hypo.addHypoTool(flags, hypoToolConf)
239 if isinstance(hypoToolAcc, ComponentAccumulator):
240 self.sequenceCA.ca.merge(hypoToolAcc)
242 for chain,conf
in zip(self.chains, self.comboToolConfs):
243 chainDict = HLTMenuConfig.getChainDictFromChainName(chain)
244 self.sequenceCA.step.combo.createComboHypoTools(flags, chainDict, conf)
◆ chains
HLTCFComponents.CFGroup.chains |
◆ comboToolConfs
HLTCFComponents.CFGroup.comboToolConfs |
◆ sequenceCA
HLTCFComponents.CFGroup.sequenceCA |
◆ stepDicts
HLTCFComponents.CFGroup.stepDicts |
The documentation for this class was generated from the following file: