ATLAS Offline Software
HelloWorldOptions.py
Go to the documentation of this file.
1 
6 
7 #--------------------------------------------------------------
8 # ATLAS default Application Configuration options
9 #--------------------------------------------------------------
10 import AthenaCommon.AtlasUnixStandardJob
11 
12 #--------------------------------------------------------------
13 # Private Application Configuration options
14 #--------------------------------------------------------------
15 
16 # Full job is a list of algorithms
17 from AthenaCommon.AlgSequence import AlgSequence
18 job = AlgSequence()
19 
20 # Add top algorithms to be run
21 from AthExHelloWorld.AthExHelloWorldConf import HelloAlg
22 job += 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)
29 job.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)
41 theApp.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
49 HelloWorld = job.HelloWorld
50 
51 # Set an int property
52 HelloWorld.MyInt = 42
53 
54 # Set a boolean property (False, True, 0, 1)
55 HelloWorld.MyBool = True
56 
57 # Set a double property
58 HelloWorld.MyDouble = 3.14159
59 
60 # Set a vector of strings property ...
61 HelloWorld.MyStringVec = [ "Welcome", "to", "Athena", "Framework", "Tutorial" ]
62 
63 # ... and add one more:
64 HelloWorld.MyStringVec += [ "!" ]
65 
66 # Set a map of strings to strings property ...
67 HelloWorld.MyDict = { 'Bonjour' : 'Guten Tag',
68  'Good Morning' : 'Bonjour' ,
69  'one' : 'ein',
70  'two' : 'dos',
71  'three' : 'trois' }
72 
73 # ... and add one more:
74 HelloWorld.MyDict[ "Goeiedag" ] = "Ni Hao"
75 
76 # Set a table (a vector of pairs of doubles) ...
77 HelloWorld.MyTable = [ ( 1 , 1 ) , ( 2 , 4 ) , ( 3 , 9 ) ]
78 
79 # ... and one more:
80 HelloWorld.MyTable += [ ( 4, 16 ) ]
81 
82 # Set a matrix (a vector of vectors) ...
83 HelloWorld.MyMatrix = [ [ 1, 2, 3 ],
84  [ 4, 5, 6 ] ]
85 
86 # ... and some more:
87 HelloWorld.MyMatrix += [ [ 7, 8, 9 ] ]
88 
89 #--------------------------------------------------------------
90 # Algorithms Tool Usage Private Options (advanced and optional)
91 #--------------------------------------------------------------
92 
93 # Import configurable for using our HelloTool
94 from AthExHelloWorld.AthExHelloWorldConf import HelloTool
95 
96 # Setup a public tool so that it can be used (again, note name)
97 ToolSvc += HelloTool( "PublicHello" )
98 ToolSvc.PublicHello.MyMessage = "A Public Message!"
99 
100 # Tell "HelloWorld" to use this tool ("MyPublicHelloTool" is a
101 # ToolHandle property of HelloAlg)
102 HelloWorld.MyPublicHelloTool = ToolSvc.PublicHello
103 
104 # Hand "HelloWorld" a private HelloTool ("MyPrivateHelloTool" is
105 # a ToolHandler property of HelloAlg)
106 HelloWorld.MyPrivateHelloTool = HelloTool( "HelloTool" )
107 HelloWorld.MyPrivateHelloTool.MyMessage = "A Private Message!"
108 
109 #==============================================================
110 #
111 # End of job options file
112 #
113 
114 
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7