Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Athena_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 
20 import PyJobTransforms.trfArgClasses as trfArgClasses
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 
36 
38  trf = transform(executor = athenaExecutor(name='athena', skeletonCA='PyJobTransforms.HelloWorldSkeleton'))
39  addAthenaArguments(trf.parser)
40  addDetectorArguments(trf.parser)
41  addMyArgs(trf.parser)
42  return trf
43 
44 
45 def addMyArgs(parser):
46  # Use arggroup to get these arguments in their own sub-section (of --help)
47  parser.defineArgGroup('Athena_trf', 'Athena_trf specific options')
48  parser.add_argument('--testInt', type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
49  help='Test integer argument', group='Athena_trf')
50  parser.add_argument('--testFloat', type=trfArgClasses.argFactory(trfArgClasses.argFloat, runarg=True),
51  help='Test float argument', group='Athena_trf')
52  parser.add_argument('--maxMsgLevel', type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True),
53  help='Highest message level to print in athena (not yet implemented!)', group='Athena_trf')
54 
55 
56 if __name__ == '__main__':
57  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
PyJobTransforms.trfArgClasses
Transform argument class definitions.
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
Athena_tf.getTransform
def getTransform()
Get the base transform with all arguments added.
Definition: Athena_tf.py:37
Athena_tf.addMyArgs
def addMyArgs(parser)
Definition: Athena_tf.py:45
PyJobTransforms.trfExe
Transform execution functions.
Athena_tf.main
def main()
Definition: Athena_tf.py:24
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.