Functions | Variables
submit_ppfxjobs Namespace Reference

Functions

def make_tarfile (output_filename, source_dir)
 AUTHOR AMIT BASHYAL (amitb.nosp@m.ashy.nosp@m.al@gm.nosp@m.ail..nosp@m.com) ################## USAGE THIS SCRIPT IS TO GENERATE THE PPFX FILES FROM ALREADY EXISTING DK2NU FILES ls path_to_dk2nufiles/*.root >file_list.txt python submit_ppfxjobs.py -t file_list.txt -o /path/to/outputfile/ -n detector_index END USAGE#####################################################. More...
 

Variables

string CACHE_PNFS_AREA = "/pnfs/dune/scratch/users/{USER}/grid_cache/"
 
 EXPERIMENT
 
 USER
 
 PWD = os.getenv("PWD")
 
string tarfilename = "local_install.tar.gz"
 
string cache_folder = CACHE_PNFS_AREA+str(random.randint(10000,99999))+"/"
 
 ppfx_dir = os.getcwd()
 
 ppfx_executable = os.path.join(ppfx_dir,"bin/doReweight_dk2nu_numix")
 
string MODE = "OPT"
 
string ppfx_setup = "setup_for_dune_cvmfs.sh "
 
string ppfx_xml = ppfx_dir+"/scripts/inputs_default.xml"
 
string usage = "usage:%prog [options]"
 
 user = os.getenv("USER")
 
 parser = OptionParser(usage=usage)
 
 dest
 
 help
 
 default
 
 options
 
 args
 
 text_file = str(options.file_list)
 
string xrootd_input = "root://fndca1.fnal.gov:1094/"
 
string xrootd_text_file = "xroot_"
 
 xrootd_file = open(xrootd_text_file,'w')
 
 __line = xrootd_input+line.replace("/pnfs/","/pnfs/fnal.gov/usr/")
 
 _line = __line.replace("//pnfs","/pnfs")
 
list _list = []
 
 _textfile = open(xrootd_text_file,'r')
 
list _pre = []
 
list index = []
 
 _temp = _list[i].replace(".dk2nu.root","")
 
 temp = _temp.split("_")
 
 __prefix = os.path.basename(_list[0])
 
 _prefix = __prefix.replace("\n","")
 
 _temp_prefix = os.path.basename(_list[0])
 
 temp_prefix = _temp_prefix.replace(index[0],"")
 
string prefix = ""
 
 ntot = len(_list)
 
string wrapname = "wrapper_doReweight_dk2nu_"
 
string wrapdir = CACHE_PNFS_AREA+"wrapdir/"
 
 wrapfile = wrapdir+wrapname
 
 temp_text = wrapname.replace(".sh",".txt")
 
 executable_file = cache_folder+tarfilename
 
string temp_dir = "$_CONDOR_SCRATCH_DIR/"
 
string local_tar_path = "$_CONDOR_SCRATCH_DIR/"
 
 wrapper = open(wrapfile,'w')
 
string output_filename = prefix+"_${run_number}.root"
 
string command = "./bin/doReweight_dk2nu_numix "
 
 logfilename = output_filename.replace(".root","_\$PROCESS.log")
 
 logfile = os.path.join(str(options.output_dir),logfilename)
 
string osver = "SL%i"
 
string jobsub_command = "jobsub_submit.py -N "
 

Function Documentation

def submit_ppfxjobs.make_tarfile (   output_filename,
  source_dir 
)

AUTHOR AMIT BASHYAL (amitb.nosp@m.ashy.nosp@m.al@gm.nosp@m.ail..nosp@m.com) ################## USAGE THIS SCRIPT IS TO GENERATE THE PPFX FILES FROM ALREADY EXISTING DK2NU FILES ls path_to_dk2nufiles/*.root >file_list.txt python submit_ppfxjobs.py -t file_list.txt -o /path/to/outputfile/ -n detector_index END USAGE#####################################################.

Definition at line 16 of file submit_ppfxjobs.py.

16 def make_tarfile(output_filename, source_dir):
17  tar = tarfile.open(output_filename, "w:gz")
18  for i in os.listdir(source_dir):
19  tar.add(i)
20  tar.close()
21 
22 
23 
def make_tarfile(output_filename, source_dir)
AUTHOR AMIT BASHYAL (amitbashyal@gmail.com) ################## USAGE THIS SCRIPT IS TO GENERATE THE P...

Variable Documentation

submit_ppfxjobs.__line = xrootd_input+line.replace("/pnfs/","/pnfs/fnal.gov/usr/")
private

Definition at line 87 of file submit_ppfxjobs.py.

submit_ppfxjobs.__prefix = os.path.basename(_list[0])
private

Definition at line 120 of file submit_ppfxjobs.py.

submit_ppfxjobs._line = __line.replace("//pnfs","/pnfs")
private

Definition at line 88 of file submit_ppfxjobs.py.

list submit_ppfxjobs._list = []
private

Definition at line 94 of file submit_ppfxjobs.py.

submit_ppfxjobs._pre = []
private

Definition at line 100 of file submit_ppfxjobs.py.

submit_ppfxjobs._prefix = __prefix.replace("\n","")
private

Definition at line 121 of file submit_ppfxjobs.py.

submit_ppfxjobs._temp = _list[i].replace(".dk2nu.root","")
private

Definition at line 106 of file submit_ppfxjobs.py.

submit_ppfxjobs._temp_prefix = os.path.basename(_list[0])
private

Definition at line 125 of file submit_ppfxjobs.py.

submit_ppfxjobs._textfile = open(xrootd_text_file,'r')
private

Definition at line 95 of file submit_ppfxjobs.py.

