The Gaudi Framework  v36r1 (3e2fb5a8)
ModelDFAmbiguity.py
Go to the documentation of this file.
1 #!/usr/bin/env gaudirun.py
2 
12 """
13 A test modeling a production with subsequent modification of a data object. '/Event/B' experiences a conditional modification,
14 while '/Event/A' - an unconditional one:
15  (C): '/Event/B' <---- | UpdaterAlg3 (C) | ProducerAlg2 (C) |
16  (U): '/Event/A' <---- | UpdaterAlg2 (U) | ProducerAlg1 (C) | UpdaterAlg4 (U) | UpdaterAlg1 (C) |
17 """
18 
19 from Gaudi.Configuration import *
20 from Configurables import HiveWhiteBoard, HiveSlimEventLoopMgr, AvalancheSchedulerSvc, CPUCruncher, CPUCrunchSvc, PrecedenceSvc
21 
22 # metaconfig
23 evtMax = 1
24 evtslots = 1
25 algosInFlight = 1
26 
27 CPUCrunchSvc(shortCalib=True)
28 
29 PrecedenceSvc(OutputLevel=DEBUG)
30 
31 whiteboard = HiveWhiteBoard(
32  "EventDataSvc", EventSlots=evtslots, OutputLevel=INFO)
33 
34 slimeventloopmgr = HiveSlimEventLoopMgr(
35  SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO)
36 
37 AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight)
38 
39 producerAlg1 = CPUCruncher(name="ProducerAlg1")
40 producerAlg1.outKeys = ["/Event/A"]
41 
42 updaterAlg1 = CPUCruncher(name="UpdaterAlg1")
43 updaterAlg1.outKeys = ["/Event/A"]
44 
45 updaterAlg2 = CPUCruncher(name="UpdaterAlg2")
46 updaterAlg2.outKeys = ["/Event/A"]
47 
48 producerAlg2 = CPUCruncher(name="ProducerAlg2")
49 producerAlg2.inpKeys = ["/Event/A"]
50 producerAlg2.outKeys = ["/Event/B"]
51 
52 updaterAlg3 = CPUCruncher(name="UpdaterAlg3")
53 updaterAlg3.outKeys = ["/Event/B"]
54 
55 updaterAlg4 = CPUCruncher(name="UpdaterAlg4")
56 updaterAlg4.outKeys = ["/Event/A"]
57 
58 branch2 = GaudiSequencer(
59  "ConditionalBranch", Sequential=True, ShortCircuit=True)
60 branch2.Members = [producerAlg1, updaterAlg1, producerAlg2, updaterAlg3]
61 
62 branch = GaudiSequencer("UnConditionalBranch", ShortCircuit=False)
63 branch.Members = [branch2, updaterAlg2, updaterAlg4]
64 
66  EvtMax=evtMax,
67  EvtSel='NONE',
68  ExtSvc=[whiteboard],
69  EventLoop=slimeventloopmgr,
70  TopAlg=[branch],
71  MessageSvcType="InertMessageSvc",
72  OutputLevel=INFO)
Gaudi.Configuration
Definition: Configuration.py:1
GaudiSequencer
Definition: GaudiSequencer.h:38
ApplicationMgr
Definition: ApplicationMgr.h:57