ATLAS Offline Software
Derivation_tf.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
4 
5 """
6 Run DAOD building from AOD or EVNT, or D2AOD building from DAOD, using the derivation framework
7 """
8 
9 import sys
10 import time
11 
12 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
13 from PyJobTransforms.trfArgs import addAthenaArguments
14 from PyJobTransforms.transform import transform
15 
16 # Setup core logging here
17 from PyJobTransforms.trfLogger import msg
18 msg.info('logging set in %s', sys.argv[0])
19 
20 
21 @stdTrfExceptionHandler
22 @sigUsrStackTrace
23 def main():
24  msg.info('This is %s', sys.argv[0])
25  trf = getTransform()
26  trf.parseCmdLineArgs(sys.argv[1:])
27  trf.execute()
28  trf.generateReport()
29 
30  msg.info('%s stopped at %s, trf exit code %d',
31  sys.argv[0], time.asctime(), trf.exitCode)
32  sys.exit(trf.exitCode)
33 
34 
36  executor_set = set()
37  from DerivationFrameworkConfiguration.DerivationTransformHelpers import \
38  addDerivationArguments, addDerivationSubstep, \
39  addPhysicsValidationArguments, addPhysicsValidationSubstep
40  addDerivationSubstep(executor_set)
41  addPhysicsValidationSubstep(executor_set)
42  trf = transform(executor=executor_set,
43  description='ATLAS derivation framework transform. Inputs must be EVNT, AOD or DAOD. Outputs must be DAOD or D2AOD.')
44  addAthenaArguments(trf.parser)
45  addDerivationArguments(trf.parser)
47  return trf
48 
49 
50 if __name__ == '__main__':
51  main()
python.DerivationTransformHelpers.addPhysicsValidationArguments
def addPhysicsValidationArguments(parser)
Definition: DerivationTransformHelpers.py:47
python.DerivationTransformHelpers.addDerivationArguments
def addDerivationArguments(parser)
Definition: DerivationTransformHelpers.py:9
python.DerivationTransformHelpers.addPhysicsValidationSubstep
def addPhysicsValidationSubstep(executor_set)
Definition: DerivationTransformHelpers.py:78
python.trfArgs.addAthenaArguments
def addAthenaArguments(parser, maxEventsDefaultSubstep='first', addValgrind=True, addPerfMon=True, addVTune=True)
Options related to running athena in general TODO: Some way to mask certain options (perExec,...
Definition: trfArgs.py:59
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
python.DerivationTransformHelpers.addDerivationSubstep
def addDerivationSubstep(executor_set)
Definition: DerivationTransformHelpers.py:64
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
Derivation_tf.main
def main()
Definition: Derivation_tf.py:23
PyJobTransforms.transform
Main package for new style ATLAS job transforms.
Derivation_tf.getTransform
def getTransform()
Definition: Derivation_tf.py:35