The Gaudi Framework  v36r9p1 (5c15b2bb)
AlgSequencer.py
Go to the documentation of this file.
1 
14 
15 from Configurables import (
16  GaudiExamplesCommonConf,
17  HelloWorld,
18  ParentAlg,
19  Prescaler,
20  StopperAlg,
21  TimingAuditor,
22 )
23 from Gaudi.Configuration import *
24 
25 GaudiExamplesCommonConf()
26 
27 # --------------------------------------------------------------
28 # Testing Sequencers
29 # --------------------------------------------------------------
30 p1 = Prescaler("Prescaler1", PercentPass=50.0, OutputLevel=WARNING)
31 p2 = Prescaler("Prescaler2", PercentPass=10.0, OutputLevel=WARNING)
32 h = HelloWorld(OutputLevel=DEBUG)
33 c1 = EventCounter("Counter1")
34 c2 = EventCounter("Counter2")
35 s1 = Sequencer("Sequence1", Members=[p1, h, c1])
36 s2 = Sequencer("Sequence2", Members=[p2, h, c2])
37 top = Sequencer("TopSequence", Members=[s1, s2], StopOverride=True)
38 
39 # -----------------------------------------------------------------
40 # Testing the new GaudiSequencer
41 # -----------------------------------------------------------------
43  "ANDSequence",
44  Members=[HelloWorld("AND"), EventCounter("ANDCounter")],
45  MeasureTime=1,
46 )
48  "ORSequence",
49  Members=[HelloWorld("OR"), EventCounter("ORCounter")],
50  MeasureTime=1,
51  ModeOR=1,
52 )
53 
54 # -----------------------------------------------------------------
56  TopAlg=[ParentAlg(), StopperAlg(StopCount=20), top, sand, sor],
57  EvtMax=10, # events to be processed (default is 10)
58  EvtSel="NONE", # do not use any event input
59  ExtSvc=["ToolSvc", "AuditorSvc"],
60  AuditAlgorithms=True,
61 )
62 
63 AuditorSvc().Auditors += [TimingAuditor("TIMER")]
Sequencer
ClassName: Sequencer.
Definition: Sequencer.h:35
EventCounter
Definition: EventCounter.h:14
AuditorSvc
Definition: AuditorSvc.h:28
Gaudi.Configuration
Definition: Configuration.py:1
GaudiSequencer
Definition: GaudiSequencer.h:38
ApplicationMgr
Definition: ApplicationMgr.h:57