5 from PyJobTransforms.CommonRunArgsToFlags
import commonRunArgsToFlags
6 from PyJobTransforms.TransformUtils
import processPreExec, processPreInclude, processPostExec, processPostInclude
7 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
10 from AthenaCommon
import JobProperties
11 JobProperties.jobPropertiesDisallowed =
True
15 from AthenaCommon.Logging
import logging
16 logDerivation = logging.getLogger(
'PhysicsValidation')
17 logDerivation.info(
'****************** STARTING NTUP_PHYSVAL *****************')
19 logDerivation.info(
'**** Transformation run arguments')
20 logDerivation.info(
str(runArgs))
22 logDerivation.info(
'**** Setting-up configuration flags')
23 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
25 flags.Exec.EventPrintoutInterval = 100
29 flags.PerfMon.doFullMonMT =
True
32 if not hasattr(runArgs,
'inputDAOD_PHYSVALFile'):
33 raise ValueError(
'Input must be provided using --inputDAOD_PHYSVALFile')
34 flags.Input.Files = runArgs.inputDAOD_PHYSVALFile
37 if hasattr(runArgs,
'outputNTUP_PHYSVALFile'):
38 logDerivation.info(
'Will produce NTUP_PHYSVAL file')
39 flags.PhysVal.OutputFileName = runArgs.outputNTUP_PHYSVALFile
41 if not (hasattr(runArgs,
'inputAODFile')
or hasattr(runArgs,
'inputDAOD_PHYSVALFile')):
42 logDerivation.error(
'NTUP_PHYSVAL requires AOD or DAOD_PHYSVAL input')
43 raise ValueError(
'Incorrect inputs for NTUP_PHYSVAL')
45 if not hasattr(runArgs,
'validationFlags'):
46 raise ValueError(
'--validationFlags is mandatory')
48 for flag
in runArgs.validationFlags:
49 if flag ==
'doPFlow_FlowElements':
52 name = f
'PhysVal.{flag}'
53 if not flags.hasFlag(name):
54 raise ValueError(f
"Unknown validation flag '{name}'")
56 logDerivation.info(
"Enabling validation flag '%s'", name)
57 flags._set(name,
True)
59 raise ValueError(
'Output file name needs to be set using --outputNTUP_PHYSVALFile')
74 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
79 from PhysValMonitoring.PhysValMonitoringConfig
import PhysValMonitoringCfg
83 from PerfMonComps.PerfMonCompsConfig
import PerfMonMTSvcCfg
94 sys.exit(
not sc.isSuccess())