ATLAS Offline Software
Loading...
Searching...
No Matches
PRWConfig_tf.py
Go to the documentation of this file.
1#! /usr/bin/env python
2
3# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
4
5
7
8import sys
9import time
10
11# Setup core logging here
12from PyJobTransforms.trfLogger import msg
13msg.info('logging set in %s', sys.argv[0])
14
15from PyJobTransforms.transform import transform
16from PyJobTransforms.trfExe import athenaExecutor
17from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace
18import PyJobTransforms.trfArgClasses as trfArgClasses
19
20@stdTrfExceptionHandler
21@sigUsrStackTrace
22def main():
23
24 msg.info('This is %s', sys.argv[0])
25
26 trf = getTransform()
27 trf.parseCmdLineArgs(sys.argv[1:])
28 trf.execute()
29 trf.generateReport()
30
31 msg.info("%s stopped at %s, trf exit code %d", sys.argv[0], time.asctime(), trf.exitCode)
32 sys.exit(trf.exitCode)
33
34
36 trf = transform(executor = athenaExecutor(name = 'athena',
37 skeletonFile='PATJobTransforms/skeleton.AODtoNTUP_PILEUP.py'))
38
39 trf.parser.defineArgGroup("PRWConfig_tf","PRWConfig_tf options")
40
41 #for input and output file lists to be put correctly into the runArgs and tested in the pre and post corruption
42 #tests, the format of option must be inputXXXXFile and outputYYYYFile
43 trf.parser.add_argument("--inputAODFile",type=trfArgClasses.argFactory(trfArgClasses.argPOOLFile,io='input',type='aod',multipleOK=True),nargs='+',help="The input files",group="PRWConfig_tf")
44 trf.parser.add_argument("--outputNTUP_PILEUPFile",type=trfArgClasses.argFactory(trfArgClasses.argNTUPFile,io='output',type='hist',multipleOK=False),help="The output filename",group="PRWConfig_tf")
45
46 return trf
47
48
49if __name__ == '__main__':
50 main()
getTransform()
Get the base transform with all arguments added.
Main package for new style ATLAS job transforms.
Transform argument class definitions.
Transform execution functions.
Logging configuration for ATLAS job transforms.