All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.DataOutputs.output_0.Path = '/Event/a1'
26 
27 a2 = CPUCruncher("A2",
28  shortCalib=True)
29 a2.DataInputs.input_0.Path = '/Event/a1'
30 a2.DataOutputs.output_0.Path = '/Event/a2'
31 
32 a3 = CPUCruncher("A3",
33  shortCalib=True)
34 a3.DataInputs.input_0.Path = '/Event/a1'
35 a3.DataOutputs.output_0.Path = '/Event/a3'
36 
37 a4 = CPUCruncher("A4",
38  shortCalib=True)
39 a4.DataInputs.input_0.Path = '/Event/a2'
40 a4.DataInputs.input_1.Path = '/Event/a3'
41 a4.DataOutputs.output_0.Path = '/Event/a4'
42 
43 
44 for algo in [a1,a2,a3,a4]:
45  algo.OutputLevel=INFO
46 
47 ApplicationMgr( EvtMax = evtMax,
48  EvtSel = 'NONE',
49  ExtSvc =[whiteboard,algResPool],
50  EventLoop = slimeventloopmgr,
51  TopAlg = [a1,a2,a3,a4],
52  MessageSvcType="InertMessageSvc")
Thread safe extension to the standard MessageSvc.
The Application Manager class.