StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MakeDoc.C
1 {
2  gSystem->Load("libRootKernel");
3  new THtml;
4  TString src = gHtml->GetSourceDir();
5  src += ":../:$ROOTSYS/include";
6  gHtml->SetSourceDir(src.Data());
7  const char *clNames[] =
8  {
9  "TChair"
10  , "TCL"
11  , "TColumnView"
12  , "TDataSet"
13  , "TDataSetIter"
14  , "TDsKey"
15  , "TFileSet"
16  , "TFileIter"
17  , "TGenericTable"
18  , "TObjectSet"
19  , "TTable"
20  , "TTableDescriptor"
21  , "TTableIter"
22  , "TTableSorter"
23  , "TTableMap"
24  , "TModule"
25  , "TMemoryInfo"
26  , "TPoints3D"
27  , "TPointsArray3D"
28  , "TPolyLineShape"
29  , "TResponseTable"
30  , "TTable3Points"
31  , "TTablePoints"
32  , "TVolume"
33  , "TVolumePosition"
34  , "TVolumeView"
35  , "TVolumeViewIter"
36  , "TVOLUME::iterator"
37  };
38  int nClasses = sizeof(clNames)/sizeof(char *);
39  int i;
40  for (i=0;i<nClasses;i++) {
41  gHtml->MakeClass(clNames[i]);
42  }
43  printf("\n Generate an example Web pages\n");
44  const char *testSubdirectory = "test/";
45 
46  const char *macroNames[] = {
47  "MapTableTest.C","Complex example of generating \"Event-like\" structure"
48  ,"SmallMapTest.C","Reference from of table to another table"
49  ,"TestFileIter.C","How to loop over ROOT file event by event"
50  ,"staffEx17.C", "example of the table analysis a'la PAW example #17"
51  ,"GenericTable.C","Generic table demo / test"
52  ,"TestDataSet.C", "TDataSet methods demo/test"
53  ,"staff.C", "ASCII file reading and analyzing"
54  ,"staffEx18.C", "Example of the table analysis a'la PAW example #18"
55  ,"P2ATest.C", "Example how to create a ROOT file for Pythia event generator"
56  ,"LoadPythia.C", "Example how to load the share libraries one needs to read Pythia ROOT files"
57  ,"ReadPythia.C", "Example how to read and loop over the events created by Pythia"
58  ,"MakeDoc.C", "How to create HTML documentation"
59  };
60  int nMacros = sizeof(macroNames)/sizeof(char *);
61  const char *htmlHead[] = {
62  "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">"
63  ,"<HTML>"
64  ,"<HEAD>"
65  ," <TITLE>RootKernel Tutorials</TITLE>"
66  ," <META NAME=\"rating\" CONTENT=\"General\">"
67  ," <META NAME=\"objecttype\" CONTENT=\"Manual\">"
68  ," <META NAME=\"keywords\" CONTENT=\"RootKernel software development, oo, object oriented, unix, x11, motif, windows nt, c++, html, valeri fine\">"
69  ," <META NAME=\"description\" CONTENT=\"ROOT Kernel - C++ class library for an Object Oriented Framework For Large Scale Data Analysis ROOT\">"
70  ,"</HEAD>"
71  ,"<CENTER><P><LINK rev=made href=\"mailto:fine@bnl.gov\"></P></CENTER>"
72  ,"<H1 ALIGN=CENTER><FONT SIZE=+4>RootKernel Tutorials</FONT></H1>"
73  ,"<P>"
74  ,"<HR></P>"
75  };
76  TString flName = gHtml->GetOutputDir();
77 
78  flName += "/examples/index.html";
79  FILE *htmlTestIndex = fopen(flName.Data(),"w");
80  if (htmlTestIndex) {
81  int lHead = sizeof(htmlHead)/sizeof(char *);
82  int i=0;
83  for (i=0;i<lHead;i++) fprintf(htmlTestIndex,"%s\n",htmlHead[i]);
84 
85  for (i=0;i<nMacros;i++) {
86  TString s = testSubdirectory;
87  s += macroNames[i++];
88  gHtml->Convert(s.Data(),macroNames[i]);
89  fprintf(htmlTestIndex,"<LI><A HREF=\"%s.html\">%s</A></LI>\n",macroNames[i-1],macroNames[i]);
90  }
91  TDatime today;
92  fprintf(htmlTestIndex,"<P>\n<HR></P>\n<ADDRESS><A HREF=\"mailto:fine@bnl.gov\">Valeri Fine</A>\n</A>Last update");
93  fprintf(htmlTestIndex,"%s",today.AsString());
94  fprintf(htmlTestIndex," by VF</ADDRESS>\n</BODY>\n</HTML>\n");
95  fclose(htmlTestIndex);
96  printf(" File \"%s\" has been created\n",flName.Data());
97  }
98  gHtml->MakeIndex("T*");
99  const char *classIndexFile = ".._Index.html");
100  printf(" Class Index has been created with \"%s\" \n",classIndexFile);
101 }