Heavy ion Analysis Libriares
|
Public Member Functions | |
HtmlCore () | |
virtual Bool_t | CanBeTableElement (TObject *obj) |
Static Public Member Functions | |
static HtmlCore * | Instance () |
static TString | GetJsDiv (TString root_file, TString object_name, TString draw_opt="colz", TString draw_div_name="drawing") |
static TString | GetUrl (TString adress, TString text) |
static TString | ClickablePic (TString id_name, TObjArray *strings, Int_t width=796, Int_t height=572) |
static TString | GetLinkToHistogram (TH1 *h, Int_t no, TString path) |
static TString | GetRelativePath (TString path) |
static TString | GetHideButtonTable (TString tableName, TString text) |
static TString | GetHideButtonRow (TString listName, TString text) |
static void | FixAddress (TString &address) |
static Bool_t | IsOnline () |
static TString | CheckBr (TString text) |
static TString | GetLastDir (TString name, Int_t cut=1) |
static void | SetOnline (Bool_t online) |
static void | SetMainDir (TString name) |
static void | SetMainDirAndExtract (TString name) |
static void | ResetMainDir () |
static void | CopyCss (TString dir, TString css_name="table.css") |
static void | CopyJs (TString dir) |
static TString | HTMLExtract (TObject *obj, Int_t no, TString dir="") |
static void | HTMLExtractIntoTable (TObject *obj, Int_t no, HtmlTable &table, TString dir="", TString rel_dir="") |
Definition at line 23 of file HtmlCore.h.
Hal::HtmlCore::HtmlCore | ( | ) |
default constructor, that is not used already
Definition at line 71 of file HtmlCore.cxx.
|
inlinevirtual |
Definition at line 176 of file HtmlCore.h.
|
virtual |
TODO
obj |
Definition at line 162 of file HtmlCore.cxx.
|
static |
check if text contains new line character if yes then add
tags
text |
Definition at line 202 of file HtmlCore.cxx.
|
static |
Create clickable pictures, after each clicking one picture wiil be replaced by next picture.
id_name | name of ocject (shoul be unique on each page) |
strings | - array with names of the pictures in TObjString objects, first object will be displayed by default |
width | width of picture, if <=0 not used |
height | height of picture, if <=0 not used |
Definition at line 166 of file HtmlCore.cxx.
|
static |
copy css file into specified place
dir | target place |
css_name | name of table with template, currently default value should be used |
Definition at line 33 of file HtmlCore.cxx.
|
static |
|
static |
fix HTML adress by removing double slashes and add shlash at the end of adress if not present
address |
Definition at line 101 of file HtmlCore.cxx.
|
static |
returns button tag for hidding list
listName | id of list |
text | text on button |
Definition at line 253 of file HtmlCore.cxx.
|
static |
returns button tag for hiding table
tableName | id of table to hide |
text | text on button |
Definition at line 249 of file HtmlCore.cxx.
|
static |
root_file | path to root file |
object_name | name of displayed object (take care about ;1!) |
draw_opt | drawing option |
draw_div_name | name of div where plot will be painted (should be unique) |
Definition at line 226 of file HtmlCore.cxx.
|
static |
Definition at line 210 of file HtmlCore.cxx.
|
static |
h | histogram to show |
no | number of histogram (avoid overwriting histogram) |
path | path to histogram |
Definition at line 257 of file HtmlCore.cxx.
|
static |
path | path from "core directory" to "this directory" |
Definition at line 184 of file HtmlCore.cxx.
|
static |
return URL to file
adress | adress of file |
text | name of URL |
Definition at line 164 of file HtmlCore.cxx.
|
static |
extract this object into HTML
obj | object to export |
no | (used to numbering directories to avoid name conflicts) |
dir | directory where object should be extracted |
Definition at line 282 of file HtmlCore.cxx.
|
static |
extract this object into html table table, currently this function is not used
obj | object to extract |
no | object number |
table | table to extract this object |
dir | directory to extract the strucuture of object |
rel_dir | relative path from this to dir |
TODO if (dynamic_cast<TList*>(obj)) { TList* list = static_cast<TList*>(obj); HalHtmlRow row; row.SetClass(HalHtmlTableRowStyles::DefStyle()); HalHtmlCell cell1(Form("%i", no)); cell1.SetColSpan(2); row.AddContent(cell1); row.AddContent(HalHtmlCell("TList")); row.AddContent(HalHtmlCell(list->GetName())); TString rowButton = HalHtmlCore::GetHideButtonRow(Form("list_%i", no), "Show/Hide"); row.AddContent(HalHtmlCell(rowButton)); table.AddContent(row); TString list_path = Form("%s/list_%i", dir.Data(), no); gSystem->mkdir(list_path); TString list_dir = Form("list_%i/", no); TString list_dir2 = Form("list_%i/", no); auto addToUrl = [](TString add_dir, TString url) { if (!url.Contains("href")) { return url; } Int_t start_url = url.First("=") + 2; TString first = url(0, start_url); TString end = url(start_url, url.Length()); TString output = Form("%s%s%s", first.Data(), add_dir.Data(), end.Data()); output.ReplaceAll("//", "/"); return output; }; list_dir2 = Form("%s/list_%i/", path_url.Data(), no); for (int i = 0; i < list->GetEntries(); i++) { TObject* obj = list->At(i); TString name = obj->GetName(); TString classname = obj->ClassName(); TString temp_classes = Form("%s list_%i", HalHtmlTableRowStyles::DefStyle().Data(), no); HalHtmlRow rowElement("", temp_classes, "display:none"); rowElement.AddContent(HalHtmlCell()); rowElement.AddContent(HalHtmlCell(Form("%i", i))); rowElement.AddContent(HalHtmlCell(obj->ClassName())); if (classname == "HalPackage") { classname = Form("HalPackage [%s] ", ((HalPackage*) obj)->GetName()); // rowElement.AddContent(HalHtmlCell(classname)); } else { rowElement.AddContent(HalHtmlCell(obj->GetName())); } rowElement.AddContent(HalHtmlCell(addToUrl(rel_dir, HalHtmlCore::HTMLExtract(obj, i, list_path)))); table.AddContent(rowElement); } }
Definition at line 110 of file HtmlCore.cxx.
|
static |
Definition at line 81 of file HtmlCore.cxx.
|
inlinestatic |
Definition at line 108 of file HtmlCore.h.
|
inlinestatic |
Definition at line 139 of file HtmlCore.h.
|
static |
set main diretory. It's place where first CSS file and javascritp files are created. So it should be set only once per one exporting of file/object/taks into HTML. Other objects are inside of main dir - so setting value for them is not necessary
only once - and after extraction of data this value shold be resteed.
name |
Definition at line 89 of file HtmlCore.cxx.
|
static |
set this directory as a main and extract there Jss and css files, should be used together with HTMLEXtract for single objects
name |
Definition at line 95 of file HtmlCore.cxx.
|
inlinestatic |
online | if true - use url from JSroot page, don;t use own JS files |
Definition at line 120 of file HtmlCore.h.