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