13 A test for basic functionality of sub-event scheduling.
14 Algorithms A2 and A3 should run twice per event, in sub-event contexts.
16 The ViewTester is an algorithm specifically designed to create sub-event
17 contexts, pass them to the scheduler, and report on the current context.
19 Four instances of ViewTester are used as follows:
20 - Algorithm A1 creates two sub-event contexts
21 - Algorithms A2 and A3 run within the sub-event contexts
22 - Algorithm A4 runs in the whole event context, after the sub-events
26 from Configurables
import (
28 AvalancheSchedulerSvc,
50 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
58 slimeventloopmgr = HiveSlimEventLoopMgr(
59 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=INFO
69 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads, OutputLevel=INFO)
75 AlgResourcePool(OutputLevel=INFO)
81 a1 = Test__ViewTester(
"A1")
82 a1.baseViewName =
"view"
83 a1.viewNumber = viewsPerEvt
84 a1.viewNodeName =
"viewNode"
86 a2 = Test__ViewTester(
"A2")
89 a3 = Test__ViewTester(
"A3")
92 a4 = Test__ViewTester(
"A4")
95 for algo
in [a1, a2, a3, a4]:
96 algo.Cardinality = cardinality
97 algo.OutputLevel = INFO
99 viewNode = Gaudi__Sequencer(
100 "viewNode", Members=[a2, a3], Sequential=
False, ShortCircuit=
False, OutputLevel=INFO
103 createViewSeq = Gaudi__Sequencer(
104 "createViewSeq", Members=[a1, viewNode, a4], Sequential=
True, OutputLevel=INFO
114 EventLoop=slimeventloopmgr,
115 TopAlg=[createViewSeq],
116 MessageSvcType=
"InertMessageSvc",