ATLAS Offline Software
Functions
gridIDPVM Namespace Reference

Functions

def getArgs ()
 
def main ()
 

Function Documentation

◆ getArgs()

def gridIDPVM.getArgs ( )

Definition at line 7 of file gridIDPVM.py.

7 def 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 

◆ main()

def gridIDPVM.main ( )

Definition at line 30 of file gridIDPVM.py.

30 def 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 
gridIDPVM.main
def main()
Definition: gridIDPVM.py:30
calibdata.exit
exit
Definition: calibdata.py:236
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
TCS::join
std::string join(const std::vector< std::string > &v, const char c=',')
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/Root/StringUtils.cxx:10
getArgs
Args getArgs(int nargs, char *argv[])
Definition: test_lwtnn_fastgraph.cxx:16
str
Definition: BTagTrackIpAccessor.cxx:11