SequentialSchedulerSimpleTest.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, SequentialSchedulerSvc, CPUCruncher,AlgResourcePool
5 
6 InertMessageSvc(OutputLevel=INFO)
7 
8 # metaconfig
9 evtMax = 10
10 
11 scheduler = SequentialSchedulerSvc(OutputLevel=DEBUG)
12 
13 slimeventloopmgr = HiveSlimEventLoopMgr(SchedulerName="SequentialSchedulerSvc",
14  OutputLevel=DEBUG)
15 
16 whiteboard = HiveWhiteBoard("EventDataSvc")
17 
18 
19 algResPool=AlgResourcePool(OutputLevel=DEBUG)
20 
21 a1 = CPUCruncher("A1",
22  shortCalib=True,
23  varRuntime=.1,
24  avgRuntime=.5 )
25 a1.outKeys = ['/Event/a1']
26 
27 a2 = CPUCruncher("A2",
28  shortCalib=True)
29 a2.inpKeys = ['/Event/a1']
30 a2.outKeys = ['/Event/a2']
31 
32 a3 = CPUCruncher("A3",
33  shortCalib=True)
34 a3.inpKeys = ['/Event/a1']
35 a3.outKeys = ['/Event/a3']
36 
37 a4 = CPUCruncher("A4",
38  shortCalib=True)
39 a4.inpKeys = ['/Event/a2','/Event/a3']
40 a4.outKeys = ['/Event/a4']
41 
42 
43 for algo in [a1,a2,a3,a4]:
44  algo.OutputLevel=INFO
45 
46 ApplicationMgr( EvtMax = evtMax,
47  EvtSel = 'NONE',
48  ExtSvc =[whiteboard,algResPool],
49  EventLoop = slimeventloopmgr,
50  TopAlg = [a1,a2,a3,a4],
51  MessageSvcType="InertMessageSvc")
Thread safe extension to the standard MessageSvc.
The Application Manager class.