ATLAS Offline Software
Loading...
Searching...
No Matches
RAWMerge_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
8
9import sys
10import time
11
12# This is a hack for Prodsys I. To generate this list use the --dumpargs option to the transform, then paste in here
13# N.B. This all has to go on one line!
14ListOfDefaultPositionalKeys=['--allowRename', '--amiConfig', '--amiMetadataTag', '--checkEventCount', '--env', '--execOnly', '--ignoreErrors', '--inputBSFile', '--maskEmptyInputs', '--noimf', '--notcmalloc', '--outputBS_MRGFile', '--reportName', '--showGraph', '--showPath', '--showSteps', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation']
15
16# Setup core logging here
17from PyJobTransforms.trfLogger import msg
18msg.info('logging set in %s' % sys.argv[0])
19
20from PyJobTransforms.transform import transform
21from PyJobTransforms.trfExe import bsMergeExecutor
22from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
23
24import PyJobTransforms.trfArgClasses as trfArgClasses
25
26@stdTrfExceptionHandler
27@sigUsrStackTrace
28def main():
29
30 msg.info('This is %s' % sys.argv[0])
31
32 trf = getTransform()
33 trf.parseCmdLineArgs(sys.argv[1:])
34 trf.execute()
35 trf.generateReport()
36
37 msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
38 sys.exit(trf.exitCode)
39
41 trf = transform(executor = bsMergeExecutor(name = 'RAWFileMerge', exe = 'file_merging',
42 inData = set(['BS']), outData = set(['BS_MRG'])))
43
44 addMyArgs(trf.parser)
45 return trf
46
47
48def addMyArgs(parser):
49 # Use arggroup to get these arguments in their own sub-section (of --help)
50 parser.defineArgGroup('RAWMerge_tf', 'RAWMerge specific options')
51 parser.add_argument('--inputBSFile', nargs='+',
52 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='input'),
53 help='Input BS file(s)', group='RAWMerge_tf')
54 parser.add_argument('--outputBS_MRGFile', '--outputBSFile',
55 type=trfArgClasses.argFactory(trfArgClasses.argBSFile, io='output'),
56 help='Output merged BS file (best if this file ends in ._0001.data, but see allowRename option below)',
57 group='RAWMerge_tf')
58 parser.add_argument('--maskEmptyInputs', type=trfArgClasses.argFactory(trfArgClasses.argBool), group='RAWMerge_tf',
59 help='If true then empty BS files are not included in the merge (default True)',
60 default=trfArgClasses.argBool('True'))
61 parser.add_argument('--allowRename', type=trfArgClasses.argFactory(trfArgClasses.argBool), group='RAWMerge_tf',
62 help='If true merged BS file will be forcibly renamed to the value of "outputBSFile" (default True)',
63 default=trfArgClasses.argBool('True'))
64
65
66if __name__ == '__main__':
67 main()
STL class.
Main package for new style ATLAS job transforms.
Transform argument class definitions.
Transform execution functions.
Logging configuration for ATLAS job transforms.
addMyArgs(parser)