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

Functions

 getArgs ()
 main ()

Function Documentation

◆ getArgs()

gridIDPVM.getArgs ( )

Definition at line 7 of file gridIDPVM.py.

7def getArgs():
8 args= argparse.ArgumentParser()
9 args.add_argument('--inDS', required=True)
10 args.add_argument('--outDS', required=True)
11 args.add_argument('--nFiles', type=int)
12
13 # We want to set these ones to %IN & %OUT...
14 args.add_argument('--filesInput')
15 args.add_argument('--outputFile')
16
17 myArgs, otherArgs = args.parse_known_args()
18
19 if myArgs.filesInput:
20 print("ERROR: only specify --inDS, not --filesInput!")
21 exit(1)
22
23 if myArgs.outputFile:
24 print("ERROR: only specify --outDS, not --outputFile!")
25 exit(1)
26
27 return myArgs, otherArgs
28
29
void print(char *figname, TCanvas *c1)
Args getArgs(int nargs, char *argv[])

◆ main()

gridIDPVM.main ( )

Definition at line 30 of file gridIDPVM.py.

30def main():
31
32 args, otherArgs = getArgs()
33
34 trf = [
35 'runIDPVM.py',
36 '--filesInput', '%IN',
37 '--outputFile', '%OUT.IDPVM.root',
38 ] + otherArgs
39 trf = ' '.join(trf)
40
41 merge = 'mergeIDPVM.py --filesInput %IN --outputFile %OUT'
42
43 cmd = [
44 'pathena',
45 '--inDS', args.inDS,
46 '--outDS', args.outDS,
47 '--trf', trf,
48 '--mergeOutput',
49 '--mergeScript', merge
50 ]
51
52 if args.nFiles:
53 cmd += ['--nFiles', str(args.nFiles)]
54
55 subprocess.run(cmd, check=True)
56
57
int main()
Definition hello.cxx:18