Definition at line 41 of file fileTransfer.py.
References join(), and edm.print().
Referenced by transferFiles().
42 fname=f.rsplit(
"/",1)[-1]
43 dname=f.rsplit(
"/",1)[0]
44 run=f.split(
"_R")[-1][:9]
45 iname=
"%s/%s" % (INJECTIONDIR,fname)
47 parameters=[
"--filename %s" % fname,
49 "--path %s" % INJECTIONDIR,
51 "--hostname %s" % HOSTNAME,
52 "--config %s" % CONFIGFILE,
53 "--runnumber %s" % run,
55 "--numevents 834474816",
56 "--appname dqmArchive",
57 "--appversion dqmArchive_1_0"]
58 cmd=
"%s %s" % (INJECTIONSCRIPT,
" ".
join(parameters))
59 result = commands.getstatusoutput(cmd)
62 print(
"Error injecting file %s to transfer system checking if it exists" % f)
63 chkparameters=[
"--check",
"--filename %s" % fname,
"--config %s" % CONFIGFILE]
64 cmd=
"%s %s" % (INJECTIONSCRIPT,
" ".
join(chkparameters))
65 result = commands.getstatusoutput(cmd)
67 if "File not found in database" in result[1]:
68 print(
"Error: file %s not found in transfer database, check configuration" % f)
71 print(
"Warning: file %s already exists in transfer database" % f)
74 print(
"Error: problem checking database entry for file %s\n Error:%s" % (f,result[1]))
77 print(
"File %s injected successfully" % f)
S & print(S &os, JobReport::InputFile const &f)
static std::string join(char **cmd)
def injectFile(f, renotify=False)