13 A test for scheduling multiple sub-event contexts.
14 The main sequence has two steps of creating and running sub-events.
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 Seven 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 creates two more sub-event contexts
23 - Algorithms A5 and A6 run within the new sub-event contexts
24 - Algorithm A7 runs in the whole event context, after the sub-events
28 from Configurables
import (HiveWhiteBoard, HiveSlimEventLoopMgr,
29 AvalancheSchedulerSvc, AlgResourcePool, CPUCruncher,
30 GaudiSequencer, Test__ViewTester)
45 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
53 slimeventloopmgr = HiveSlimEventLoopMgr(
54 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=DEBUG)
63 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads, OutputLevel=INFO)
69 AlgResourcePool(OutputLevel=DEBUG)
75 a1 = Test__ViewTester(
"A1")
76 a1.baseViewName =
'viewOne'
77 a1.viewNumber = viewsPerEvt
78 a1.viewNodeName =
'viewNodeOne'
80 a2 = Test__ViewTester(
"A2")
83 a3 = Test__ViewTester(
"A3")
86 a4 = Test__ViewTester(
"A4")
87 a4.baseViewName =
'viewTwo'
88 a4.viewNumber = viewsPerEvt
89 a4.viewNodeName =
'viewNodeTwo'
91 a5 = Test__ViewTester(
"A5")
94 a6 = Test__ViewTester(
"A6")
97 a7 = Test__ViewTester(
"A7")
100 for algo
in [a1, a2, a3, a4, a5, a6, a7]:
101 algo.Cardinality = cardinality
102 algo.OutputLevel = DEBUG
104 viewNodeOne = GaudiSequencer(
105 "viewNodeOne", Members=[a2, a3], Sequential=
False, OutputLevel=VERBOSE)
107 viewNodeTwo = GaudiSequencer(
108 "viewNodeTwo", Members=[a5, a6], Sequential=
False, OutputLevel=VERBOSE)
110 createViewSeq = GaudiSequencer(
112 Members=[a1, viewNodeOne, a4, viewNodeTwo, a7],
123 EventLoop=slimeventloopmgr,
124 TopAlg=[createViewSeq],
125 MessageSvcType=
"InertMessageSvc")