The Gaudi Framework  master (cc9a61f4)
Loading...
Searching...
No Matches
ReEntAlgResources.py
Go to the documentation of this file.
11
12from Configurables import (
13 AlgResourcePool,
14 AvalancheSchedulerSvc,
15 HiveSlimEventLoopMgr,
16 HiveWhiteBoard,
17 ReEntAlg,
18)
19from Gaudi.Configuration import ApplicationMgr, WARNING
20
21nSlots = 4
22nThread = 4
23
24scheduler = AvalancheSchedulerSvc(ThreadPoolSize=nThread)
25slimeventloopmgr = HiveSlimEventLoopMgr(SchedulerName=scheduler)
26whiteboard = HiveWhiteBoard("EventDataSvc", EventSlots=nSlots)
27
28# Configure available and needed resources. Even though enough threads/slots
29# are available, the algorithm should only be executed concurrently up to the
30# available number of "Tokens".
31algResourcePool = AlgResourcePool(
32 AvailableResources={"Tokens": 2, "Dummy": 100}, MissingResourceMessageLevel=WARNING
33)
34
35myralg = ReEntAlg("ReEntAlg", SleepFor=1000, NeededResources={"Tokens": 1, "Dummy": 5})
36
38 EvtMax=5,
39 EvtSel="NONE",
40 HistogramPersistency="NONE",
41 EventLoop=slimeventloopmgr,
42 ExtSvc=[algResourcePool, whiteboard],
43 TopAlg=[myralg],
44 MessageSvcType="InertMessageSvc",
45)
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
The Application Manager class.
Data service base class.
an algorithm to test reentrant Algorithms
Definition ReEntAlg.h:19