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

Functions

 main ()

Variables

str html_template

Function Documentation

◆ main()

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:
= """
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html lang="en">
<head>
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=Edge">
<title>Read a ROOT file</title>
<link rel="shortcut icon" href="https://root.cern.ch/js/latest/img/RootIcon.ico">
<!-- To make use of RequireJS, un-comment the following line and comment the second line below -->
<!--script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.19/require.min.js" data-main="scripts/JSRootCore.js"></script-->
<script type="text/javascript" src="https://root.cern.ch/js/latest/scripts/JSRootCore.js?gui"></script>
</head>
<body>
<div id="simpleGUI" path="./" files="%(file_list)s">
loading scripts ...
</div>
</body>
</html>
"""

Definition at line 9 of file root2html.py.