ATLAS Offline Software
ESDMerge_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 POOLMergeExecutor
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', '--outputESD_MRGFile', '--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  executorSet = set()
41  executorSet.add(POOLMergeExecutor(name = 'ESDMerge', inData = ['ESD'], outData = ['ESD_MRG']))
42 
43  trf = transform(executor = executorSet)
44 
45  addAthenaArguments(trf.parser)
46  addDetectorArguments(trf.parser)
47  addCommonRecTrfArgs(trf.parser)
48  addMyArgs(trf.parser)
49  return trf
50 
51 
52 def addMyArgs(parser):
53  # Use arggroup to get these arguments in their own sub-section (of --help)
54  parser.defineArgGroup('ESDMerge_tf', 'ESD merge job specific options')
55  parser.add_argument('--inputESDFile', nargs='+',
56  type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io='input'),
57  help='Input ESD file', group='ESDMerge_tf')
58  parser.add_argument('--outputESD_MRGFile', '--outputESDFile',
59  type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile, io='output'),
60  help='Output merged ESD file', group='ESDMerge_tf')
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
ESDMerge_tf.main
def main()
Definition: ESDMerge_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
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
PyJobTransforms.trfExe
Transform execution functions.
ESDMerge_tf.addMyArgs
def addMyArgs(parser)
Definition: ESDMerge_tf.py:52
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.
ESDMerge_tf.getTransform
def getTransform()
Definition: ESDMerge_tf.py:39