ATLAS Offline Software
Loading...
Searching...
No Matches
HelloWorldOptions.py
Go to the documentation of this file.
6
7#--------------------------------------------------------------
8# ATLAS default Application Configuration options
9#--------------------------------------------------------------
10import AthenaCommon.AtlasUnixStandardJob
11
12#--------------------------------------------------------------
13# Private Application Configuration options
14#--------------------------------------------------------------
15
16# Full job is a list of algorithms
17from AthenaCommon.AlgSequence import AlgSequence
18job = AlgSequence()
19
20# Add top algorithms to be run
21from AthExHelloWorld.AthExHelloWorldConf import HelloAlg
22job += HelloAlg( "HelloWorld" ) # 1 alg, named "HelloWorld"
23
24#--------------------------------------------------------------
25# Set output level threshold (DEBUG, INFO, WARNING, ERROR, FATAL)
26#--------------------------------------------------------------
27
28# Output level for HelloAlg only (note name: instance, not type)
29job.HelloWorld.OutputLevel = INFO
30
31# You can set the global output level on the message svc (not
32# recommended) or by using the -l athena CLI parameter
33
34#--------------------------------------------------------------
35# Event related parameters
36#--------------------------------------------------------------
37
38# Number of events to be processed (default is until the end of
39# input, or -1, however, since we have no input, a limit needs
40# to be set explicitly, here, choose 10)
41theApp.EvtMax = 10
42
43#--------------------------------------------------------------
44# Algorithms Private Options (all optional)
45#--------------------------------------------------------------
46
47# For convenience, get a reference to the HelloAlg Algorithm
48# named "HelloWorld" in the job
49HelloWorld = job.HelloWorld
50
51# Set an int property
52HelloWorld.MyInt = 42
53
54# Set a boolean property (False, True, 0, 1)
55HelloWorld.MyBool = True
56
57# Set a double property
58HelloWorld.MyDouble = 3.14159
59
60# Set a vector of strings property ...
61HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ]
62
63# ... and add one more:
64HelloWorld.MyStringVec += [ "!" ]
65
66# Set a map of strings to strings property ...
67HelloWorld.MyDict = { 'Bonjour' : 'Guten Tag',
68 'Good Morning' : 'Bonjour' ,
69 'one' : 'ein',
70 'two' : 'dos',
71 'three' : 'trois' }
72
73# ... and add one more:
74HelloWorld.MyDict[ "Goeiedag" ] = "Ni Hao"
75
76# Set a table (a vector of pairs of doubles) ...
77HelloWorld.MyTable = [ ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 9 ) ]
78
79# ... and one more:
80HelloWorld.MyTable += [ ( 4, 16 ) ]
81
82# Set a matrix (a vector of vectors) ...
83HelloWorld.MyMatrix = [ [ 1, 2, 3 ],
84 [ 4, 5, 6 ] ]
85
86# ... and some more:
87HelloWorld.MyMatrix += [ [ 7, 8, 9 ] ]
88
89#--------------------------------------------------------------
90# Algorithms Tool Usage Private Options (advanced and optional)
91#--------------------------------------------------------------
92
93# Import configurable for using our HelloTool
94from AthExHelloWorld.AthExHelloWorldConf import HelloTool
95
96# Setup a public tool so that it can be used (again, note name)
97ToolSvc += HelloTool( "PublicHello" )
98ToolSvc.PublicHello.MyMessage = "A Public Message!"
99
100# Tell "HelloWorld" to use this tool ("MyPublicHelloTool" is a
101# ToolHandle property of HelloAlg)
102HelloWorld.MyPublicHelloTool = ToolSvc.PublicHello
103
104# Hand "HelloWorld" a private HelloTool ("MyPrivateHelloTool" is
105# a ToolHandler property of HelloAlg)
106HelloWorld.MyPrivateHelloTool = HelloTool( "HelloTool" )
107HelloWorld.MyPrivateHelloTool.MyMessage = "A Private Message!"
108
109#==============================================================
110#
111# End of job options file
112#
113
114