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.
26 from Configurables
import (HiveWhiteBoard, HiveSlimEventLoopMgr,
27 AvalancheSchedulerSvc, AlgResourcePool, CPUCruncher,
28 GaudiSequencer, Test__ViewTester,
29 GaudiTesting__StopLoopAlg)
44 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
52 slimeventloopmgr = HiveSlimEventLoopMgr(
53 SchedulerName=
"AvalancheSchedulerSvc", OutputLevel=INFO)
62 scheduler = AvalancheSchedulerSvc(
63 ThreadPoolSize=threads, OutputLevel=INFO, VerboseSubSlots=
True)
69 AlgResourcePool(OutputLevel=INFO)
75 a1 = Test__ViewTester(
"A1")
76 a1.baseViewName =
'view'
77 a1.viewNumber = viewsPerEvt
78 a1.viewNodeName =
'viewNode'
80 a2 = Test__ViewTester(
"A2")
86 a3 = GaudiTesting__StopLoopAlg(
"A3", EventCount=3, Mode=
"exception")
88 a4 = Test__ViewTester(
"A4")
91 for algo
in [a1, a2, a3, a4]:
92 algo.Cardinality = cardinality
93 algo.OutputLevel = INFO
95 viewNode = GaudiSequencer(
102 createViewSeq = GaudiSequencer(
104 Members=[a1, viewNode, a4],
115 EventLoop=slimeventloopmgr,
116 TopAlg=[createViewSeq],
117 MessageSvcType=
"InertMessageSvc")