ATLAS Offline Software
Loading...
Searching...
No Matches
root2html Namespace Reference

Functions

 main ()

Variables

str html_template

Function Documentation

◆ main()

root2html.main ( )

Definition at line 31 of file root2html.py.

31def main():
32
33 # Parse arguments
34 from optparse import OptionParser
35 parser = OptionParser(usage = "usage: %prog [options] file1 [file2] ..." )
36
37 (opts, args) = parser.parse_args()
38
39 if len(args)<1:
40 parser.print_help()
41 return
42
43 #create an index.htm with the input file and rootcomp.root
44 d = {"file_list":";".join(args)}
45 o_html = open('index.htm', 'w')
46 o_html.writelines(html_template%d)
47 o_html.flush()
48 o_html.close()
49 print("Wrote index.htm file")
50
51 return 0
52
53
void print(char *figname, TCanvas *c1)
int main()
Definition hello.cxx:18

Variable Documentation

◆ html_template

str root2html.html_template
Initial value:
1= """
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
3<html lang="en">
4 <head>
5 <meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=Edge">
6 <title>Read a ROOT file</title>
7 <link rel="shortcut icon" href="https://root.cern.ch/js/latest/img/RootIcon.ico">
8 <!-- To make use of RequireJS, un-comment the following line and comment the second line below -->
9 <!--script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.19/require.min.js" data-main="scripts/JSRootCore.js"></script-->
10 <script type="text/javascript" src="https://root.cern.ch/js/latest/scripts/JSRootCore.js?gui"></script>
11 </head>
12 <body>
13 <div id="simpleGUI" path="./" files="%(file_list)s">
14 loading scripts ...
15 </div>
16 </body>
17</html>
18"""

Definition at line 9 of file root2html.py.