12 from Configurables
import AlgTimingAuditor, EventLoopMgr, GaudiTestSuiteCommonConf
21 GaudiTestSuiteCommonConf()
26 Example implementation of a SuperAlgorithm specialization with behaviour
27 depending on a property.
29 In this case the boolean option UseHelloWorld defines if the HelloWorld
30 instance has to be used or not.
35 self.__dict__[
"_hello_flag"] = kwargs.pop(
"UseHelloWorld",
True)
36 super(MySuperAlg, self).
__init__(*args, **kwargs)
51 Prepare the graph represented by the SuperAlgorithm.
53 from Configurables
import Gaudi__TestSuite__EventCounter
as EventCounter
54 from Configurables
import Gaudi__TestSuite__Prescaler
as Prescaler
55 from Configurables
import HelloWorld
57 p = self.
_makeAlg(Prescaler, name=
"Prescaler", PercentPass=50.0)
58 h = self.
_makeAlg(HelloWorld, name=
"HW")
59 c = self.
_makeAlg(EventCounter, name=
"Counter")
68 MySuperAlg(
"s2", PercentPass=75, OutputLevel=DEBUG, UseHelloWorld=
False)
70 print(
"# --- Configured Control Flow Expression:")
73 EventLoopMgr(PrintControlFlowExpression=
True)
80 ExtSvc=[
"ToolSvc",
"AuditorSvc",
"Gaudi::Monitoring::MessageSvcSink"],
84 AuditorSvc().Auditors.append(AlgTimingAuditor(
"TIMER"))