◆ __init__()
def MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.__init__ |
( |
|
self, |
|
|
|
argDict = {} |
|
) |
| |
Definition at line 11 of file MuonRecRTT_dynamic_pagemaker.py.
18 rttDescriptor = argDict.get(
'JobDescriptor')
21 self.release =
str(rttDescriptor.paths.release)
22 self.build =
str(rttDescriptor.paths.build)
23 self.jobGroup =
str(rttDescriptor.jobGroup)
24 self.platform =
str(rttDescriptor.paths.targetCMTCONFIG)
25 self.branch =
str(rttDescriptor.paths.branch)
26 self.runPath =
str(rttDescriptor.runPath)
◆ run()
def MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.run |
( |
|
self | ) |
|
Definition at line 28 of file MuonRecRTT_dynamic_pagemaker.py.
30 logfile =
open(self.runPath +
"/MuonRecRTT_dynamic_pagemaker.log",
'a')
31 logfile.write(
"Starting MuonRecRTT_dynamic_pagemaker.py run method\n")
33 inputfile = self.runPath +
"/ALL_MuonRecRTT_Plots.html"
34 outputfile = inputfile.replace(
".html",
"_Dynamic.html")
36 datasetlist = {
"AthenaMuonSimRec" :
" " ,
37 "AthenaMuonDataRec" :
" " ,
38 "MuonDataRecTrf" :
" "
42 def szsplit(stringlist,splitchar=" "):
43 if str(splitchar) == splitchar:
45 return stringlist.split(splitchar)
48 for item
in stringlist:
49 newlist += item.split(splitchar)
52 for onechar
in splitchar:
53 stringlist = szsplit(stringlist,onechar)
56 logfile.write(
"Input file: " + inputfile +
"\n")
57 logfile.write(
"Output file: " + outputfile +
"\n")
58 logfile.write(
"datasetlist: \n")
59 for key
in datasetlist.keys():
60 logfile.write(
" " + key +
": " + datasetlist[key] +
"\n")
62 logfile.write(
"Getting dataset... ")
64 dataset = datasetlist[self.jobGroup]
65 logfile.write(
"OK!\n")
67 dataset =
"Unknown (jobGroup = " + self.jobGroup +
")"
68 logfile.write(
"Unknown!\n")
70 logfile.write(
" Dataset name is " + dataset +
"\n")
72 jobinfolist = {
"Release" : self.release ,
"Branch" : self.branch ,
"Build" : self.build ,
"Platform" : self.platform ,
"Dataset" : dataset }
75 if self.runPath ==
".":
76 self.runPath =
"/afs/cern.ch/atlas/project/RTT/Results/rel_3/devval/build/i686-slc4-gcc34-opt/offline/MuonRecRTT/AthenaMuonRec/MuonRecRTT/263"
78 logfile.write(
"jobinfolist: \n")
79 for key
in jobinfolist.keys():
80 logfile.write(
" " + key +
": " + jobinfolist[key] +
"\n")
82 logfile.write(
"Opening input file: " + inputfile +
"\n")
83 input =
open(inputfile,
'r')
85 logfile.write(
"Opening output file: " + outputfile +
"\n")
86 output =
open(outputfile,
'w')
88 logfile.write(
"Starting copy...\n")
91 logfile.write(
"Line: " + line)
92 if line.count(
"<h2>Contents</h2>"):
93 logfile.write(
" Contains <h2>Contents</h2>\n")
94 output.write(
"<TABLE BORDER=6 CELLSPACING=4 CELLPADDING=4>\n")
95 for key
in jobinfolist.keys():
96 logfile.write(
" Going through jobinfo list and writing value of " + key +
"... ")
97 output.write(
" <TR><TD><b>" + key +
"</b></TD><TD>" + jobinfolist[key] +
"</TD></TR>\n")
98 logfile.write(
"Done.\n")
99 logfile.write(
"Writing date and finishing table... ")
100 output.write(
" <TR><TD><b>" +
"Date" +
"</b></TD><TD>" + os.popen(
"date").readline().strip() +
"</TD></TR>\n")
101 output.write(
"</TABLE>\n\n")
102 logfile.write(
"Done.\n")
103 if line.count(
"RTT default page"):
104 logfile.write(
" Contains RTT default page")
105 htmlline =
"<li><a href=\"http://atlas-project-rtt-results.web.cern.ch/atlas-project-rtt-results/page2.php?xml="
106 htmlline += szsplit(self.runPath,[
"Results/",
"/MuonRecRTT"])[1]
107 htmlline +=
"/RTTSummary.xml&package=MuonRecRTT&job=MuonRecRTT&id=" + self.runPath.
split(
"/")[-1]
108 htmlline +=
"\">RTT default page</a></li>\n"
109 output.write(htmlline)
110 logfile.write(
" Writing: " + htmlline)
112 if line.count(
"Log files"):
113 logfile.write(
" Contains log files")
114 htmlline =
"<li>Log files: "
115 for filename
in os.listdir(self.runPath):
116 if filename.count(
"log"):
117 htmlline +=
"<a href=\"" + filename +
"\">" + filename +
"</a> "
118 htmlline +=
"</li>\n"
119 output.write(htmlline)
120 logfile.write(
" Writing: " + htmlline)
123 logfile.write(
" Output original line.\n")
125 logfile.write(
"Now closing files.\n")
◆ branch
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.branch |
◆ build
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.build |
◆ jobGroup
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.jobGroup |
◆ platform
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.platform |
◆ release
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.release |
◆ runPath
MuonRecRTT_dynamic_pagemaker.MuonRecRTT_dynamic_pagemaker.runPath |
The documentation for this class was generated from the following file: