ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tools
PyJobTransforms
python
HelloWorldSkeleton.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2
3
import
sys
4
5
from
PyJobTransforms.CommonRunArgsToFlags
import
commonRunArgsToFlags
6
from
PyJobTransforms.TransformUtils
import
processPreExec, processPreInclude, processPostExec, processPostInclude
7
from
AthExHelloWorld.HelloWorldConfig
import
HelloWorldCfg
8
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
9
10
# force no legacy job properties
11
from
AthenaCommon
import
JobProperties
12
JobProperties.jobPropertiesDisallowed =
True
13
14
15
def
fromRunArgs
(runArgs):
16
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
17
flags = initConfigFlags()
18
19
commonRunArgsToFlags(runArgs, flags)
20
21
processPreInclude(runArgs, flags)
22
processPreExec(runArgs, flags)
23
24
if
'_ATHENA_GENERIC_INPUTFILE_NAME_'
in
flags.Input.Files:
25
flags.Input.Files = []
26
27
# To respect --athenaopts
28
flags.fillFromArgs()
29
30
# Run 10 events by default
31
if
flags.Exec.MaxEvents == -1:
32
flags.Exec.MaxEvents = 10
33
34
flags.lock()
35
36
cfg=MainServicesCfg(flags)
37
cfg.merge(HelloWorldCfg(flags))
38
39
processPostInclude(runArgs, flags, cfg)
40
processPostExec(runArgs, flags, cfg)
41
42
# Run the final accumulator
43
sc = cfg.run()
44
sys.exit(
not
sc.isSuccess())
python.HelloWorldSkeleton.fromRunArgs
fromRunArgs(runArgs)
Definition
HelloWorldSkeleton.py:15
Generated on
for ATLAS Offline Software by
1.17.0