20using std::ostream, std::ofstream, std::cout, std::endl;
33 static const char* tag[] = {
"<",
"^",
">"};
34 static const char*
name[] = {
"prev",
"up",
"next"};
46 if (
id != 1) title =
n->GetName();
47 if (title.
Length()) title +=
": ";
48 title +=
n->GetTitle();
51 if (!
n->GetName()[0])
mytag =
"";
54 "<a class=\"contextheadarrow\" href=\"%s.html\">%s</a></div></td>",
58 "<a class=\"contextheadentry\" href=\"%s.html\">%s</a></td>",
80 links =
"<div id=\"toplinks\"><div class=\"descrhead\">"
81 "<table class=\"descrtitle\" id=\"contexttitle\"><tr class=\"descrtitle\">";
96 links +=
TString(
"</tr></table></div><h1 class=\"convert\">") + title +
"</h1></div>\n";
106 links +=
TString::Format(
"<div class=\"location\"><h2>From <a href=\"http://root.cern/viewvc/trunk/tutorials/%s\">$ROOTSYS/tutorials/%s</a></h2></div>",
128 docout.WriteHtmlFooter(out);
139 cout <<
"writingItem: " <<
numb <<
", ref=" << ref <<
", name=" <<
name <<
", title=" << title << endl;
140 if (
isnew)
imagenew =
" <img src=\"http://root.cern/root/images/new01.gif\" alt=\"new\" align=\"top\" />";
141 out <<
"<li class=\"idxl" <<
numb%2 <<
"\">";
142 out <<
"<a href=\"" << ref <<
"\"><span class=\"typename\">" <<
numb <<
". " <<
name <<
"</span></a> "
143 << title <<
imagenew <<
"</li>" << endl;
156 const char *
dir =
lnk->GetObject()->GetName();
157 const char *title =
lnk->GetObject()->GetTitle();
158 out <<
"<li class=\"idxl" << (
n++)%2 <<
"\"><a href=\"" <<
dir <<
"/index.html\">"
159 <<
"<span class=\"typename\">" <<
dir <<
"</span></a>" << title <<
"</li>" << endl;
174 {
"hist",
"Histograms"},
175 {
"graphics",
"Basic Graphics"},
176 {
"graphs",
"TGraph, TGraphErrors, etc"},
177 {
"gui",
"Graphics User Interface"},
178 {
"fit",
"Fitting tutorials"},
179 {
"fitsio",
"CFITSIO interface"},
180 {
"io",
"Input/Output"},
181 {
"tree",
"Trees I/O, Queries, Graphics"},
182 {
"math",
"Math tutorials"},
183 {
"matrix",
"Matrix packages tutorials"},
184 {
"geom",
"Geometry package"},
185 {
"gl",
"OpenGL examples"},
186 {
"eve",
"Event Display"},
187 {
"fft",
"Fast Fourier Transforms"},
188 {
"foam",
"TFoam example"},
189 {
"image",
"Image Processing"},
190 {
"mlp",
"Neural Networks"},
191 {
"net",
"Network, Client/server"},
192 {
"physics",
"Physics misc"},
193 {
"proof",
"PROOF tutorials"},
194 {
"pyroot",
"Python-ROOT"},
195 {
"pythia",
"Pythia event generator"},
196 {
"quadp",
"Quadratic Programming package"},
197 {
"roofit",
"RooFit tutorials"},
198 {
"roostats",
"Roostats tutorials"},
199 {
"spectrum",
"Peak Finder, Deconvolutions"},
200 {
"splot",
"TSPlot example"},
201 {
"sql",
"SQL Data Bases interfaces"},
202 {
"thread",
"Multi-Threading examples"},
203 {
"unuran",
"The Unuran package"},
204 {
"xml",
"XML tools"},
209 ofstream
fptop(
"htmldoc/tutorials/index.html");
214 fptop <<
"<ul id=\"indx\">" << endl;
239 fptop <<
"</ul>" << endl;
240 fptop <<
"<p><a href=\"https://root.cern/install/\">Download ROOT</a> and run the tutorials in $ROOTSYS/tutorials yourself!</p>" << endl;
320 static const char*
vetoed[] = {
332 "rs401d_FeldmanCousins",
333 "graph_edit_playback",
365 topLinks.ReplaceAll(
"href=\"",
"href=\"../");
366 topLinks.ReplaceAll(
"href=\"../http://",
"href=\"http://");
367 topLinks.ReplaceAll(
"href=\"../https://",
"href=\"https://");
368 topLinks.ReplaceAll(
".html\"",
"/index.html\"");
370 topLinks.ReplaceAll(
"<h1 class=\"convert\">",
"<h1 class=\"convert\">ROOT Tutorials: ");
372 fpind <<
"<ul id=\"indx\">" << endl;
382 printf(
"MakeTutorials.C: error opening directory %s",
inpath.Data());
391 if (!
CC || *(
CC+2))
continue;
407 if (compile)
named->SetBit(
BIT(14));
423 if (!
gROOT->IsBatch()) {
439 gROOT->GetListOfCanvases()->Delete();
441 gROOT->GetListOfFunctions()->Delete();
442 gROOT->GetListOfBrowsers()->Delete();
443 gROOT->GetListOfGeometries()->Delete();
448 gROOT->SetStyle(
"Default");
451 fpind <<
"</ul>" << endl;
461 gEnv->
SetValue(
"Unix.*.Root.Html.SourceDir",
"$(ROOTSYS)");
462 gEnv->
SetValue(
"Root.Html.ViewCVS",
"http://root.cern/viewcvs/trunk/%f?view=log");
463 gEnv->
SetValue(
"Root.Html.Search",
"http://www.google.com/search?q=%s+site%3A%u");
467 html.CreateAuxiliaryFiles();
Bool_t IsNew(const char *filename)
void writeHeader(THtml &html, ostream &out, const char *title, const char *relPath="../")
void AppendLink(TString &links, int id, const TNamed *n)
Bool_t CreateOutput_Tutorial(const char *tut)
void GetMacroTitle(const char *fullpath, TString &comment, Bool_t &compile)
void writeItem(ostream &out, Int_t numb, const char *ref, const char *name, const char *title, Bool_t isnew)
void writeTutorials(THtml &html)
void scandir(THtml &html, const char *dir, const char *title, TObjLink *toplnk)
void writeTrailer(THtml &html, ostream &out)
Bool_t CreateOutput_Dir(const char *dir)
void MakeTopLinks(TString &links, const char *name, const char *title, const char *upLink, const char *upTitle, TObjLink *lnk, const char *dir)
void writeItemDir(THtml &html, ostream &out, TObjLink *lnk)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
This class stores the date and time with a precision of one second in an unsigned 32 bit word (950130...
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Legacy ROOT documentation system.
The TNamed class is the base class for all named ROOT classes.
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).
Wrapper around a TObject so it can be stored in a TList.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static void BuildStyles()
Create some standard styles.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
virtual void * OpenDirectory(const char *name)
Open a directory. Returns 0 if directory does not exist.
virtual int MakeDirectory(const char *name)
Make a directory.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual const char * GetDirEntry(void *dirp)
Get a directory entry. Returns 0 if no more entries.
virtual int Unlink(const char *name)
Unlink, i.e.