2 """Test a CF configuration with an algorithm shared between branches that can terminate early.""" 5 from Configurables
import HiveWhiteBoard, HiveSlimEventLoopMgr, AvalancheSchedulerSvc, AlgResourcePool
6 from Configurables
import GaudiSequencer, CPUCruncher
13 whiteboard = HiveWhiteBoard(
14 "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO)
16 slimeventloopmgr = HiveSlimEventLoopMgr(
17 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=DEBUG)
19 AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight, OutputLevel=DEBUG)
23 """ parallel OR sequencer """ 24 seq = GaudiSequencer(name)
26 seq.Sequential =
False 27 seq.ShortCircuit =
False 35 """ sequential AND sequencer """ 36 seq = GaudiSequencer(name)
40 seq.ShortCircuit =
True 46 topSequence = GaudiSequencer(
"topSequence")
50 filterA = CPUCruncher(
"filterA")
51 and1A.Members.append(filterA)
55 and1A.Members.append(and2A)
58 and2A.Members.append(orA)
62 orA.Members.append(and3A)
64 alg1 = CPUCruncher(
"Alg1")
65 and3A.Members.append(alg1)
67 hypoA = CPUCruncher(
"hypoA")
68 and2A.Members.append(hypoA)
73 filterB = CPUCruncher(
"filterB", InvertDecision=
True)
74 and1B.Members.append(filterB)
78 and1B.Members.append(and2B)
81 and2B.Members.append(orB)
85 orB.Members.append(and3B)
87 alg2 = CPUCruncher(
"Alg2")
88 and3B.Members.append(alg1)
90 hypoB = CPUCruncher(
"hypoB")
91 and2B.Members.append(hypoB)
95 topSequence.Members.append(and1A)
96 topSequence.Members.append(and1B)
102 EventLoop=slimeventloopmgr,
103 TopAlg=[topSequence],
104 MessageSvcType=
"InertMessageSvc",
def seqAND(name, subs=[])
The Application Manager class.