StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
makedoc.C
1 // $Id: makedoc.C,v 1.60 2006/08/15 21:43:19 jeromel Exp $
2 //=======================================================================
3 // owner: Valery Fine
4 // what it does:
5 //=======================================================================
6  {
7  //*-- Author : Valery Fine 25/12/98
8  gROOT.Reset();
9  Char_t *libs[] = { "libTable", "Star2Root","St_base","xdf2root","St_Tables"
10  , "StChain","StUtilities","StBFChain"};
11 
12  TString AFS; // STAR root directory
13 
14  Char_t *suffix=0;
15  Int_t nlist = sizeof(libs)/sizeof(Char_t *);;
16  Bool_t NT=kFALSE;
17  if (strcmp(gSystem.GetName(),"WinNT") == 0 )
18  {
19  NT=kTRUE;
20  gSystem.Load("Root_html");
21  AFS = "//sol/afs_rhic";
22  }
23  else
24  AFS = "/afs/rhic";
25 
26  Char_t buffer[256];
27  if (NT) {
28  for(Int_t i=0;i<nlist;i++) {
29  strcpy(buffer,libs[i]);
30  if (gSystem.Load(buffer)) printf(" Loading DLL \"%s\" failed \n",buffer);
31  }
32 
33  }
34  else {
35  gSystem->Load("libTable");
36  gSystem->Load("Star2Root");
37  gSystem->Load("St_base");
38  gSystem->Load("St_baseTest");
39  gSystem->Load("xdf2root");
40  gSystem->Load("St_Tables");
41 
42 // gSystem->Load("global.sl");
43 // gSystem->Load("St_global");
44  gSystem->Load("StChain");
45  gSystem->Load("StUtilities");
46  gSystem->Load("StBFChain");
47 
48  gSystem->Load("St_TLA_Maker.so");
49  gSystem->Load("St_io_Maker.so");
50  gSystem->Load("St_xdfin_Maker");
51  gSystem->Load("StarClassLibrary");
52  gSystem->Load("StEvent");
53  //-- gSystem->Load("StPadDisplayMaker");
54  gSystem->Load("St_geom_Maker");
55  gSystem->Load("StEventDisplayMaker");
56 
57 // gSystem->Load("St_ebye_Maker");
58 // gSystem->Load("St_laser_Maker");
59 // gSystem->Load("St_run_Maker");
60 // gSystem->Load("St_tpctest_Maker");
61 
62 // gSystem->Load("St_calib_Maker");
63  }
64 
65 
66  //Create the object of the THtml class
67  THtml *html = new THtml();
68 
69  TString STAR = "$STAR/.$STAR_SYS/obj";
70  TString ROOTSYS = "$ROOTSYS/.$STAR_SYS/obj";
71 
72  TString sourcedir;
73  sourcedir = "$STAR";
74  if (!NT) {
75  sourcedir += ":";
76  sourcedir += "$STAR/include:";
77  sourcedir += "$STAR/include/tables:";
78  sourcedir += "$ROOTSYS/ROOT/root/STAR:";
79  sourcedir = STAR;
80  sourcedir += "/StRoot/St_base:";
81  sourcedir += STAR;
82  sourcedir += "/StRoot/St_baseTest:";
83  sourcedir += "$STAR";
84  sourcedir += "/.share/tables:";
85  sourcedir += "$STAR";
86  sourcedir += "/include:";
87  sourcedir += "$STAR";
88  sourcedir += "/include/tables:";
89  sourcedir += STAR;
90  sourcedir += "/StRoot/StEvent:";
91  sourcedir += STAR;
92  sourcedir += "/StRoot/StBFChain:";
93  sourcedir += STAR;
94  sourcedir += "/StRoot/StChain:";
95  sourcedir += STAR;
96  sourcedir += "/StRoot/St_TLA_Maker:";
97  sourcedir += STAR;
98  sourcedir += "/StRoot/StPadDisplay:";
99  sourcedir += STAR;
100  sourcedir += "/StRoot/StarClassLibrary:";
101  sourcedir += "$ROOTSYS";
102  sourcedir += "/src:";
103  sourcedir += STAR;
104  sourcedir += "/StRoot/St_geom_Maker:";
105  sourcedir += STAR;
106  sourcedir += "/StRoot/StEventDisplayMaker"; }
107 
108  TString lookup ;
109  if (NT) {
110  lookup = STAR;
111  lookup += "/.share/tables;../St_base;";
112  lookup += STAR;
113  lookup += ".share/St_base";
114  }
115  else {
116  lookup = "$STAR";
117  lookup += ":";
118  lookup += "$ROOTSYS/ROOT/root/STAR:";
119  lookup += "$ROOTSYS/include:";
120  lookup += "$STAR";
121  lookup += "/StRoot/StChain:";
122  lookup += "$STAR";
123  lookup += "/include:";
124  lookup += "$STAR";
125  lookup += "/include/tables:";
126  lookup += STAR;
127  lookup += "/StRoot/xdf2root:";
128  lookup += STAR;
129  lookup += "/.share/tables:";
130  lookup += STAR;
131  lookup += "/StRoot/St_base:";
132  lookup += STAR;
133  lookup += "/StRoot/StChain:";
134  lookup += STAR;
135  lookup += "/StRoot/StBFChain:";
136  lookup += STAR;
137  lookup += "/StRoot/St_baseTest:";
138  lookup += STAR;
139  lookup += "/StRoot/St_TLA_Maker:";
140  lookup += STAR;
141  lookup += "/StRoot/St_io_Maker:";
142  lookup += STAR;
143  lookup += "/StRoot/St_geom_Maker:";
144  lookup += STAR;
145  lookup += "/StRoot/StPadDisplayMaker:";
146  lookup += STAR;
147  lookup += "/StRoot/StEventDisplayMaker:";
148  lookup += STAR;
149  lookup += "/StRoot/StEvent:";
150  lookup += "$ROOTSYS";
151  lookup += "/src:";
152  lookup += STAR;
153  lookup += "/StRoot/StarClassLibrary";
154  }
155 
156 
157  html->SetSourceDir(lookup.Data());
158 
159  if (NT)
160  html->SetOutputDir("J:/Public/STAF/draft/base/html");
161  else
162  html->SetOutputDir("$STAR/StRoot/html");
163 
164  // Create the list of the classes defined with the loaded DLL's to be documented
165 
166  Char_t *classes[] = { "TTableSorter", "TCL", "StMicky", "TTableDescriptor"
167  ,"St_XDFFile", "St_Module", "TTable"
168  ,"TDataSet", "TDataSetIter", "TFileSet"
169  ,"StParticleView","TObjectSet", "TVolume", "TVolumePosition"
170  ,"StMaker", "StChain", "TVolumeView"
171  ,"table_head_st", "TVolumeViewIter", "TPolyLineShape"
172  ,"TPoints3D", "St_PolyLine3D", "TPointsArray3D"
173  ,"TTable3Points", "TTablePoints", "StDefaultFilter"
174  ,"St_io_Maker", "StHelix3DPoints", "StHits3DPoints"
175  ,"StObjArray", "StHit", "StHelixD"
176  ,"StTrack",
177  ,"St_geom_Maker", "StPadDisplayMaker", "St_TLA_Maker"
178  ,"StBFChain", "StEventDisplayMaker",
179  ,"StVirtualEventFilter", "TTableIter"
180  ,"St_srs_Maker", "St_xdfin_Maker"
181  };
182  Int_t nclass = 40;
183  html.MakeIndex();
184 
185  // Creat the definitions of the classes not derived from TObjects
186  if (NT) {
187  gROOT->LoadMacro("$STAF/inc/table_header.h");
188  }
189  else
190  gROOT->LoadMacro("$STAF/inc/table_header.h");
191 
192  TClass header1("table_head_st",1,"table_header.h","table_header.h");
193  // Create HTML subdirectory tree
194  const Char_t* htmlTree = "$STAR/StRoot/html";
195  if (gSystem->AccessPathName(htmlTree) && !NT) {
196  gSystem->MakeDirectory(htmlTree);
197  }
198 
199  // Make class descriptions
200  Int_t i=0;
201  for (i=0;i<nclass;i++) html.MakeClass(classes[i],kTRUE);
202 
203  // Make tables descriptions
204  St_FileSet tableDir("$STAR/include/tables");
205  St_DataSetIter nextTable(&tableDir);
206  St_DataSet *table = 0;
207  while (table = nextTable()) {
208  TString tabName = table.GetName();
209  tabName.ReplaceAll("St_","");
210  tabName.ReplaceAll("_Table.h","");
211  tabName += "_st";
212  html.MakeClass(tabName.Data());
213 
214  tabName = table.GetName();
215  tabName.ReplaceAll("_Table.h","");
216  html.MakeClass(tabName.Data());
217  }
218 
219  TString giffile = STAR;
220  giffile += "/StRoot/html/src/gif";
221  if (!NT) {
222  if (gSystem->AccessPathName(giffile.Data()) && !NT) {
223  // Create "gif" subdirectory for the first time
224  printf(" Image directiry is created: <%s>\n", giffile.Data());
225  gSystem->MakeDirectory(giffile.Data());
226  gSystem->Exec("cp /afs/rhic.bnl.gov/star/packages/pro/StRoot/html/src/gif/*.* /afs/rhic.bnl.gov/star/packages/adev/StRoot/html/src/gif");
227  }
228  // Create links
229  gSystem->Symlink("../src/gif","/afs/rhic.bnl.gov/star/packages/adev/StRoot/html/examples/gif");
230  gSystem->Symlink("src/gif","/afs/rhic.bnl.gov/star/packages/adev/StRoot/html/gif");
231  // Copy the old images into a new directrory
232 // gSystem->Exec("cp /afs/rhic.bnl.gov/star/packages/new/StRoot/html/src/gif/*.* /afs/rhic.bnl.gov/star/packages/adev/StRoot/html/src/gif")
233  }
234 
235  // Make HTML docs for the "plain" text files those are not in the dictionaries
236  cout << " Making HTML's for macros" << endl;
237  const Char_t *macros[] = {
238  "/test/micky.C" , "\"Micky\" to test the <matrix> and <triangilar matrix> methods"
239  , "/test/test10.C", "How to use the dataset iterator class"
240  , "/test/test9.C", "How to read the event from XDF file and build some histograms with ROOT"
241  , "/test/XDFcopy.C", "How to read/write XDF file"
242  , "/test/XDFtest.C", "How to read/write XDF and ROOT files"
243  , "/graphics/TurnDisplay.C", "Macro to plug StEventDisplayMaker into chain and turn it on."
244  , "/graphics/SetObjectFilter.C", "Macro to adjust the parameters of the current \"event filter\"."
245  , "/graphics/TrackFilters/StTrackFilter.cxx", "an example of the implementation of the \"advanced\" event filter."
246  , "/graphics/TrackFilters/StTrackFilter.h", "an example of the definition of the \"advanced\" event filter."
247  , "/graphics/boldStyle.C", "Style file for making presentation histograms."
248  , "/graphics/videoStyle.C", "Style file for video presentation histograms."
249  , "/graphics/PadBrowser.C", "How to use St_geom_Maker and StPadDisplayMaker"
250  , "/graphics/basic3dPrimitives.C","An example of the basic 3D STAR object"
251  , "/graphics/EventPanel.C", "An example of the ToolBar to control an applications"
252  , "/graphics/DrawTpcHits.C", "How to draw 3D view for hits and"
253  , "/graphics/DrawTrackTpcHits.C", "How to draw 3D view for hits and tracks"
254  , "/graphics/PadControlPanel.C", "How to manipulate with 3D pad images"
255  , "/graphics/HitsDraw.C", "3D drawing of the STAR Geometry and the hits from the STAF table"
256  , "/graphics/SubDetectorView.C", "How to create sub-detector view"
257  , "/graphics/StarFromWeb.C", "Access to ROOT/GEANT geometry database"
258  , "/graphics/STAR_shapes.C", "Test for the basic STAR GEOMETRY classes"
259  , "/graphics/StarView.C", "How to Draw the local STAR 3D geometry"
260  , "/graphics/StarWebView.C", "How to Draw the remote STAR 3D geometry"
261  , "/graphics/StarGeom.C", "An example of the ROOT/STAR/GEANT interface"
262 
263  , "/html/GetEvent.C", "An example of the reading MDC2 dst events"
264  , "/html/makedoc.C", "How to create the HTML documentation"
265 
266  , "/QA_Hist_Draw.C", "An example of the plotting postscript file of the MDC2 histograms"
267 
268  , "/examples/TestSorter.C", "An example of the STAF table sort utility"
269  , "/examples/XDFBrowser.C", "XDF file interactive ROOT browser"
270 
271  , "/tss.C" , "\"TPC slow simulator\" chain"
272  , "/bfc.C", "An example of the \"Big Full Chain\" production chain"
273  , "/bfcx.C", "An example of the \"Big Full Chain\" production chain"
274  , "/ebye.C", "An example of\"Event by Event\" production chain"
275  , "/STAR_Demos.C", "The source of the STAR_demos macro"
276 };
277 
278  if (NT) {
279  html.Convert("//hepburn/common/p32/root/star/macros/CallMevSaveXDF.cxx","How to call STAF module");
280  html.Convert("//hepburn/common/p32/root/star/macros/par_anal.cxx","How to pick the XDF file up with ROOT");
281  html.Convert("//hepburn/common/p32/root/star/macros/MakeHists.cxx","How to read the event from XDF file and build some histograms with ROOT");
282  }
283  else {
284  html.Convert("./CallMevSaveXDF.cxx","How to call STAF module");
285  html.Convert("./par_anal.cxx","How to pick the XDF file up with ROOT");
286  html.Convert("./MakeHists.cxx","How to read the event from XDF file and build some histograms with ROOT");
287  }
288 
289 // html.Convert("./par_anal.cxx","How to create several histrograms from XDF file");
290 
291 // html.Convert("./laser.C","An example of the analysis of laser events equivalent to Iwona's old tst.kumac");
292 // html.Convert("./tst.kumac","An example of Iwona's old tst.kumac of the analysis of laser events");
293 // html.Convert("./tpctest.C","ROOT based TPC test analysis");
294 
295  Int_t lmacros = sizeof(macros)/sizeof(Char_t *);
296  for (int i = 0; i < lmacros; i+=2) {
297  TString starRoot = "$STAR/StRoot/macros";
298  starRoot += macros[i];
299  html.Convert(starRoot.Data(),macros[i+1]);
300  // cout << starRoot.Data() << macros[i+1] << ";" << endl;
301  }
302 
303  html.MakeClass("EModuleTypes");
304  html.MakeIndex();
305 }
306 
307 //___________________________________________________________________________
308 //___________________________________________________________________________
309 // $Log: makedoc.C,v $
310 // Revision 1.60 2006/08/15 21:43:19 jeromel
311 // Fix rhic -> rhic.bnl.gov
312 //
313 // Revision 1.59 2003/04/30 20:40:17 perev
314 // Warnings cleanup. Modified lines marked VP
315 //
316 // Revision 1.58 2001/09/10 13:48:00 jeromel
317 // Modif by Valeri but not commited
318 //
319 // Revision 1.57 2001/09/10 01:37:55 jeromel
320 // dev -> adev
321 //
322 // Revision 1.56 2000/08/27 19:01:19 fine
323 // StDefaultFilter docs added
324 //
325 // Revision 1.55 2000/05/30 00:00:37 fine
326 // Correction to create STAR/ROOT classes html docs
327 //
328 // Revision 1.54 2000/04/18 23:31:16 fine
329 // adjusted to ROOT 2.24
330 //
331 // Revision 1.53 2000/02/24 02:23:47 fine
332 // St_Table html docs generationn added
333 //
334 // Revision 1.52 1999/12/15 23:55:14 fine
335 // St_TableIter doc included
336 //
337 // Revision 1.51 1999/12/15 22:41:24 fine
338 // clean up
339 //
340 // Revision 1.50 1999/12/15 22:33:30 fine
341 // new class StVirtualEventFilter doc added
342 //
343 // Revision 1.49 1999/12/15 22:29:55 fine
344 // new macros added
345 //
346 // Revision 1.48 1999/12/13 17:05:42 fine
347 // new marcos TurnDisplay.C SetObjectFilter included
348 //
349 // Revision 1.47 1999/12/11 00:27:14 fine
350 // StBFChain has been added
351 //
352 // Revision 1.46 1999/11/18 13:21:45 fine
353 // Adjusted to the new source tree
354 //
355 // Revision 1.45 1999/10/29 16:45:06 fine
356 // new macro videoStyle and bolStyle have been introduced
357 //
358 // Revision 1.44 1999/10/03 00:09:53 fine
359 // New classes docs StMicky and StCL have been introduced
360 //
361 // Revision 1.43 1999/09/26 02:59:54 fine
362 // html for RMath has been introduced
363 //
364 // Revision 1.42 1999/09/14 15:30:40 fine
365 // makedocs adjusted to the new source tree
366 //
367 // Revision 1.41 1999/09/12 01:09:57 fine
368 // Adjusted to the new source tree
369 //
370 // Revision 1.40 1999/08/07 18:36:33 fine
371 // StDisplayMaker has been included into makedoc
372 //
373 // Revision 1.39 1999/07/10 22:59:55 fine
374 // St_TLA_Maker docs was introduced
375 //
376 // Revision 1.38 1999/06/30 16:29:04 fine
377 // New scheme to create gif directories. St_geom_Maker introduced
378 //
379 // Revision 1.37 1999/06/11 21:41:19 fine
380 // StarClassLibary share lib is to be loaded
381 //
382 // Revision 1.36 1999/06/07 22:56:45 fisyak
383 // Add EventRead
384 //
385 // Revision 1.35 1999/06/04 01:46:09 fine
386 // New examples have been included
387 //
388 // Revision 1.34 1999/06/02 16:32:46 fine
389 // PadControlPanel macro html has been introduced
390 //
391 // Revision 1.33 1999/06/01 01:46:41 fine
392 // New classes have been added StTrack, StHit, StHelixD StObjArray
393 //
394 // Revision 1.32 1999/05/23 21:36:40 fine
395 // New class have been introduce for html
396 //
397 // Revision 1.31 1999/05/21 15:33:59 kathy
398 // made sure Log & Id are in each file and also put in standard comment line with name of owner
399 //
400 //___________________________________________________________________________