00001
00002
00003 import os, string, sys, math, time
00004 curpath = os.getcwd()
00005 rootpath = "hadron_roots"
00006 rawpath = "hadron_rawfiles"
00007
00008 rootList = os.listdir(rootpath)
00009 if not os.path.exists(rawpath):
00010 os.mkdir(rawpath)
00011 os.chdir(rawpath)
00012 dirList = os.listdir("./")
00013
00014
00015 for rootfile in rootList:
00016 print (rootfile[:-5])
00017 if(rootfile[:-5] not in dirList):
00018 os.system("mkdir " + rootfile[:-5])
00019 os.chdir(rootfile[:-5])
00020 os.system("genRunList.exe ../../" + rootpath + "/ " + rootfile)
00021 os.system("../autoSubSelectJob.sh")
00022 os.system("rm -rf pbsjobs")
00023 os.system("~/home/shell/sub/separate_jobs.py NUMSEPJOBS")
00024 os.system("~/home/shell/sub/sub_dedx.csh")
00025 os.chdir("../")
00026 os.chdir(curpath)
00027 sys.exit()