13 A test for an incorrect handling of exceptions from algorithms running in sub-slots
15 Throwing an exception causes the event to be marked as failed.
16 It also means that the part of the code that updates the algorithm state is bypassed.
17 Since the AlgExecStateSvc does not (currently) understand sub-slots,
18 if the exception is thrown by an alg in sub-slot 2, the state for that same alg
19 in sub-slot 1 is retrieved.
21 So, it is possible to have a failed event, without any algorihms in ERROR state.
22 The scheduler does not have handling for this, and hangs.
25 from Configurables
import (
27 AvalancheSchedulerSvc,
30 GaudiTesting__StopLoopAlg,
50 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
58 slimeventloopmgr = HiveSlimEventLoopMgr(
59 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=INFO
69 scheduler = AvalancheSchedulerSvc(
70 ThreadPoolSize=threads, OutputLevel=INFO, VerboseSubSlots=
True
77 AlgResourcePool(OutputLevel=INFO)
83 a1 = Test__ViewTester(
"A1")
84 a1.baseViewName =
"view"
85 a1.viewNumber = viewsPerEvt
86 a1.viewNodeName =
"viewNode"
88 a2 = Test__ViewTester(
"A2")
94 a3 = GaudiTesting__StopLoopAlg(
"A3", EventCount=3, Mode=
"exception")
96 a4 = Test__ViewTester(
"A4")
99 for algo
in [a1, a2, a3, a4]:
100 algo.Cardinality = cardinality
101 algo.OutputLevel = INFO
103 viewNode = GaudiSequencer(
104 "viewNode", Members=[a2, a3], Sequential=
False, ShortCircuit=
False, OutputLevel=INFO
107 createViewSeq = GaudiSequencer(
108 "createViewSeq", Members=[a1, viewNode, a4], Sequential=
True, OutputLevel=INFO
118 EventLoop=slimeventloopmgr,
119 TopAlg=[createViewSeq],
120 MessageSvcType=
"InertMessageSvc",