5from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
14 from AthenaCommon.Logging
import logging
15 log = logging.getLogger(
'AODtoHIST')
16 log.info(
'****************** STARTING AOD->HIST MAKING *****************')
18 log.info(
'**** Transformation run arguments')
19 log.info(str(runArgs))
22 timeStart = time.time()
25 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
26 flags = initConfigFlags()
27 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
28 commonRunArgsToFlags(runArgs, flags)
29 from RecJobTransforms.RecoConfigFlags
import recoRunArgsToFlags
30 recoRunArgsToFlags(runArgs, flags)
33 if hasattr(runArgs,
'inputAODFile'):
34 flags.Input.Files = runArgs.inputAODFile
37 if hasattr(runArgs,
'outputHIST_AODFile'):
38 flags.Output.HISTFileName = runArgs.outputHIST_AODFile
39 log.info(
"---------- Configured HIST_AOD output")
40 if hasattr(runArgs,
'outputHISTFile'):
41 flags.Output.HISTFileName = runArgs.outputHISTFile
42 log.info(
"---------- Configured HIST output")
47 if hasattr(runArgs,
'detectors'):
48 detectors = runArgs.detectors
52 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
53 setupDetectorFlags(flags, detectors, use_metadata=
True, toggle_geometry=
True, keep_beampipe=
True)
55 processPreInclude(runArgs, flags)
56 processPreExec(runArgs, flags)
63 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
64 cfg = MainServicesCfg(flags)
66 cfg.flagPerfmonDomain(
'IO')
67 from AthenaConfiguration.Enums
import Format
68 if flags.Input.Format
is Format.BS:
69 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
70 cfg.merge(ByteStreamReadCfg(flags))
71 log.info(
"---------- Configured BS reading")
73 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
74 cfg.merge(PoolReadCfg(flags))
76 if "EventInfo" not in flags.Input.Collections:
77 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import (
79 cfg.merge(EventInfoCnvAlgCfg(flags))
80 log.info(
"---------- Configured POOL reading")
82 from AthenaMonitoring.AthenaMonitoringCfg
import AthenaMonitoringCfg, AthenaMonitoringPostprocessingCfg
83 cfg.merge(AthenaMonitoringCfg(flags))
84 cfg.merge(AthenaMonitoringPostprocessingCfg(flags))
86 processPostInclude(runArgs, flags, cfg)
87 processPostExec(runArgs, flags, cfg)
91 timeFinal = time.time()
92 log.info(
"Run AODtoHIST_Skeleton in %d seconds", timeFinal - timeStart)
94 sys.exit(
not sc.isSuccess())