File MiniGeantDoc.C: Document MiniGeant package

#include <fstream>

int
MiniGeantDoc(void)
{
  gROOT->Reset();

  gROOT->LoadMacro("MiniGeantLoad.C");
  MiniGeantLoad();
  

  const char* classes[] = { "Cave",     
			    "Detector", 
			    "Hodoscope",
			    "Magnet",
			    "Particle",
			    "Vector" };

  const char* macros[] = { "MiniGeantLoad.C",
			   "MiniGeantDoc.C",
			   "minigbrahms.cc" };
  const char* titles[] = { "Load MiniGeant shared library", 
			   "Document MiniGeant package",
			   "Example of use" };
  
  THtml *html = new THtml; 

  html->SetSourceDir(".");
  html->SetOutputDir("html");
  
  ofstream index("html/index.html", ios::out|ios::trunc);
  if (!index) {
    cout << "Couldn't open html/index.html" << endl;
    return 1;
  }
  
  html->WriteHtmlHeader(index, "The MiniGeant package");
  
  index << "<h1>The MiniGeant package</h1>"  << endl << endl
	<< "<h3>Introduction</h3>" << endl 
	<< "<p>The MiniGeant package is a small toy detector simulator "
	<< "written in C++. Although useful along with ROOT, it can"
	<< "stand on it's own two feet</p>" << endl
	<< "<p>This package was developed over the course of the " 
	<< "HEHI course <i>Programmering i C++</i>, held by "
	<< "<a href="http://www.nbi.dk/~aholm">Anders Holm</a> "
	<< "and <a href="http://www.nbi.dk/~cholm">Christian Holm</a> "
	<< "(No - no relation).</p>" << endl
	<< "The source is avalible as a gzipped tar file "
	<< "<a href="../minigeant.tar.gz">here</a>.</p>" << endl
	<< "<h3>Classes</h3>" << endl
	<< "<table border=0>" << endl;
  
  TClass *cl;
  for (int i = 0; i < 6; i++) {
    cl = gROOT->GetClass(classes[i]);

    html->MakeClass(classes[i]);

    index << "<tr><td><a href="" 
	  << classes[i]     << ".html">" 
	  << classes[i]     << "</a></td><td>"
	  << cl->GetTitle() << "</td></tr>" << endl;
  }
  
  index << "</table>"          << endl
	<< "<h3>Examples</h3>" << endl
	<< "<table border=0>"  << endl;
  
  for (int i = 0; i < 3; i++) {
    TString title = TString("File ");
    title += macros[i];
    title += ": ";
    title += titles[i];
    html->Convert(macros[i], title->Data(), "html");
    
    index << "<tr><td><a href=""
	  << macros[i] << ".html">" 
          << macros[i] << "</a></td><td>"
	  << titles[i] << "</td></tr>" << endl;
  }
  
  index << "</table>" << endl << endl;
  


  TDatime* now = new TDatime; 
  html->WriteHtmlFooter(index, 
			"", 
			now->AsString(), 
			"Christian Holm",
			"Christian Holm/HEHI");

  index.close();

  return 0;
}


  




  


ROOT page - Home page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.