ATLAS Offline Software
HISTPostProcess_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 
6 
7 import sys
8 import time
9 
10 # Setup core logging here
11 from PyJobTransforms.trfLogger import msg
12 msg.info('logging set in %s' % sys.argv[0])
13 
14 from PyJobTransforms.transform import transform
15 from PyJobTransforms.trfExe import DQMPostProcessExecutor
16 from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
17 
18 import PyJobTransforms.trfArgClasses as trfArgClasses
19 
20 ListOfDefaultPositionalKeys=['--amiConfig', '--amiMetadataTag', '--checkEventCount', '--env', '--execOnly', '--ignoreErrors', '--inputHIST_File', '--noimf', '--notcmalloc', '--outputHISTFile', '--reportName', '--showGraph', '--showPath', '--showSteps', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation','--excludeDir','--excludeHist','--run_post_processing','--is_incremental_merge','--servers', '--doWebDisplay', '--allowCOOLUpload']
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 = DQMPostProcessExecutor(name = 'DQMPostProcessing', inData = ['HIST'], outData = ['HIST_MRG'])
38 
39  trf = transform(executor = executorSet)
40 
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('HISTPostProcess_tf', 'DQ post processing specific options')
48  parser.add_argument('--inputHISTFile', nargs='+',
49  type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='input',
50  countable=False),
51  help='Input DQ histogram file', group='HISTPostProcess_tf')
52  parser.add_argument('--outputHIST_MRGFile', '--outputHISTFile',nargs='+',
53  type=trfArgClasses.argFactory(trfArgClasses.argHISTFile, io='output', countable=False),
54  help='Output DQ monitoring file', group='HISTPostProcess_tf')
55 
56  parser.add_argument('--excludeDir', help='Regex pattern for directories to exclude from merge',group='HISTPostProcess_tf',
57  type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True))
58 
59  parser.add_argument('--excludeHist', help='Regex pattern for histogram names to exclude from merge\n'
60  'Note that this is just the name - paths cannot be specified',group='HISTPostProcess_tf',
61  type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True))
62 
63  parser.add_argument('--run_post_processing', default=False, help='False/True/0/1 default=0',group='HISTPostProcess_tf',
64  type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True))
65 
66  parser.add_argument('--is_incremental_merge', default=False, help='False/True/0/1 default=0',group='HISTPostProcess_tf',
67  type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True))
68 
69  parser.add_argument("--servers", help="string with comma-separated server names to override normal config", group='HISTPostProcess_tf',
70  type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True))
71 
72  parser.add_argument("--doWebDisplay",default=False,help="Produce Webdisplay",
73  type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True))
74 
75  parser.add_argument("--allowCOOLUpload",default=False,help="allow upload of defects to database",
76  type=trfArgClasses.argFactory(trfArgClasses.argBool, runarg=True))
77 
78 if __name__ == '__main__':
79  main()
HISTPostProcess_tf.getTransform
def getTransform()
Definition: HISTPostProcess_tf.py:36
PyJobTransforms.trfArgClasses
Transform argument class definitions.
HISTPostProcess_tf.main
def main()
Definition: HISTPostProcess_tf.py:24
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
PyJobTransforms.trfExe
Transform execution functions.
PyJobTransforms.trfLogger
Logging configuration for ATLAS job transforms.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.
HISTPostProcess_tf.addMyArgs
def addMyArgs(parser)
Definition: HISTPostProcess_tf.py:45