ATLAS Offline Software
DigiValid_tf.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 # Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
4 
5 """
6 Run RDO file and produce histograms.
7 """
8 
9 import os.path
10 import sys
11 import time
12 import logging
13 
14 # Setup core logging here
15 from PyJobTransforms.trfLogger import msg
16 msg.info('logging set in %s' % sys.argv[0])
17 from PyJobTransforms.transform import transform
18 from PyJobTransforms.trfExe import athenaExecutor
19 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments, addTriggerArguments
20 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
21 import PyJobTransforms.trfArgClasses as trfArgClasses
22 from SimuJobTransforms.simTrfArgs import addRDOValidArgs
23 
24 @stdTrfExceptionHandler
25 @sigUsrStackTrace
26 def main():
27 
28  msg.info('This is %s' % sys.argv[0])
29 
30  trf = getTransform()
31  trf.parseCmdLineArgs(sys.argv[1:])
32  trf.execute()
33  if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
34  msg.info('Skipping report generation')
35  else:
36  trf.generateReport()
37 
38  msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
39  sys.exit(trf.exitCode)
40 
42  executorSet = set()
43  from SimuJobTransforms.SimTransformUtils import addDigiValidationSubstep, addRDOValidArguments
44  addDigiValidationSubstep(executorSet)
45  trf = transform(executor = executorSet, description = 'ATLAS Validation transform. Inputs must be RDO. Outputs must be histogram files.')
46  addAthenaArguments(trf.parser)
47  addRDOValidArguments(trf.parser)
48  return trf
49 
50 
51 if __name__ == '__main__':
52  main()
DigiValid_tf.getTransform
def getTransform()
Definition: DigiValid_tf.py:41
DigiValid_tf.main
def main()
Definition: DigiValid_tf.py:26
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
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.SimTransformUtils.addDigiValidationSubstep
def addDigiValidationSubstep(executorSet)
Definition: SimTransformUtils.py:153
PyJobTransforms.trfExe
Transform execution functions.
python.SimTransformUtils.addRDOValidArguments
def addRDOValidArguments(parser)
Definition: SimTransformUtils.py:64
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.