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