babymaker  e95a6a9342d4604277fe7cc6149b6b5b24447d89
Namespaces | Variables
resubmit.py File Reference

Go to the source code of this file.

Namespaces

 resubmit
 

Variables

tuple resubmit.parser = argparse.ArgumentParser()
 
tuple resubmit.args = parser.parse_args()
 
 resubmit.timestamp = args.timestamp
 
 resubmit.onePerJob = False
 
tuple resubmit.host = os.environ.get("HOSTNAME")
 
 resubmit.atUCSB = False
 
string resubmit.redirector = "root://cms-xrd-global.cern.ch//"
 
tuple resubmit.bdir = os.getcwd()
 
tuple resubmit.logdir = os.path.join(bdir,'logs',timestamp)
 
tuple resubmit.arxivdir = os.path.join(bdir,'logs',timestamp,'arxiv')
 
list resubmit.loglist = [x for x in glob.glob(logdir+"/*.log")]
 
tuple resubmit.failed = set()
 
tuple resubmit.unfinished = set()
 
tuple resubmit.xrootd_err = set()
 
tuple resubmit.ferr = flog.rstrip(".log")
 
tuple resubmit.fout = flog.rstrip(".log")
 
tuple resubmit.bname = flog.split("/")
 
tuple resubmit.logfile = open(flog)
 
tuple resubmit.errfile = open(ferr)
 
tuple resubmit.user_input = raw_input('Resubmit jobs [y/N]?')
 
int resubmit.total_jobs = 0
 
tuple resubmit.fexe = os.path.join(logdir.replace("/logs/","/run/"), old_baby+".sh")
 
tuple resubmit.fcmd = os.path.join(logdir.replace("/logs/","/run/"), old_baby+".cmd")
 
tuple resubmit.old_exe = open(fexe)
 
tuple resubmit.new_exe = old_exe.replace("file:/hadoop/cms/phedex", redirector)
 
string resubmit.sys_cmd = "condor_submit "
 
tuple resubmit.tags = old_baby.split("_")
 
tuple resubmit.batch = int(tags[-1].strip("batch"))
 
tuple resubmit.nfiles = int(tags[-2].strip("mf"))
 
tuple resubmit.old_cmd = open(fcmd)
 
list resubmit.inputfiles = [line for line in old_exe if ("/store/" in line and "lcg-cp" not in line)]
 
string resubmit.new_baby = old_baby+"_rs"
 
list resubmit.new_exe_lines = [line for line in old_exe if ("/store/" not in line or "lcg-cp" in line)]
 
tuple resubmit.ind = new_exe_lines.index('inputFiles=\\\n')
 
tuple resubmit.new_cmd = old_cmd.replace(old_baby, new_baby)
 
tuple resubmit.fnew_cmd = fcmd.replace(old_baby,new_baby)
 
tuple resubmit.outputfile = line.split("SFN=")