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