11 from __future__
import print_function
17 from Configurables
import TimingAuditor, EventLoopMgr
21 from Configurables
import GaudiExamplesCommonConf
23 GaudiExamplesCommonConf()
28 Example implementation of a SuperAlgorithm specialization with behaviour
29 depending on a property.
31 In this case the boolean option UseHelloWorld defines if the HelloWorld
32 instance has to be used or not.
37 self.__dict__[
'_hello_flag'] = kwargs.pop(
'UseHelloWorld',
True)
38 super(MySuperAlg, self).
__init__(*args, **kwargs)
53 Prepare the graph represented by the SuperAlgorithm.
55 from Configurables
import Prescaler, HelloWorld, EventCounter
56 p = self.
_makeAlg(Prescaler, PercentPass=50.)
57 h = self.
_makeAlg(HelloWorld, name=
'HW')
58 c = self.
_makeAlg(EventCounter, name=
'Counter')
67 MySuperAlg(
's2', PercentPass=75, OutputLevel=DEBUG, UseHelloWorld=
False)
69 print(
'# --- Configured Control Flow Expression:')
72 EventLoopMgr(PrintControlFlowExpression=
True)
79 ExtSvc=[
'ToolSvc',
'AuditorSvc'],
82 AuditorSvc().Auditors.append(TimingAuditor(
"TIMER"))