13 Test the correct handling on errors during the event processing:
14 - The CPUCruncher is configured to return an ERROR on a fraction of the events
15 - The EventLoopMgr is configured to continue with the next event on ERROR
19 from Configurables
import (HiveWhiteBoard, HiveSlimEventLoopMgr,
20 AvalancheSchedulerSvc, AlgResourcePool, CPUCruncher,
21 InertMessageSvc, ApplicationMgr, CPUCrunchSvc)
28 whiteboard = HiveWhiteBoard(
"EventDataSvc", EventSlots=evtslots)
30 slimeventloopmgr = HiveSlimEventLoopMgr(
31 SchedulerName=
"AvalancheSchedulerSvc",
35 scheduler = AvalancheSchedulerSvc(ThreadPoolSize=threads, OutputLevel=DEBUG)
37 AlgResourcePool(OutputLevel=DEBUG)
38 CPUCrunchSvc(shortCalib=
True)
50 a1 = CPUCruncher(
"A1")
51 a1.outKeys = [
'/Event/a1']
53 a2 = CPUCruncher(
"A2")
54 a2.inpKeys = [
'/Event/a1']
55 a2.outKeys = [
'/Event/a2']
57 a3 = CPUCruncher(
"A3")
58 a3.inpKeys = [
'/Event/a1']
59 a3.outKeys = [
'/Event/a3']
62 a4 = CPUCruncher(
"A4")
63 a4.inpKeys = [
'/Event/a2']
64 a4.outKeys = [
'/Event/a4']
66 a5 = CPUCruncher(
"A5")
67 a5.inpKeys = [
'/Event/a3']
68 a5.outKeys = [
'/Event/a5']
70 for algo
in [a1, a2, a3, a4, a5]:
71 algo.Cardinality = cardinality
74 msgSvc = InertMessageSvc(
"MessageSvc", Format=
"% F%30W%S%4W%e%s%7W%R%T %0W%M")
75 ApplicationMgr().SvcMapping.append(msgSvc)
81 EventLoop=slimeventloopmgr,
82 TopAlg=[a1, a2, a3, a4, a5],
83 MessageSvcType=
"InertMessageSvc")