11 from __future__
import print_function
13 from Configurables
import EventLoopMgr, GaudiExamplesCommonConf, TimingAuditor
22 GaudiExamplesCommonConf()
27 Example implementation of a SuperAlgorithm specialization with behaviour
28 depending on a property.
30 In this case the boolean option UseHelloWorld defines if the HelloWorld
31 instance has to be used or not.
36 self.__dict__[
"_hello_flag"] = kwargs.pop(
"UseHelloWorld",
True)
37 super(MySuperAlg, self).
__init__(*args, **kwargs)
52 Prepare the graph represented by the SuperAlgorithm.
54 from Configurables
import EventCounter, HelloWorld, Prescaler
56 p = self.
_makeAlg(Prescaler, PercentPass=50.0)
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"],
83 AuditorSvc().Auditors.append(TimingAuditor(
"TIMER"))