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 (
31 AvalancheSchedulerSvc,
52 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
60 slimeventloopmgr = HiveSlimEventLoopMgr(
61 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=DEBUG
71 scheduler = AvalancheSchedulerSvc(
72 ThreadPoolSize=threads, OutputLevel=INFO, VerboseSubSlots=
True
79 AlgResourcePool(OutputLevel=DEBUG)
85 a1 = Test__ViewTester(
"A1")
86 a1.baseViewName =
"viewOne"
87 a1.viewNumber = viewsPerEvt
88 a1.viewNodeName =
"viewNodeOne"
90 a2 = Test__ViewTester(
"A2")
92 a2.outKeys = [
"/Event/a2"]
94 a3 = Test__ViewTester(
"A3")
96 a3.inpKeys = [
"/Event/a2"]
98 a4 = Test__ViewTester(
"A4")
99 a4.baseViewName =
"viewTwo"
100 a4.viewNumber = viewsPerEvt
101 a4.viewNodeName =
"viewNodeTwo"
102 a4.outKeys = [
"/Event/a4"]
104 a5 = Test__ViewTester(
"A5")
106 a5.inpKeys = [
"/Event/a4"]
108 a6 = Test__ViewTester(
"A6")
111 a7 = Test__ViewTester(
"A7")
114 for algo
in [a1, a2, a3, a4, a5, a6, a7]:
115 algo.Cardinality = cardinality
116 algo.OutputLevel = DEBUG
118 viewNodeOne = Gaudi__Sequencer(
119 "viewNodeOne", Members=[a2, a3], Sequential=
False, ShortCircuit=
False
122 viewNodeTwo = Gaudi__Sequencer(
123 "viewNodeTwo", Members=[a5, a6], Sequential=
False, ShortCircuit=
False
126 createViewSeq = Gaudi__Sequencer(
128 Members=[a1, viewNodeOne, a4, viewNodeTwo, a7],
140 EventLoop=slimeventloopmgr,
141 TopAlg=[createViewSeq],
142 MessageSvcType=
"InertMessageSvc",