4 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
5 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
8 from AthenaCommon
import JobProperties
9 JobProperties.jobPropertiesDisallowed =
True
13 from AthenaCommon.Logging
import logging
14 log = logging.getLogger(
'RDOMerge_tf')
15 log.info(
'****************** STARTING RDO MERGING *****************')
17 log.info(
'**** Transformation run arguments')
18 log.info(
str(runArgs))
20 log.info(
'**** Setting-up configuration flags')
21 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
26 if hasattr(runArgs,
"PileUpPresampling"):
27 from AthenaConfiguration.Enums
import ProductionStep
28 flags.Common.ProductionStep = ProductionStep.PileUpPresampling
30 if hasattr(runArgs,
'inputRDOFile'):
31 flags.Input.Files = runArgs.inputRDOFile
33 raise RuntimeError(
'No input RDO file defined')
35 if hasattr(runArgs,
'outputRDO_MRGFile'):
36 if runArgs.outputRDO_MRGFile ==
'None':
37 flags.Output.RDOFileName =
''
40 flags.Output.RDOFileName = runArgs.outputRDO_MRGFile
42 raise RuntimeError(
'No outputRDO_MRGFile defined')
45 if hasattr(runArgs,
'detectors'):
46 detectors = runArgs.detectors
50 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
65 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
68 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
72 if flags.Detector.EnablePixel:
73 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
75 if flags.Detector.EnableSCT:
76 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
78 if flags.Detector.EnableTRT:
79 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
82 if flags.Detector.EnableITkPixel:
83 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
85 if flags.Detector.EnableITkStrip:
86 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
89 if flags.Detector.EnableHGTD:
90 if flags.HGTD.Geometry.useGeoModelXml:
91 from HGTD_GeoModelXml.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
93 from HGTD_GeoModel.HGTD_GeoModelConfig
import HGTD_ReadoutGeometryCfg
96 if flags.Detector.EnableLAr:
97 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
99 if flags.Detector.EnableTile:
100 from TileGeoModel.TileGMConfig
import TileGMCfg
102 from TileConditions.TileCablingSvcConfig
import TileCablingSvcCfg
105 if flags.Detector.EnableMuon:
106 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
109 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
110 cfg.merge(
OutputStreamCfg(flags,
'RDO', takeItemsFromInput =
True, extendProvenanceRecord =
False))
112 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
116 from DigitizationConfig.DigitizationSteering
import DigitizationMessageSvcCfg
126 from PyUtils.AMITagHelperConfig
import AMITagCfg
133 log.info(
"Ran RDOMerge_tf in " +
str(time.time()-tic) +
" seconds")
135 sys.exit(
not sc.isSuccess())