submit_ppfxjobs.args

Definition at line 66 of file submit_ppfxjobs.py.

string submit_ppfxjobs.cache_folder = CACHE_PNFS_AREA+str(random.randint(10000,99999))+"/"

Definition at line 29 of file submit_ppfxjobs.py.

string submit_ppfxjobs.CACHE_PNFS_AREA = "/pnfs/dune/scratch/users/{USER}/grid_cache/"

Definition at line 24 of file submit_ppfxjobs.py.

string submit_ppfxjobs.command = "./bin/doReweight_dk2nu_numix "

Definition at line 180 of file submit_ppfxjobs.py.

submit_ppfxjobs.default

Definition at line 58 of file submit_ppfxjobs.py.

submit_ppfxjobs.dest

Definition at line 57 of file submit_ppfxjobs.py.

submit_ppfxjobs.executable_file = cache_folder+tarfilename

Definition at line 160 of file submit_ppfxjobs.py.

submit_ppfxjobs.EXPERIMENT

Definition at line 24 of file submit_ppfxjobs.py.

submit_ppfxjobs.help

Definition at line 58 of file submit_ppfxjobs.py.

list submit_ppfxjobs.index = []

Definition at line 101 of file submit_ppfxjobs.py.

string submit_ppfxjobs.jobsub_command = "jobsub_submit.py -N "

Definition at line 204 of file submit_ppfxjobs.py.

string submit_ppfxjobs.local_tar_path = "$_CONDOR_SCRATCH_DIR/"

Definition at line 163 of file submit_ppfxjobs.py.

submit_ppfxjobs.logfile = os.path.join(str(options.output_dir),logfilename)

Definition at line 186 of file submit_ppfxjobs.py.

submit_ppfxjobs.logfilename = output_filename.replace(".root","_\$PROCESS.log")

Definition at line 185 of file submit_ppfxjobs.py.

string submit_ppfxjobs.MODE = "OPT"

Definition at line 41 of file submit_ppfxjobs.py.

submit_ppfxjobs.ntot = len(_list)

Definition at line 140 of file submit_ppfxjobs.py.

submit_ppfxjobs.options

Definition at line 66 of file submit_ppfxjobs.py.

string submit_ppfxjobs.osver = "SL%i"

Definition at line 202 of file submit_ppfxjobs.py.

string submit_ppfxjobs.output_filename = prefix+"_${run_number}.root"

Definition at line 178 of file submit_ppfxjobs.py.

submit_ppfxjobs.parser = OptionParser(usage=usage)

Definition at line 55 of file submit_ppfxjobs.py.

submit_ppfxjobs.ppfx_dir = os.getcwd()

Definition at line 33 of file submit_ppfxjobs.py.

submit_ppfxjobs.ppfx_executable = os.path.join(ppfx_dir,"bin/doReweight_dk2nu_numix")

Definition at line 34 of file submit_ppfxjobs.py.

string submit_ppfxjobs.ppfx_setup = "setup_for_dune_cvmfs.sh "

Definition at line 42 of file submit_ppfxjobs.py.

string submit_ppfxjobs.ppfx_xml = ppfx_dir+"/scripts/inputs_default.xml"

Definition at line 43 of file submit_ppfxjobs.py.

submit_ppfxjobs.prefix = ""

Definition at line 128 of file submit_ppfxjobs.py.

submit_ppfxjobs.PWD = os.getenv("PWD")

Definition at line 26 of file submit_ppfxjobs.py.

string submit_ppfxjobs.tarfilename = "local_install.tar.gz"

Definition at line 27 of file submit_ppfxjobs.py.

submit_ppfxjobs.temp = _temp.split("_")

Definition at line 110 of file submit_ppfxjobs.py.

string submit_ppfxjobs.temp_dir = "$_CONDOR_SCRATCH_DIR/"

Definition at line 162 of file submit_ppfxjobs.py.

submit_ppfxjobs.temp_prefix = _temp_prefix.replace(index[0],"")

Definition at line 126 of file submit_ppfxjobs.py.

submit_ppfxjobs.temp_text = wrapname.replace(".sh",".txt")

Definition at line 147 of file submit_ppfxjobs.py.

submit_ppfxjobs.text_file = str(options.file_list)

Definition at line 75 of file submit_ppfxjobs.py.

string submit_ppfxjobs.usage = "usage:%prog [options]"

Definition at line 53 of file submit_ppfxjobs.py.

submit_ppfxjobs.USER

Definition at line 25 of file submit_ppfxjobs.py.

submit_ppfxjobs.user = os.getenv("USER")

Definition at line 54 of file submit_ppfxjobs.py.

string submit_ppfxjobs.wrapdir = CACHE_PNFS_AREA+"wrapdir/"

Definition at line 145 of file submit_ppfxjobs.py.

submit_ppfxjobs.wrapfile = wrapdir+wrapname

Definition at line 146 of file submit_ppfxjobs.py.

string submit_ppfxjobs.wrapname = "wrapper_doReweight_dk2nu_"

Definition at line 144 of file submit_ppfxjobs.py.

submit_ppfxjobs.wrapper = open(wrapfile,'w')

Definition at line 165 of file submit_ppfxjobs.py.

submit_ppfxjobs.xrootd_file = open(xrootd_text_file,'w')

Definition at line 82 of file submit_ppfxjobs.py.

string submit_ppfxjobs.xrootd_input = "root://fndca1.fnal.gov:1094/"

Definition at line 80 of file submit_ppfxjobs.py.

string submit_ppfxjobs.xrootd_text_file = "xroot_"

Definition at line 81 of file submit_ppfxjobs.py.