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
25 from Configurables
import (
27 AvalancheSchedulerSvc,
49 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
57 slimeventloopmgr = HiveSlimEventLoopMgr(
58 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=INFO
68 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads, OutputLevel=INFO)
74 AlgResourcePool(OutputLevel=INFO)
80 a1 = Test__ViewTester(
"A1")
81 a1.baseViewName =
"view"
82 a1.viewNumber = viewsPerEvt
83 a1.viewNodeName =
"viewNode"
85 a2 = Test__ViewTester(
"A2")
88 a3 = Test__ViewTester(
"A3")
91 a4 = Test__ViewTester(
"A4")
94 for algo
in [a1, a2, a3, a4]:
95 algo.Cardinality = cardinality
96 algo.OutputLevel = INFO
98 viewNode = Gaudi__Sequencer(
99 "viewNode", Members=[a2, a3], Sequential=
False, ShortCircuit=
False, OutputLevel=INFO
102 createViewSeq = Gaudi__Sequencer(
103 "createViewSeq", Members=[a1, viewNode, a4], Sequential=
True, OutputLevel=INFO
113 EventLoop=slimeventloopmgr,
114 TopAlg=[createViewSeq],
115 MessageSvcType=
"InertMessageSvc",