CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
web_templates Namespace Reference

Functions

def usual_validation_dataset_template
 

Variables

string create_main_list_element = lambdax:' <li><a href="%s/">%s</a></li>\n'
 
string main_page_template
 
tuple usual_validation_template
 

Function Documentation

def web_templates.usual_validation_dataset_template (   dataset_name,
  root_link,
  ref_file,
  dir_link,
  paths_to_pictures,
  source_file 
)

Definition at line 62 of file web_templates.py.

References join(), and sistrip::SpyUtilities.range().

62 
63 def usual_validation_dataset_template(dataset_name, root_link, ref_file, dir_link, paths_to_pictures, source_file):
64  chunk_list = lambda l,n: [l[i:i+n] for i in range(0, len(l), n)]
65  rows_paths = chunk_list(paths_to_pictures,2)
66  cell_template = ' <td style="width: 640px;"><A href=%s><IMG src="%s" width="640" align="center" border="0"></A></td>'
67  row_template = ''' <tr>
68 %s </tr>\n'''
69  rows = ''.join([row_template % ''.join([ cell_template % (path,path) for path in row]) for row in rows_paths])
70  reference = '<A href=%s>Reference</A>' % ref_file if ref_file else 'Reference not available'
71  source = '<A href=%s>Input Source</A>' % source_file if ref_file else 'Source not available' #ALL source files seem empty... need to check
72  return ''' <h3>%s ( <A href=%s>Root File</A> ) ( %s ) ( %s ) ( <A href=%s>Full Directory Content</A> )</h3>
73  <table style="text-align: left; " border="1" cellpadding="2" cellspacing="1">
74  <tbody>
75 %s
76  </tbody>
77  </table>
78 ''' % (dataset_name, root_link, reference, source, dir_link, rows)
const uint16_t range(const Frame &aFrame)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def usual_validation_dataset_template

Variable Documentation

string web_templates.create_main_list_element = lambdax:' <li><a href="%s/">%s</a></li>\n'

Definition at line 33 of file web_templates.py.

string web_templates.main_page_template

Definition at line 2 of file web_templates.py.

tuple web_templates.usual_validation_template
Initial value:
1 = Template('''<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4  <link type="text/css" href="http://cern.ch/cms-project-tau-validation/styles.css" rel="stylesheet">
5  <title>$THIS_RELEASE Validation Results</title>
6 </head>
7 <body class="index">
8  <div id="header">
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>
11  </div>
12  <hr>
13  <div id="title">
14  <h1>$THIS_RELEASE Validation Results</h1>
15  </div>
16  <hr>
17  <h2>Configuration:</h2>
18  <pre>
19 $CONFIG
20  </pre>
21  <h2>Datasets:</h2>
22 $DATASETS
23 </body>
24 </html>
25 ''')

Definition at line 36 of file web_templates.py.