The Gaudi Framework
master (1bab3404)
Toggle main menu visibility
Loading...
Searching...
No Matches
AuditSuspension.py
Go to the documentation of this file.
1
11
12
from
Configurables
import
Gaudi__TestSuite__AsyncSleeperAlg
as
AsyncSleeperAlg
13
from
Configurables
import
TimelineSvc
14
from
Configurables
import
Gaudi__Sequencer
as
Sequencer
15
from
Configurables
import
(
16
AvalancheSchedulerSvc,
17
HiveSlimEventLoopMgr,
18
HiveWhiteBoard,
19
)
20
from
Configurables
import
GaudiTestSuite__LoggingAuditor
as
LoggingAuditor
21
from
Configurables
import
AuditorSvc
22
from
Gaudi.Configuration
import
*
23
24
25
threads = 2
26
offloadThreads = 2
27
evtslots = 1
28
29
# Configure parallel services
30
slimeventloopmgr =
HiveSlimEventLoopMgr
(
31
SchedulerName=
"AvalancheSchedulerSvc"
, OutputLevel=ERROR
32
)
33
whiteboard =
HiveWhiteBoard
(
"EventDataSvc"
, EventSlots=evtslots)
34
scheduler =
AvalancheSchedulerSvc
(
35
ThreadPoolSize=threads, NumOffloadThreads=offloadThreads, OutputLevel=WARNING
36
)
37
38
# Application setup
39
app =
ApplicationMgr
()
40
# - Algorithms
41
singleSleepAlg = AsyncSleeperAlg(
42
"SingleSleepAlg"
,
43
SuspensionDuration=100,
44
SuspensionPoints=1,
45
OutputLevel=WARNING,
46
)
# Single suspension -> two timeline events
47
doubleSleepAlg = AsyncSleeperAlg(
48
"DoubleSleepAlg"
,
49
SuspensionDuration=100,
50
SuspensionPoints=2,
51
OutputLevel=WARNING,
52
)
# Two suspensions -> three timeline events
53
sleepersSequencer = Sequencer(
54
"Sleepers"
,
55
Sequential=
True
,
56
Members=[singleSleepAlg, doubleSleepAlg],
57
)
# No data dependencies between the two algorithms but executed in sequence due to the sequential flag.
58
59
app.TopAlg = [sleepersSequencer]
60
# - Events
61
app.EvtMax = 2
62
app.EvtSel =
"NONE"
63
app.HistogramPersistency =
"NONE"
64
app.EventLoop = slimeventloopmgr
65
app.ExtSvc = [whiteboard]
66
app.AuditAlgorithms =
True
67
# - Activate timeline service
68
TimelineSvc
(RecordTimeline=
True
, DumpTimeline=
True
, TimelineFile=
"myAsyncTimeline.csv"
)
69
# - Activate auditor service
70
auditor =
LoggingAuditor
(
"Auditor"
)
71
AuditorSvc
(Auditors=[auditor])
ApplicationMgr
The Application Manager class.
Definition
ApplicationMgr.h:54
AuditorSvc
This service manages Auditors.
Definition
AuditorSvc.h:22
AvalancheSchedulerSvc
Definition
AvalancheSchedulerSvc.h:114
HiveSlimEventLoopMgr
Definition
HiveSlimEventLoopMgr.h:31
HiveWhiteBoard
Data service base class.
Definition
HiveWhiteBoard.cpp:100
LoggingAuditor
Simple auditor that prints the event being audited.
TimelineSvc
Definition
TimelineSvc.h:21
Gaudi.Configuration
Definition
Configuration.py:1
GaudiTestSuite
options
AuditSuspension.py
Generated on
for The Gaudi Framework by
1.17.0