1 |
loizides |
1.3 |
// $Id: make_doc.C,v 1.2 2009/07/16 13:39:12 loizides Exp $
|
2 |
loizides |
1.1 |
|
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 |
|
|
MyHtml h;
|
52 |
|
|
h.SetProductName("MitRoot");
|
53 |
|
|
|
54 |
|
|
// load our libraries
|
55 |
loizides |
1.2 |
load_libs("MitCommon");
|
56 |
loizides |
1.1 |
load_libs("MitAna");
|
57 |
loizides |
1.2 |
load_libs("MitPhysics");
|
58 |
loizides |
1.1 |
|
59 |
loizides |
1.3 |
TString cb(gSystem->ExpandPathName("$CMSSW_BASE"));
|
60 |
|
|
h.SetInputDir("$CMSSW_BASE/src:$CMSSW_BASE/src/MitAna/TAM/interface:$ROOTSYS/include");
|
61 |
|
|
h.SetIncludePath(Form("%s/src/:%s/src/MitAna/TAM/interface/",cb.Data(),cb.Data()));
|
62 |
loizides |
1.1 |
h.SetClassDocTag("//------------------------------------------------------------");
|
63 |
|
|
h.SetViewCVS("http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/");
|
64 |
loizides |
1.3 |
h.SetLibURL(gSystem->ExpandPathName("$ROOTSYS/lib"),"http://root.cern.ch/root/html522");
|
65 |
|
|
h.MakeAll(0,"*");
|
66 |
|
|
//h.MakeClass("TAM*",0);
|
67 |
|
|
//h.MakeIndex();
|
68 |
loizides |
1.1 |
}
|