ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Reconstruction
RecJobTransforms
python
RDOtoRDO_TRIG_Skeleton.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
from
PyJobTransforms.TransformUtils
import
processPreExec, processPreInclude, processPostExec, processPostInclude
4
from
TriggerJobOpts
import
runHLT
5
from
PerfMonComps.PerfMonCompsConfig
import
PerfMonMTSvcCfg
6
7
from
AthenaCommon.Logging
import
logging
8
log = logging.getLogger(
'RDOtoRDO_TRIG'
)
9
10
# force no legacy job properties
11
from
AthenaCommon
import
JobProperties
12
JobProperties.jobPropertiesDisallowed =
True
13
14
15
def
configureFlags
(runArgs):
16
# some basic settings here...
17
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
18
flags = initConfigFlags()
19
from
PyJobTransforms.CommonRunArgsToFlags
import
commonRunArgsToFlags
20
commonRunArgsToFlags(runArgs, flags)
21
22
# Set standard flags for HLT jobs
23
runHLT.set_flags(flags)
24
25
# Input
26
if
hasattr(runArgs,
'inputRDOFile'
):
27
flags.Input.Files = runArgs.inputRDOFile
28
29
# Output
30
if
hasattr(runArgs,
'outputRDO_TRIGFile'
):
31
flags.Output.RDOFileName = runArgs.outputRDO_TRIGFile
32
log.info(
"---------- Configured RDO_TRIG output"
)
33
34
from
RecJobTransforms.RecoConfigFlags
import
recoRunArgsToFlags
35
recoRunArgsToFlags(runArgs, flags)
36
37
from
AthenaConfiguration.Enums
import
ProductionStep
38
flags.Common.ProductionStep=ProductionStep.Reconstruction
39
40
# Setup perfmon flags from runargs
41
from
PerfMonComps.PerfMonConfigHelpers
import
setPerfmonFlagsFromRunArgs
42
setPerfmonFlagsFromRunArgs(flags, runArgs)
43
44
# process pre-include/exec
45
processPreInclude(runArgs, flags)
46
processPreExec(runArgs, flags)
47
48
# To respect --athenaopts
49
flags.fillFromArgs()
50
51
# Lock flags
52
flags.lock()
53
54
return
flags
55
56
57
58
def
fromRunArgs
(runArgs):
59
60
import
time
61
timeStart = time.time()
62
63
flags =
configureFlags
(runArgs)
64
65
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
66
cfg = MainServicesCfg(flags)
67
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
68
cfg.merge(PoolReadCfg(flags))
69
cfg.merge( runHLT.runHLTCfg(flags) )
70
# Enabling PerfMon always for trigger jobs regardless of PerfMon flags (unlike most other skeletons)
71
cfg.merge( PerfMonMTSvcCfg(flags) )
72
73
# Post-include
74
processPostInclude(runArgs, flags, cfg)
75
76
# Post-exec
77
processPostExec(runArgs, flags, cfg)
78
79
from
AthenaCommon.Constants
import
INFO
80
if
flags.Exec.OutputLevel <= INFO:
81
cfg.printConfig()
82
83
# Run the final accumulator
84
sc = cfg.run()
85
timeFinal = time.time()
86
log.info(
"Run RDOtoRDO_TRIG_skeleton in %d seconds"
, timeFinal - timeStart)
87
88
import
sys
89
sys.exit(sc.isFailure())
Constants
python.RDOtoRDO_TRIG_Skeleton.fromRunArgs
fromRunArgs(runArgs)
Definition
RDOtoRDO_TRIG_Skeleton.py:58
python.RDOtoRDO_TRIG_Skeleton.configureFlags
configureFlags(runArgs)
Definition
RDOtoRDO_TRIG_Skeleton.py:15
Generated on
for ATLAS Offline Software by
1.17.0