336 def __init__(self, flags, selectionCA, HypoToolGen):
337 self.ca = selectionCA
338
339 self.hypoAcc = selectionCA.hypoAcc
340
341 sequence = self.ca.topSequence()
342 self._sequence = Node(Alg=sequence)
343
344
345 inputMaker = [ a for a in self.ca.getEventAlgos() if isInputMakerBase(a)]
346 assert len(inputMaker) == 1, f"{len(inputMaker)} input makers in the ComponentAccumulator"
347 inputMaker = inputMaker[0]
348 assert inputMaker.name.startswith("IM"), f"Input maker {inputMaker.name} name needs to start with 'IM'"
349 self._maker = InputMakerNode( Alg = inputMaker )
350 input_maker_output = self.maker.readOutputList()[0]
351
352
353
354 hypoAlg = selectionCA.hypoAcc.getEventAlgos()
355 assert len(hypoAlg) == 1, f"{len(hypoAlg)} hypo algs in the ComponentAccumulator"
356 hypoAlg = hypoAlg[0]
357 hypoAlg.RuntimeValidation = flags.Trigger.doRuntimeNaviVal
358
359 self._name = CFNaming.menuSequenceName(hypoAlg.name)
360 self._hypo = HypoAlgNode( Alg = hypoAlg )
361 self._hypo.addOutput( CFNaming.hypoAlgOutName(hypoAlg.name) )
362 self._hypo.setPreviousDecision( input_maker_output )
363 self._hypoToolConf = HypoToolConf( HypoToolGen )
364
365 log.debug("connecting InputMaker and HypoAlg, adding: InputMaker::%s.output=%s",
366 self.maker.Alg.name, input_maker_output)
367 log.debug("HypoAlg::%s.HypoInputDecisions=%s, HypoAlg::%s.HypoOutputDecisions=%s",
368 self.hypo.Alg.name, self.hypo.readInputList()[0],
369 self.hypo.Alg.name, self.hypo.readOutputList()[0])
370