1 main_page_template =
'''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 4 <link type="text/css" href="http://cern.ch/cms-project-tau-validation/styles.css" rel="stylesheet"> 5 <title>Tau ID Validation</title> 9 <A href="https://cms-project-tauvalidation.web.cern.ch/cms-project-tauvalidation/">Home</A> 10 <A href="https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTauValidation">Wiki</A> 14 <h1>Tau ID Validation</h1> 17 <h2>Official releases validated:</h2> 21 <h2>Special RelVal Validation:</h2> 25 <h2>Custom validation, tests and other stuff:</h2> 32 create_main_list_element =
lambda x:
' <li><a href="%s/">%s</a></li>\n' % (x,x)
34 from string
import Template
35 usual_validation_template = Template(
'''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 38 <link type="text/css" href="http://cern.ch/cms-project-tau-validation/styles.css" rel="stylesheet"> 39 <title>$THIS_RELEASE Validation Results</title> 43 <A href="https://cms-project-tauvalidation.web.cern.ch/cms-project-tauvalidation/">Home</A> 44 <A href="https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTauValidation">Wiki</A> 48 <h1>$THIS_RELEASE Validation Results</h1> 51 <h2>Configuration:</h2> 62 chunk_list =
lambda l,n: [l[i:i+n]
for i
in range(0, len(l), n)]
63 rows_paths = chunk_list(paths_to_pictures,2)
64 cell_template =
' <td style="width: 640px;"><A href=%s><IMG src="%s" width="640" align="center" border="0"></A></td>' 65 row_template =
''' <tr> 67 rows =
''.
join([row_template %
''.
join([ cell_template % (path,path)
for path
in row])
for row
in rows_paths])
68 reference =
'<A href=%s>Reference</A>' % ref_file
if ref_file
else 'Reference not available' 69 source =
'<A href=%s>Input Source</A>' % source_file
if ref_file
else 'Source not available' 70 return ''' <h3>%s ( <A href=%s>Root File</A> ) ( %s ) ( %s ) ( <A href=%s>Full Directory Content</A> )</h3> 71 <table style="text-align: left; " border="1" cellpadding="2" cellspacing="1"> 76 ''' % (dataset_name, root_link, reference, source, dir_link, rows)
def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file)
static std::string join(char **cmd)