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