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(
'HITSMerge_tf')
15 log.info(
'****************** STARTING HIT 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,
'inputHITSFile'):
27 flags.Input.Files = runArgs.inputHITSFile
29 raise RuntimeError(
'No input HITS file defined')
31 if hasattr(runArgs,
'outputHITS_MRGFile'):
32 if runArgs.outputHITS_MRGFile ==
'None':
33 flags.Output.HITSFileName =
''
36 flags.Output.HITSFileName = runArgs.outputHITS_MRGFile
38 raise RuntimeError(
'No outputHITS_MRGFile defined')
41 from SimuJobTransforms.SimulationHelpers
import getDetectorsFromRunArgs
43 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
44 setupDetectorFlags(flags, detectors, use_metadata=
True, toggle_geometry=
True, keep_beampipe=
True)
58 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
61 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
65 from DetDescrCnvSvc.DetDescrCnvSvcConfig
import DetDescrCnvSvcCfg
68 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg
69 cfg.merge(
OutputStreamCfg(flags,
'HITS', disableEventTag=(
"xAOD::EventInfo#EventInfo" not in flags.Input.TypedCollections),
70 takeItemsFromInput =
True, extendProvenanceRecord =
False))
73 from xAODMetaDataCnv.InfileMetaDataConfig
import SetupMetaDataForStreamCfg
74 from AthenaConfiguration.Enums
import MetadataCategory
81 MetadataCategory.IOVMetaData,
93 from PyUtils.AMITagHelperConfig
import AMITagCfg
100 log.info(
"Ran HITSMerge_tf in " +
str(time.time()-tic) +
" seconds")
102 sys.exit(
not sc.isSuccess())