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