ATLAS Offline Software
Loading...
Searching...
No Matches
HITSMerge_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"""
6Merge multiple input HITS files into a single output HITS file.
7Optionally run algorithms to tweak the output. Optionally merge Log
8file tarballs at the same time.
9"""
10
11import os.path
12import sys
13import time
14
15import logging
16
17# Setup core logging here
18from PyJobTransforms.trfLogger import msg
19msg.info('logging set in %s' % sys.argv[0])
20
21from PyJobTransforms.transform import transform
22from PyJobTransforms.trfExe import athenaExecutor
23from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments
24from SimuJobTransforms.simTrfArgs import addHITSMergeArgs
25from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
26
27import PyJobTransforms.trfArgClasses as trfArgClasses
28
29# Prodsys hack...
30ListOfDefaultPositionalKeys=['--DBRelease', '--amiConfig', '--amiMetadataTag', '--asetup', '--athena', '--athenaopts', '--beamType', '--checkEventCount', '--command', '--conditionsTag', '--env', '--eventAcceptanceEfficiency', '--execOnly', '--geometryVersion', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputHITSFile', '--inputLogsFile', '--maxEvents', '--outputHITS_MRGFile', '--postExec', '--postInclude', '--preExec', '--preInclude', '--reportName', '--reportType', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--tcmalloc']
31
32@stdTrfExceptionHandler
33@sigUsrStackTrace
34def main():
35
36 msg.info('This is %s' % sys.argv[0])
37
38 trf = getTransform()
39 trf.parseCmdLineArgs(sys.argv[1:])
40 trf.execute()
41 if 'outputFileValidation' in trf._argdict and trf._argdict['outputFileValidation'].value is False:
42 msg.info('Skipping report generation')
43 else:
44 trf.generateReport()
45
46 msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
47 sys.exit(trf.exitCode)
48
50 executorSet = set()
51 from SimuJobTransforms.SimTransformUtils import addStandardHITSMergeSubstep, addHITSMergeArguments
52 addStandardHITSMergeSubstep(executorSet)
53 trf = transform(executor = executorSet, description = 'HITS Merging transform. Inputs must be HITS. Outputs must be HITS_MRG (i.e. HITS). ')
54 addAthenaArguments(trf.parser)
55 addDetectorArguments(trf.parser)
56 addHITSMergeArguments(trf.parser)
57 return trf
58
59
60
61
67
68
69if __name__ == '__main__':
70 main()
STL class.
Main package for new style ATLAS job transforms.
Transform argument class definitions.
Transform execution functions.
Logging configuration for ATLAS job transforms.