ATLAS Offline Software
Loading...
Searching...
No Matches
ExeWrap_tf Namespace Reference

Functions

 main ()
 getTransform ()
 addMyArgs (parser)
 Example of how to add some specific arguments to the transform.

Function Documentation

◆ addMyArgs()

ExeWrap_tf.addMyArgs ( parser)

Example of how to add some specific arguments to the transform.

Definition at line 47 of file ExeWrap_tf.py.

47def addMyArgs(parser):
48 # Use arggroup to get these arguments in their own sub-section (of --help)
49 parser.defineArgGroup('ExeWrap_trf', 'ExeWrap_trf specific options')
50 parser.add_argument('--exe', type=trfArgClasses.argFactory(trfArgClasses.argString),
51 group='ExeWrap_trf', help='Executable to invoke')
52 parser.add_argument('--args', type=trfArgClasses.argFactory(trfArgClasses.argList), nargs='+',
53 group='ExeWrap_trf', help='Additonal parameters to the executor')
54
55

◆ getTransform()

ExeWrap_tf.getTransform ( )

Definition at line 41 of file ExeWrap_tf.py.

41def getTransform():
42 trf = transform(executor = scriptExecutor(name = 'ExeWrap', exe = None, exeArgs = ['args']))
43 addMyArgs(trf.parser)
44 return trf
45

◆ main()

ExeWrap_tf.main ( )

Definition at line 23 of file ExeWrap_tf.py.

23def main():
24
25 msg.info('This is %s', sys.argv[0])
26
27 trf = getTransform()
28 trf.parseCmdLineArgs(sys.argv[1:])
29
30 # Need to update what we want to execute after the command line is parsed
31 # LHS is the slightly convoluted way to get at the single member of a set
32 # (which, of course, itself has no index)
33 list(trf._executors)[0].exe = trf.argdict['exe'].value
34
35 trf.execute()
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
int main()
Definition hello.cxx:18