import sys,os,math,time #pandapath=os.environ.get('PANDAPATH') pandapath='/home/walbrecht/fopiroot/fopiroot_dev/' sys.path.append(pandapath+'/macro/tpc/FOPI/python/argparse-1.2.1') import argparse parser=argparse.ArgumentParser(description='Read distortion files from a folder ') parser.add_argument('path',help='path to distortion',type=str) parser.add_argument("--align",help='turn alignment on',action='store_true') parser.add_argument("--specfile",help='specfile',action='store_true') parser.add_argument("--merge",help='merge',action='store_true') args=parser.parse_args() FileList = os.listdir(args.path) FileList.sort() for File in FileList: efile=args.path + File print efile ofile=File[:-8] print ofile if args.align: print "ALIGN" ofile+="_align" os.environ['efile']=str(efile) os.environ['ofile']=str(ofile) os.system('. vwalbre_batch/submitFieldFilesAlign.sh') else: print "NICHT ALIGN" os.environ['efile']=str(efile) os.environ['ofile']=str(ofile) os.system('. vwalbre_batch/submitFieldFiles.sh')