Loading [MathJax]/extensions/MathZoom.js
The Gaudi Framework  master (181af51f)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages Concepts
ModelDFAmbiguity.py
Go to the documentation of this file.
1#!/usr/bin/env gaudirun.py
2
12"""
13A test modeling a production with subsequent modification of a data object. '/Event/B' experiences a conditional modification,
14while '/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
19from Configurables import (
20 AvalancheSchedulerSvc,
21 CPUCruncher,
22 CPUCrunchSvc,
23 HiveSlimEventLoopMgr,
24 HiveWhiteBoard,
25 PrecedenceSvc,
26)
27from Gaudi.Configuration import *
28
29# metaconfig
30evtMax = 1
31evtslots = 1
32algosInFlight = 1
33
34CPUCrunchSvc(shortCalib=True)
35
36PrecedenceSvc(OutputLevel=DEBUG)
37
38whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots, OutputLevel=INFO)
39
40slimeventloopmgr = HiveSlimEventLoopMgr(
41 SchedulerName="AvalancheSchedulerSvc", OutputLevel=INFO
42)
43
44AvalancheSchedulerSvc(ThreadPoolSize=algosInFlight)
45
46producerAlg1 = CPUCruncher(name="ProducerAlg1")
47producerAlg1.outKeys = ["/Event/A"]
48
49updaterAlg1 = CPUCruncher(name="UpdaterAlg1")
50updaterAlg1.outKeys = ["/Event/A"]
51
52updaterAlg2 = CPUCruncher(name="UpdaterAlg2")
53updaterAlg2.outKeys = ["/Event/A"]
54
55producerAlg2 = CPUCruncher(name="ProducerAlg2")
56producerAlg2.inpKeys = ["/Event/A"]
57producerAlg2.outKeys = ["/Event/B"]
58
59updaterAlg3 = CPUCruncher(name="UpdaterAlg3")
60updaterAlg3.outKeys = ["/Event/B"]
61
62updaterAlg4 = CPUCruncher(name="UpdaterAlg4")
63updaterAlg4.outKeys = ["/Event/A"]
64
65branch2 = Gaudi__Sequencer("ConditionalBranch", Sequential=True, ShortCircuit=True)
66branch2.Members = [producerAlg1, updaterAlg1, producerAlg2, updaterAlg3]
67
68branch = Gaudi__Sequencer("UnConditionalBranch", ShortCircuit=False)
69branch.Members = [branch2, updaterAlg2, updaterAlg4]
70
72 EvtMax=evtMax,
73 EvtSel="NONE",
74 ExtSvc=[whiteboard],
75 EventLoop=slimeventloopmgr,
76 TopAlg=[branch],
77 MessageSvcType="InertMessageSvc",
78 OutputLevel=INFO,
79)
The Application Manager class.
A class that implements a search for prime numbers.
Definition CPUCruncher.h:30
Data service base class.
A service to resolve the task execution precedence.