RoundRobinSchedulerSimpleTest.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
3 from Gaudi.Configuration import *
4 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, RoundRobinSchedulerSvc, CPUCruncher,AlgResourcePool
5 
6 InertMessageSvc(OutputLevel=INFO)
7 
8 # metaconfig
9 evtMax = 10
10 
11 scheduler = RoundRobinSchedulerSvc(OutputLevel=DEBUG)
12 
13 slimeventloopmgr = HiveSlimEventLoopMgr(SchedulerName="RoundRobinSchedulerSvc",
14  OutputLevel=DEBUG)
15 
16 whiteboard = HiveWhiteBoard("EventDataSvc")
17 
18 
19 algResPool=AlgResourcePool(OutputLevel=DEBUG)
20 
21 a1 = CPUCruncher("A1",
22  DataOutputs = ['/Event/a1'],
23  shortCalib=True,
24  varRuntime=.1,
25  avgRuntime=.5 )
26 a2 = CPUCruncher("A2",
27  shortCalib=True,
28  DataInputs = ['/Event/a1'],
29  DataOutputs = ['/Event/a2'])
30 a3 = CPUCruncher("A3",
31  shortCalib=True,
32  DataInputs = ['/Event/a1'],
33  DataOutputs = ['/Event/a3'])
34 a4 = CPUCruncher("A4",
35  shortCalib=True,
36  DataInputs = ['/Event/a2','/Event/a3'],
37  DataOutputs = ['/Event/a4'])
38 
39 for algo in [a1,a2,a3,a4]:
40  algo.OutputLevel=INFO
41 
42 ApplicationMgr( EvtMax = evtMax,
43  EvtSel = 'NONE',
44  ExtSvc =[whiteboard,algResPool],
45  EventLoop = slimeventloopmgr,
46  TopAlg = [a1,a2,a3,a4],
47  MessageSvcType="InertMessageSvc")
Thread safe extension to the standard MessageSvc.
The Application Manager class.