9void MakeRCanvasJS(
const char *MacroName,
const char *IN,
const char *OutDir,
bool cp,
bool py)
29 canv->SaveAs(json_file.
Data());
33 std::ifstream fjson(json_file.
Data());
34 json_str = std::string((std::istreambuf_iterator<char>(fjson)), std::istreambuf_iterator<char>());
40 fprintf(fh,
"<div id=\"draw_json_%s\" style=\"position: relative; width: 700px; height: 500px;\"></div>\n", IN);
41 fprintf(fh,
"<script type=\"module\">\n");
42 fprintf(fh,
" import { settings, parse, draw } from './js/modules/main.mjs';\n");
43 fprintf(fh,
" settings.HandleKeys = false;\n");
44 fprintf(fh,
" let obj = parse(%s);\n", json_str.c_str());
45 fprintf(fh,
" draw('draw_json_%s', obj);\n", IN);
46 fprintf(fh,
"</script>\n");
void MakeRCanvasJS(const char *MacroName, const char *IN, const char *OutDir, bool cp, bool py)
Generates the json file output of the macro MacroName.
int Int_t
Signed integer 4 bytes (int).
static const std::vector< std::shared_ptr< RCanvas > > GetCanvases()
Returns list of created canvases.
const char * Data() const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Namespace for ROOT features in testing.