| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

HiveAlgSequencer.py
Go to the documentation of this file.
1 ###############################################################
2 # Job options file
3 #==============================================================
4
5 from Gaudi.Configuration import *
6 from Configurables import ParentAlg,\
7 StopperAlg,\
8 Prescaler,\
9 HelloWorld,\
10 TimingAuditor,\
11 AlgResourcePool,\
12 HiveSlimEventLoopMgr,\
13 ForwardSchedulerSvc,\
14 HiveWhiteBoard
15
16 from Configurables import GaudiExamplesCommonConf
17 GaudiExamplesCommonConf()
18
19 #--------------------------------------------------------------
20 # Testing Sequencers
21 #--------------------------------------------------------------
22 p1 = Prescaler('Prescaler1', PercentPass=50., OutputLevel=INFO)
23 p2 = Prescaler('Prescaler2', PercentPass=10., OutputLevel=INFO)
24 h = HelloWorld(OutputLevel=INFO)
25 c1 = EventCounter('Counter1')
26 c2 = EventCounter('Counter2')
27 s1 = Sequencer('Sequence1', Members=[p1, h, c1])
28 s2 = Sequencer('Sequence2', Members=[p2, h, c2])
29 top = Sequencer('TopSequence', Members=[s1, s2], StopOverride=True)
30
31 #-----------------------------------------------------------------
32 # Testing the new GaudiSequencer
33 #-----------------------------------------------------------------
34 sand = GaudiSequencer('ANDSequence',
35 Members=[HelloWorld('ANDHelloWorld'),
36 EventCounter('ANDCounter')],
37 MeasureTime=1)
38 sor = GaudiSequencer('ORSequence',
39 Members=[HelloWorld('ORHelloWorld'),
40 EventCounter('ORCounter')],
41 MeasureTime=1,
42 ModeOR=1)
43
44 #-----------------------------------------------------------------
45
46 topAlgList = [ParentAlg(), StopperAlg(StopCount=20), top, sand, sor]
47
48 #-----------------------------------------------------------------
49 # Resource Pool
50 AlgResourcePool(OutputLevel=INFO)
51
52 #-----------------------------------------------------------------
53 # Event Loop Manager
54 slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
55
56 #-----------------------------------------------------------------
57 # Scheduler
58 # configured to be sequential: 1 evt in flight, no deps, 1 algo in flight
59 scheduler = ForwardSchedulerSvc(MaxEventsInFlight=1,
60 MaxAlgosInFlight=1,
61 OutputLevel=WARNING,
62 AlgosDependencies=[])
63
64 #-----------------------------------------------------------------
65 # WhiteBoard
66 whiteboard = HiveWhiteBoard("EventDataSvc",
67 EventSlots=1)
68
69 #-----------------------------------------------------------------
70
71 ApplicationMgr(TopAlg=topAlgList,
72 EvtMax=1,
73 EvtSel='NONE', # do not use any event input
74 ExtSvc=['ToolSvc', 'AuditorSvc', whiteboard],
75 EventLoop=slimeventloopmgr,
76 MessageSvcType="InertMessageSvc")
EventCounter
Definition: EventCounter.h:4
GaudiSequencer
Sequencer for executing several algorithms, stopping when one is faulty.
Definition: GaudiSequencer.h:26
HiveSlimEventLoopMgr
Definition: HiveSlimEventLoopMgr.h:26
Gaudi.Configuration
Definition: Configuration.py:1
ForwardSchedulerSvc
The SchedulerSvc implements the IScheduler interface.
Definition: ForwardSchedulerSvc.h:83
AlgResourcePool
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
Definition: AlgResourcePool.h:31
HiveWhiteBoard
Data service base class.
Definition: HiveWhiteBoard.cpp:95
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:47
Sequencer
ClassName: Sequencer.
Definition: Sequencer.h:23
Prescaler
Definition: Prescaler.h:5