ATLAS Offline Software
ESDtoAOD_tf.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 
5 
7 
8 import sys
9 import time
10 
11 # Setup core logging here
12 from PyJobTransforms.trfLogger import msg
13 msg.info('logging set in %s' % sys.argv[0])
14 
15 from PyJobTransforms.transform import transform
16 from PyJobTransforms.trfExe import athenaExecutor
17 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments
18 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
19 from RecJobTransforms.recTransformUtils import addCommonRecTrfArgs
20 
21 import PyJobTransforms.trfArgClasses as trfArgClasses
22 
23 ListOfDefaultPositionalKeys=['--DBRelease', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--autoConfiguration', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFilters', '--ignorePatterns', '--inputESDFile', '--maxEvents', '--noimf', '--notcmalloc', '--outputAODFile', '--outputHIST_AOD_INTFile', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation']
24 
25 @stdTrfExceptionHandler
26 @sigUsrStackTrace
27 def main():
28 
29  msg.info('This is %s' % sys.argv[0])
30 
31  trf = getTransform()
32  trf.parseCmdLineArgs(sys.argv[1:])
33  trf.execute()
34  trf.generateReport()
35 
36  msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
37  sys.exit(trf.exitCode)
38 
40  trf = transform(executor = athenaExecutor(name = 'ESDtoAOD', substep = 'e2a'))
41  addAthenaArguments(trf.parser)
42  addDetectorArguments(trf.parser)
43  addCommonRecTrfArgs(trf.parser)
44  addMyArgs(trf.parser)
45  return trf
46 
47 
48 def addMyArgs(parser):
49  # Use arggroup to get these arguments in their own sub-section (of --help)
50  parser.defineArgGroup('ESDtoAOD_tf', 'ESDtoAOD specific options')
51  parser.add_argument('--inputESDFile', nargs='+',
52  type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io='input'),
53  help='Input ESD file', group='ESDtoAOD_tf')
54  parser.add_argument('--outputAODFile',
55  type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io='output'),
56  help='Output AOD file', group='ESDtoAOD_tf')
57  parser.add_argument('--outputHIST_AOD_INTFile',
58  type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', countable=False),
59  help='Output DQ monitoring file', group='ESDtoAOD_tf')
60 
61 
62 if __name__ == '__main__':
63  main()
python.trfArgs.addDetectorArguments
def addDetectorArguments(parser)
Options related to the setup of the ATLAS detector (used in simulation and digitisation as well as re...
Definition: trfArgs.py:229
ESDtoAOD_tf.main
def main()
Definition: ESDtoAOD_tf.py:27
PyJobTransforms.trfArgClasses
Transform argument class definitions.
python.recTransformUtils.addCommonRecTrfArgs
def addCommonRecTrfArgs(parser)
Definition: recTransformUtils.py:14
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
ESDtoAOD_tf.addMyArgs
def addMyArgs(parser)
Definition: ESDtoAOD_tf.py:48
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
ESDtoAOD_tf.getTransform
def getTransform()
Definition: ESDtoAOD_tf.py:39
PyJobTransforms.trfExe
Transform execution functions.
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.