The Gaudi Framework  master (bdbe7744)
Loading...
Searching...
No Matches
AsyncTimeline.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 Gaudi.Configuration import *
21
22threads = 2
23offloadThreads = 2
24evtslots = 1
25
26# Configure parallel services
27slimeventloopmgr = HiveSlimEventLoopMgr(
28 SchedulerName="AvalancheSchedulerSvc", OutputLevel=ERROR
29)
30whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=evtslots)
32 ThreadPoolSize=threads, NumOffloadThreads=offloadThreads, OutputLevel=WARNING
33)
34
35# Application setup
37# - Algorithms
38singleSleepAlg = AsyncSleeperAlg(
39 "SingleSleepAlg", SuspensionDuration=100, SuspensionPoints=1
40) # Single suspension -> two timeline events
41doubleSleepAlg = AsyncSleeperAlg(
42 "DoubleSleepAlg", SuspensionDuration=100, SuspensionPoints=2
43) # Two suspensions -> three timeline events
44sleepersSequencer = Sequencer(
45 "Sleepers", Sequential=True, Members=[singleSleepAlg, doubleSleepAlg]
46) # No data dependencies between the two algorithms but executed in sequence due to the sequential flag.
47
48app.TopAlg = [sleepersSequencer]
49# - Events
50app.EvtMax = 2
51app.EvtSel = "NONE"
52app.HistogramPersistency = "NONE"
53app.EventLoop = slimeventloopmgr
54app.ExtSvc = [whiteboard]
55# - Activate timeline service
56TimelineSvc(RecordTimeline=True, DumpTimeline=True, TimelineFile="myAsyncTimeline.csv")
The Application Manager class.
Data service base class.