13 A test for isolating sub-slot data from the parent slot.
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 a sub-event context
21 - Algorithms A2 and A3 run within the sub-event, sharing data
22 - Algorithm A4 creates another sub-event contexts, and a data output
23 - Algorithms A5 and A6 run within the new sub-event, but cannot access data from A4
24 - Algorithm A7 runs in the whole event context, after the sub-events
26 The test should stall if isolation is working
29 from Configurables
import (HiveWhiteBoard, HiveSlimEventLoopMgr,
30 AvalancheSchedulerSvc, AlgResourcePool, CPUCruncher,
31 GaudiSequencer, Test__ViewTester)
46 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
54 slimeventloopmgr = HiveSlimEventLoopMgr(
55 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=DEBUG)
64 scheduler = AvalancheSchedulerSvc(
65 ThreadPoolSize=threads, OutputLevel=INFO, VerboseSubSlots=
True)
71 AlgResourcePool(OutputLevel=DEBUG)
77 a1 = Test__ViewTester(
"A1")
78 a1.baseViewName =
'viewOne'
79 a1.viewNumber = viewsPerEvt
80 a1.viewNodeName =
'viewNodeOne'
82 a2 = Test__ViewTester(
"A2")
84 a2.outKeys = [
'/Event/a2']
86 a3 = Test__ViewTester(
"A3")
88 a3.inpKeys = [
'/Event/a2'
91 a4 = Test__ViewTester(
"A4")
92 a4.baseViewName =
'viewTwo'
93 a4.viewNumber = viewsPerEvt
94 a4.viewNodeName =
'viewNodeTwo'
95 a4.outKeys = [
'/Event/a4']
97 a5 = Test__ViewTester(
"A5")
99 a5.inpKeys = [
'/Event/a4'
102 a6 = Test__ViewTester(
"A6")
105 a7 = Test__ViewTester(
"A7")
108 for algo
in [a1, a2, a3, a4, a5, a6, a7]:
109 algo.Cardinality = cardinality
110 algo.OutputLevel = DEBUG
112 viewNodeOne = GaudiSequencer(
113 "viewNodeOne", Members=[a2, a3], Sequential=
False, ShortCircuit=
False)
115 viewNodeTwo = GaudiSequencer(
116 "viewNodeTwo", Members=[a5, a6], Sequential=
False, ShortCircuit=
False)
118 createViewSeq = GaudiSequencer(
120 Members=[a1, viewNodeOne, a4, viewNodeTwo, a7],
131 EventLoop=slimeventloopmgr,
132 TopAlg=[createViewSeq],
133 MessageSvcType=
"InertMessageSvc")