4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
11 kwargs.setdefault(
"MyMessage",
"Hello World!")
13 result.setPrivateTools(CompFactory.HelloTool(name, **kwargs))
20 tool = CompFactory.HelloTool(name, MyMessage=
"Hello!", **kwargs)
22 tool.MyMessage =
"A public Message!"
24 result.addPublicTool(tool, primary=
True)
31 alg = CompFactory.HelloAlg(
"HelloWorld",
33 MyInt=flags.Input.JobNumber,
39 MyStringVec=[
"Welcome",
"to",
40 "Athena",
"Framework",
"Tutorial"],
42 MyDict={
"Bonjour":
"Guten Tag",
43 "Good Morning":
"Bonjour",
46 MyTable=[(1, 1), (2, 4), (3, 9)],
51 MyPrivateHelloTool=result.popToolsAndMerge(
54 MyPublicHelloTool=result.getPrimaryAndMerge(
59 result.addEventAlgo(alg)
63 if __name__ ==
"__main__":
64 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
65 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
67 flags.Exec.MaxEvents = 10
75 sys.exit(cfg.run().isFailure())