| The Gaudi Framework v27r1

- 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'), EventCounter('ANDCounter') ],
36 MeasureTime = 1 )
37 sor = GaudiSequencer( 'ORSequence',
38 Members = [ HelloWorld('ORHelloWorld'), EventCounter('ORCounter') ],
39 MeasureTime = 1,
40 ModeOR = 1 )
41
42 #-----------------------------------------------------------------
43
44 topAlgList=[ParentAlg(), StopperAlg( StopCount=20 ), top, sand, sor ]
45
46 #-----------------------------------------------------------------
47 # Resource Pool
48 AlgResourcePool(OutputLevel = INFO )
49
50 #-----------------------------------------------------------------
51 # Event Loop Manager
52 slimeventloopmgr = HiveSlimEventLoopMgr(OutputLevel=INFO)
53
54 #-----------------------------------------------------------------
55 # Scheduler
56 # configured to be sequential: 1 evt in flight, no deps, 1 algo in flight
57 scheduler = ForwardSchedulerSvc(MaxEventsInFlight = 1,
58 MaxAlgosInFlight = 1,
59 OutputLevel=WARNING,
60 AlgosDependencies = [])
61
62 #-----------------------------------------------------------------
63 # WhiteBoard
64 whiteboard = HiveWhiteBoard("EventDataSvc",
65 EventSlots = 1)
66
67 #-----------------------------------------------------------------
68
69 ApplicationMgr( TopAlg = topAlgList,
70 EvtMax = 1,
71 EvtSel = 'NONE', # do not use any event input
72 ExtSvc = ['ToolSvc', 'AuditorSvc', whiteboard ],
73 EventLoop = slimeventloopmgr,
74 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:25
Gaudi.Configuration
Definition: Configuration.py:1
ForwardSchedulerSvc
The SchedulerSvc implements the IScheduler interface.
Definition: ForwardSchedulerSvc.h:73
AlgResourcePool
The AlgResourcePool is a concrete implementation of the IAlgResourcePool interface.
Definition: AlgResourcePool.h:34
HelloWorld
Trivial Algorithm for tutotial purposes.
Definition: HelloWorld.h:14
HiveWhiteBoard
Data service base class.
Definition: HiveWhiteBoard.cpp:87
ApplicationMgr
The Application Manager class.
Definition: ApplicationMgr.h:46
Sequencer
ClassName: Sequencer.
Definition: Sequencer.h:23
Prescaler
Definition: Prescaler.h:5