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