Example #1
0
void Find(THtml& h, TClass* cl, const char* hdr = "", const char* src = "") {
   TString fsname;
   Bool_t found = h.GetDeclFileName(cl, 1, fsname);
   FindAny(found, fsname, cl, hdr, ".h", "declaration");

   found = h.GetImplFileName(cl, 1, fsname);
   FindAny(found, fsname, cl, src, ".cxx", "implementation"); 
}
Example #2
0
makedoc()
//$ cat builddocs.C
{
    gSystem->Load("libAbsorptionMap.so");
    THtml html;
//    html.SetOutputDir("/Users/johanneskazantzidis/Documents/ESS/macros/STRAM/htmldoc/");
    //html.SetInputDir("$(ROOTSYS)");
    //html.SetInputDir("/Users/johanneskazantzidis/Documents/ESS/root/");
    //html.MakeAll();
    //html.SetInputDir("$(ROOTSYS):$(ROOTSYS)/include");
    //html.SetSourceDir("/Users/johanneskazantzidis/Documents/ESS/macros/STRAM/src/");
    html.SetProductName("Absorption map");
    html.MakeClass("AbsorptionMap");
}
Example #3
0
void runFindSource() {
   gErrorIgnoreLevel = kWarning;
   THtml h;
   h.SetInputDir("$ROOTSYS");

   Find(h, TObject::Class());
   Find(h, TH1::Class());
   Find(h, TH1F::Class(), "TH1.h", "TH1.cxx");

   Find(h, TClass::GetClass("TMath"));

   Find(h, TParameter<double>::Class());

   TClass* cl = TClass::GetClass("ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<double> >");
   Find(h, cl, "", "FAIL");

   Find(h, TClass::GetClass("TMVA::FitterBase"));

   Find(h, TClass::GetClass("RooAbsReal"));
   Find(h, TClass::GetClass("RooStats::PointSetInterval"));
   Find(h, TClass::GetClass("TMatrixTSparse<double>"));
}
Example #4
0
//______________________________________________________________________________
void htmldoc()
{
    gROOT->Reset();
    gSystem->Load("lib/libTAPSMaintain");

    THtml h;
    h.SetSourceDir(".");
    h.SetOutputDir("htmldoc");
    h.SetAuthorTag("* Author:");

    cout << "Sources: " << h.GetSourceDir() << endl;
    h.MakeAll();
}
Example #5
0
void makedoc(const TString& output_dir = "htmldoc")
{
   // load all libraries and generate class reference
   THtml h;
   h.SetProductName(Form("KaliVeda v%s", KVBase::GetKVVersion()));
   TString source_root = KVBase::GetKVSourceDir();
   h.SetInputDir(source_root);
   TString version = KVBase::GetKVVersion();
   TString maj_vers = version;
   maj_vers.Remove(maj_vers.Index("/"));
   version.ReplaceAll("/", ".");
   h.SetOutputDir(output_dir);
   h.SetViewCVS(Form("https://github.com/kaliveda-dev/kaliveda/blob/%s/", maj_vers.Data()));
   h.SetPathDefinition(KVPathDef());
   h.SetFileDefinition(KVFileDef());
   h.SetAuthorTag("//Author:");
   h.SetCopyrightTag("//Created");
   h.SetHomepage("http://indra.in2p3.fr/KaliVedaDoc");

   // "hide" the CMakeCache.txt & install_manifest.txt files
   // or links will be generated for them under "Further reading..."
   TString path = TString(KVBase::GetKVBuildDir()) + "/";
   TString f1 = path + "CMakeCache.txt";
   TString f2 = path + "install_manifest.txt";
   TString f11 = f1 + ".bck";
   TString f22 = f2 + ".bck";
   gSystem->Rename(f1, f11);
   gSystem->Rename(f2, f22);

   TString htmloutdir;
   if (gSystem->IsAbsoluteFileName(output_dir)) htmloutdir = output_dir;
   else htmloutdir = path + output_dir;
   TString our_head = path + "header.html";
   TString our_head_out = htmloutdir + "/header.html";
   gSystem->CopyFile(our_head, our_head_out);
   gSystem->Unlink(our_head);
   h.SetHeader(our_head_out);
   TString our_foot = path + "footer.html";
   TString our_foot_out = htmloutdir + "/footer.html";
   gSystem->CopyFile(our_foot, our_foot_out);
   gSystem->Unlink(our_foot);
   h.SetFooter(our_foot_out);

   h.MakeAll(kTRUE);

   gSystem->Rename(f11, f1);
   gSystem->Rename(f22, f2);

   TString our_css = path + "ROOT.css";
   TString our_css_out = htmloutdir + "/ROOT.css";
   gSystem->CopyFile(our_css, our_css_out);
   TString our_banner = path + "htmldoc_banner.png";
   TString our_banner_out = htmloutdir + "/htmldoc_banner.png";
   gSystem->CopyFile(our_banner, our_banner_out);
}
Example #6
0
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include "helper/common.h"
using namespace hext;


TEST(Builtins_TextBuiltin, ExtractsText)
{
  {
    THtml h(R"html(
<html><head></head><body>

   This is  <span> a</span><span> b</span>adly
f<span>ormatte</span>d<div><div>html</div>doc<a>ume</a>nt<span></span>.
<div><span></span>

</div>
</body></html>
  )html");
    EXPECT_EQ(TextBuiltin(h.root()), "This is a badly formatted html document.");
  }

  {
    THtml h("<div></div>");
    EXPECT_EQ(TextBuiltin(h.root()), "");
Example #7
0
void runMakeIndex() {
   THtml h;
   h.SetInputDir(getSrcDir());
   h.LoadAllLibs();
   h.MakeIndex();
}