ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/macros/doc/make_doc.C
Revision: 1.1
Committed: Thu Jul 16 13:13:55 2009 UTC (15 years, 9 months ago) by loizides
Content type: text/plain
Branch: MAIN
Log Message:
First version of make htlm docu

File Contents

# User Rev Content
1 loizides 1.1 // $Id: make_doc.C 2634 2006-03-06 22:26:15Z loizides $
2    
3     #if !defined(__CINT__) || defined(__MAKECINT__)
4     #include <iostream>
5     #include <fstream>
6     #include <TError.h>
7     #include <THashList.h>
8     #include <THtml.h>
9     #include <TList.h>
10     #include <TNamed.h>
11     #include <TRegexp.h>
12     #include <TROOT.h>
13     #include <TSystem.h>
14     #include <TDirectory.h>
15     #include <TString.h>
16     #include <TPRegexp.h>
17     #include <TObjArray.h>
18     #include <TObjString.h>
19     #include <TEnv.h>
20     #include <THtml.h>
21     #endif
22    
23     class MyHtml : public THtml
24     {
25     public:
26     MyHtml() {}
27     void SetIncludePath(const char *p) { fPathInfo.fIncludePath=p; }
28    
29     ClassDef(MyHtml, 0);
30     };
31    
32     void load_libs(const char *ln)
33     {
34     TDirectory::TContext context(0); // automatically restore gDirectory
35     TRegexp re(Form("lib%s*.so", ln), true);
36     TString lpath(gSystem->ExpandPathName("$CMSSW_BASE/lib/$SCRAM_ARCH"));
37     void *dir = gSystem->OpenDirectory(lpath);
38     if(!dir) return;
39     while(const char *file = gSystem->GetDirEntry(dir)) {
40     TString s(file);
41     if (s.Index(re) == kNPOS)
42     continue;
43     ::Info("make_doc","Loading %s", file);
44     gSystem->Load(file);
45     }
46     gSystem->FreeDirectory(dir);
47     }
48    
49     void make_doc()
50     {
51     // gEnv->SetValue("Root.Html.HomePage", get_config_var("HOMEURL"));
52     // gEnv->SetValue("Root.Html.ViewCVS", get_config_var("VIEWCVSURL"));
53    
54     MyHtml h;
55     h.SetProductName("MitRoot");
56    
57     // load our libraries
58     //load_libs("MitCommon");
59     load_libs("MitAna");
60     //load_libs("MitPhysics");
61    
62     h.SetInputDir("$CMSSW_BASE/src") ;
63     h.SetIncludePath(Form("%s/src/",gSystem->ExpandPathName("$CMSSW_BASE")));
64     h.SetClassDocTag("//------------------------------------------------------------");
65     h.SetViewCVS("http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/");
66     h.MakeAll(1,"mithep::Particle");
67     }
68