Class to store the Step + its Filter (CFSequence) plus the chains and dictionaries of the legs using that step
Definition at line 171 of file HLTCFComponents.py.
◆ __init__()
def HLTCFComponents.CFGroup.__init__ |
( |
|
self, |
|
|
|
ChainStep, |
|
|
|
FilterAlg |
|
) |
| |
Definition at line 173 of file HLTCFComponents.py.
173 def __init__(self, ChainStep, FilterAlg):
176 self.comboToolConfs = []
177 self.createCFSequence(ChainStep, FilterAlg)
178 log.debug(
"CFGroup.__init: created for %s ",ChainStep.name)
◆ addStepLeg()
def HLTCFComponents.CFGroup.addStepLeg |
( |
|
self, |
|
|
|
newstep, |
|
|
|
chainName |
|
) |
| |
Definition at line 186 of file HLTCFComponents.py.
186 def addStepLeg(self, newstep, chainName):
187 self.stepDicts.
append(newstep.stepDicts)
188 self.chains.
append(chainName)
189 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 192 of file HLTCFComponents.py.
192 def connect(self, connections):
193 """Connect filter to ChainStep (and all its sequences) through these connections (which are sets of filter outputs)
194 if a ChainStep contains the same sequence multiple times (for multi-leg chains),
195 the filter is connected only once (to avoid multiple DH links)
197 if log.isEnabledFor(logging.DEBUG):
198 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))
199 log.debug(
" --- sequences: ")
200 for seq
in self.sequenceCA.step.sequences:
203 if len(connections) == 0:
204 log.error(
"No filter outputs are set!")
206 if len(self.sequenceCA.step.sequences):
208 if len(connections) != len(self.sequenceCA.step.sequences):
209 log.error(
"CFGroup: Found %d connections and %d MenuSequences in Step %s", len(connections), len(self.sequenceCA.step.sequences), self.sequenceCA.step.name)
210 raise Exception(
"[CFGroup] Connections and sequences do not match, this must be fixed!")
212 for nseq, seq
in enumerate(self.sequenceCA.step.sequences):
213 filter_out = connections[nseq]
214 log.debug(
"CFGroup: Found input %s to sequence::%s from Filter::%s", filter_out, seq.name, self.sequenceCA.filterNode.Alg.name)
215 seq.connectToFilter( filter_out )
217 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 180 of file HLTCFComponents.py.
180 def createCFSequence(self, ChainStep, FilterAlg):
181 '''This creates the CAs for the menu sequences, if fastMenu style, and the CFSequence'''
182 log.debug(
"CFGroup.creating CFSEquence")
183 self.sequenceCA = CFSequence(ChainStep, FilterAlg)
184 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 219 of file HLTCFComponents.py.
219 def createHypoTools(self, flags):
220 """ set and create HypoTools accumulated on the self.step from an input step configuration
222 if self.sequenceCA.step.combo
is None:
225 log.debug(
"CFGroup.createHypoTools for Step %s", self.sequenceCA.step.name)
226 for sdict
in self.stepDicts:
227 for seq, onePartChainDict
in zip(self.sequenceCA.step.sequences, sdict):
228 log.debug(
' seq: %s, onePartChainDict:', seq.name)
229 log.debug(
' %s', onePartChainDict)
230 if not isinstance(seq, EmptyMenuSequence):
231 hypoToolConf=seq.getHypoToolConf()
232 if hypoToolConf
is None:
233 log.error(
"HypoToolConf not found ", seq.name)
234 hypoToolConf.setConf( onePartChainDict )
235 hypo = HypoAlgNode(Alg = self.sequenceCA.ca.getEventAlgo(seq.hypo.Alg.getName()))
236 hypoToolAcc = hypo.addHypoTool(flags, hypoToolConf)
237 if isinstance(hypoToolAcc, ComponentAccumulator):
238 self.sequenceCA.ca.merge(hypoToolAcc)
240 for chain,conf
in zip(self.chains, self.comboToolConfs):
241 chainDict = HLTMenuConfig.getChainDictFromChainName(chain)
242 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: