8 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
11 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
14 from AthenaCommon
import JobProperties
15 JobProperties.jobPropertiesDisallowed =
True
19 from AthenaCommon.Logging
import logging
20 log = logging.getLogger(
'EVNTtoHEPMC')
21 log.info(
'*** Starting EVNTtoHEPMC translation ***')
24 log.info(
'*** Transformation run arguments ***')
25 log.info(
str(runArgs))
28 log.info(
'*** Setting-up configuration flags ***')
29 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
34 from AthenaConfiguration.Enums
import ProductionStep
35 flags.Common.ProductionStep = ProductionStep.Derivation
38 if hasattr(runArgs,
'inputEVNTFile'):
39 flags.Input.Files = runArgs.inputEVNTFile
41 log.error(
'Input EVNT file required for EVNTtoHEPMC')
44 if hasattr(runArgs,
'outputEvtFile'):
45 my_output_HepMCFile = runArgs.outputEvtFile
47 log.error(
'Output Evt file (HepMC) required for EVNTtoHEPMC')
50 from PerfMonComps.PerfMonConfigHelpers
import setPerfmonFlagsFromRunArgs
66 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
70 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
74 from AthenaConfiguration.ComponentFactory
import CompFactory
75 cfg.addEventAlgo( CompFactory.WriteHepMC(
'WriteHepMC',
76 OutputFile = my_output_HepMCFile ) )
89 log.info(
"Ran EVNTtoHEPMC in " +
str(time.time()-tic) +
" seconds")
91 sys.exit(
not sc.isSuccess())