The Gaudi Framework  master (37c0b60a)
DetectSCCinDF.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
12 """
13 A test modeling a cycle in the DF realm.
14 """
15 
16 from Configurables import (
17  AvalancheSchedulerSvc,
18  CPUCruncher,
19  CPUCrunchSvc,
20  HiveSlimEventLoopMgr,
21  HiveWhiteBoard,
22  PrecedenceSvc,
23 )
24 from Gaudi.Configuration import *
25 
26 # metaconfig
27 evtMax = 1
28 evtslots = 1
29 algosInFlight = 1
30 
31 CPUCrunchSvc(shortCalib=True)
32 
33 PrecedenceSvc(OutputLevel=DEBUG)
34 
35 whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots, OutputLevel=INFO)
36 
37 slimeventloopmgr = HiveSlimEventLoopMgr(
38  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO
39 )
40 
41 AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight)
42 
43 # Set up a data flow cycle ############
44 Alg1 = CPUCruncher(name="CycledAlg1")
45 Alg1.inpKeys = ["/Event/B", "/Event/F"]
46 Alg1.outKeys = ["/Event/C", "/Event/A"]
47 
48 Alg2 = CPUCruncher(name="CycledAlg2")
49 Alg2.inpKeys = ["/Event/C"]
50 Alg2.outKeys = ["/Event/D", "/Event/B"]
51 
52 Alg3 = CPUCruncher(name="CycledAlg3")
53 Alg3.inpKeys = ["/Event/D"]
54 Alg3.outKeys = ["/Event/F"]
55 
56 
57 Alg4 = CPUCruncher(name="Alg4")
58 Alg4.inpKeys = ["/Event/A"]
59 
60 Alg5 = CPUCruncher(name="Alg5")
61 Alg5.outKeys = ["/Event/E"]
62 
64  EvtMax=evtMax,
65  EvtSel="NONE",
66  ExtSvc=[whiteboard],
67  EventLoop=slimeventloopmgr,
68  TopAlg=[Alg1, Alg2, Alg3, Alg4, Alg5],
69  MessageSvcType="InertMessageSvc",
70  OutputLevel=INFO,
71 )
Gaudi.Configuration
Definition: Configuration.py:1
ApplicationMgr
Definition: ApplicationMgr.h:57