ATLAS Offline Software
RDOMerge_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 import sys
6 import time
7 
8 # Setup core logging here
9 from PyJobTransforms.trfLogger import msg
10 msg.info('logging set in %s', sys.argv[0])
11 
12 from PyJobTransforms.transform import transform
13 from PyJobTransforms.trfExe import athenaExecutor
14 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments
15 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
16 from SimuJobTransforms.simTrfArgs import addForwardDetTrfArgs
17 
18 import PyJobTransforms.trfArgClasses as trfArgClasses
19 
20 ListOfDefaultPositionalKeys=['--AFPOn', '--ALFAOn', '--DBRelease', '--FwdRegionOn', '--LucidOn', '--ZDCOn', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFilters', '--ignorePatterns', '--inputRDOFile', '--maxEvents', '--noimf', '--notcmalloc', '--outputRDO_MRGFile', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation']
21 
22 @stdTrfExceptionHandler
23 @sigUsrStackTrace
24 def main():
25 
26  msg.info('This is %s', sys.argv[0])
27 
28  trf = getTransform()
29  trf.parseCmdLineArgs(sys.argv[1:])
30  trf.execute()
31  trf.generateReport()
32 
33  msg.info("%s stopped at %s, trf exit code %d", sys.argv[0], time.asctime(), trf.exitCode)
34  sys.exit(trf.exitCode)
35 
37  executorSet = set()
38  executorSet.add(athenaExecutor(name = 'RDOMerge',
39  skeletonCA = 'SimuJobTransforms.RDOMerge_Skeleton',
40  inData = ['RDO'], outData = ['RDO_MRG']))
41 
42  trf = transform(executor = executorSet)
43 
44  addAthenaArguments(trf.parser)
45  addDetectorArguments(trf.parser)
46  addForwardDetTrfArgs(trf.parser)
47  addMyArgs(trf.parser)
48  return trf
49 
50 
51 def addMyArgs(parser):
52  # Use arggroup to get these arguments in their own sub-section (of --help)
53  parser.defineArgGroup('RDOMerge_tf', 'RDO merge job specific options')
54  parser.add_argument('--inputRDOFile', nargs='+',
55  type=trfArgClasses.argFactory(trfArgClasses.argRDOFile, io='input'),
56  help='Input RDO file', group='RDOMerge_tf')
57  parser.add_argument('--outputRDO_MRGFile', '--outputRDOFile',
58  type=trfArgClasses.argFactory(trfArgClasses.argRDOFile, io='output'),
59  help='Output merged RDO file', group='RDOMerge_tf')
60  parser.add_argument('--PileUpPresampling',
61  type=trfArgClasses.argFactory(trfArgClasses.argBool),
62  help='Run digitization with pile-up presampling configuration.', group='RDOMerge_tf')
63 
64 if __name__ == '__main__':
65  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
RDOMerge_tf.main
def main()
Definition: RDOMerge_tf.py:24
PyJobTransforms.trfArgClasses
Transform argument class definitions.
RDOMerge_tf.getTransform
def getTransform()
Definition: RDOMerge_tf.py:36
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
python.simTrfArgs.addForwardDetTrfArgs
def addForwardDetTrfArgs(parser)
Add Forward Detector transform arguments to an argparse ArgumentParser.
Definition: simTrfArgs.py:13
RDOMerge_tf.addMyArgs
def addMyArgs(parser)
Definition: RDOMerge_tf.py:51
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.
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.