Fork me on GitHub

source: git/doc/root_tree_html.sh@ ff8307a

ImprovedOutputFile Timing dual_readout llp
Last change on this file since ff8307a was d7d2da3, checked in by pavel <pavel@…>, 11 years ago

move branches/ModularDelphes to trunk

  • Property mode set to 100755
File size: 2.0 KB
Line 
1#! /bin/sh
2
3if [ $# -ne 1 ]
4then
5 echo " Usage: $0 output_file"
6 echo " output_file - output file in HTML format."
7 exit
8fi
9
10awk '
11 BEGIN {
12 print "<html>"
13
14 print "<head>"
15 print " <meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">"
16 print " <meta NAME=\"keywords\" CONTENT=\"root, tree, ntuple, format, description\">"
17 print " <title>root tree description</title>"
18 print "</head>"
19
20 print "<body>"
21
22 print "<H1>root tree description</H1>"
23
24 print "<hr>"
25 print "<H2>Classes</H2>"
26 print "<hr>"
27
28 print "<table style=\"border: 1px dotted;\" align=\"center\" border=\"0\" cellpadding=\"7\" cellspacing=\"3\" widt=\"95%\">"
29 print "<tr><td><b>Parameter</b></td>"
30 print "<td><b>Definition</b></td>"
31 print "<td><b>How it was calculated</b></td></tr>"
32 }
33
34 function print_line(name, comment, even, end) {
35 if(name != ""){
36 if(even) print "<tr bgcolor=\"#eeeeee\">"
37 else print "<tr bgcolor=\"#ffffff\">"
38 print " <td>"name"</td>"
39 split(comment, a, "|");
40 print " <td>"a[1]"</td>"
41 print " <td>"a[2]"</td>"
42 print "</tr>"
43 }
44 }
45
46 /^ *class /{
47 print_line(name, comment, even, 1);
48 even = 0;
49 name = "";
50 comment = "";
51 split($2, a, ":");
52 if(a[1] == "Candidate" || a[1] == "DelphesFactory;") next;
53 print "<tr bgcolor=\"#ffffff\"><td colspan=3><hr><a name=\""a[1]"\"><H3>"a[1]"</H3><hr></td></tr>"
54 }
55
56 /: public [^S]/{
57 if($4 == "TObject") next;
58 name = sprintf("<a href=\"#%s\">%s</a>", $4, $4);
59 split($2, a, ":");
60 comment = sprintf("%s inherits all %s parameters", a[1], $4);
61 }
62
63 /^ *[A-Za-z_]* [A-Za-z].*; \/\/ / {
64 print_line(name, comment, even, 0);
65 split($2, a, ";");
66 name = a[1];
67 split($0, a, "// ");
68 comment = a[2];
69 even = !even;
70 }
71
72 /^ +\/\/ /{split($0, a, "// "); comment = comment" "a[2]}
73 END {
74 print_line(name, comment, even, 1);
75 print "</table>"
76 print "</body></html>"
77 }' ../classes/DelphesClasses.h >> $1
78
Note: See TracBrowser for help on using the repository browser.