Select Git revision
README.md 2.49 KiB
root web canvas
Overview
A tool for saving and viewing plots from ROOT via THttpServer
and jsroot
.
Quick start
See tutorial.
Documentation
DESCRIPTION
An http server for serving and saving root canvases.
NAME
Web canvas server
SYNOPSIS
web_canvas_server [-p <http_port>] [-H <http_host>] [-P <socket_server_port>] [-i
<init_file>] [-o <save_file>] [-j] [-l] [-d <output_dir>] [-h]
web_canvas_server [-p <http_port>] [-H <http_host>] [-P <socket_server_port>] [-f <io_file>]
[-j] [-l] [-d <output_dir>] [-h]
OPTIONS
-p, --port <http_port>
port to which the http serve attaches. Default: 8090
-H, --host <http_host>
Http server host name or IP address. Default: 127.0.0.1
-P, --socket-server-port <socket_server_port>
Port which the socket server attaches. Default: 9090
-i, --in-file <init_file>
File used to initialize the top folder objects. Default: top_folder.root
-o, --out-file <save_file>
File used to save sever's current collection of plots. Default: top_folder.root
-f, --file <io_file>
File used to initialize and save plots. Default: top_folder.root
-j, --json When saving create the directory structure and save plots as json files. Note
this only applies to new socket connections (not initialized from a file. The
objects are written when the socket connection is disconnected.
-l, --load-json
Load the data currently in the json directory
-d, --output-dir <output_dir>
set the json output directory. Default: json
-h, --help Print help
LICENSE
GPL3
EXAMPLES
Start the http server:
web_canvas_server -p 8080
Then in a replay script:
auto web_display = new rwc::MonitoringDisplay(8090);
web_display->SetRootFolder("/user_space/");
ddisplay->CreateDisplayPlot("example_canvas", "my_canvas",
[&](rwc::DisplayPlot& plt) {
auto c = plt.GetCanvas();
h1->Draw();
c->BuildLegend();
return 0;
},
[&](rwc::DisplayPlot& plt) {
// update canvas here for real-time display
return 0;
});
// ...
web_display->InitAll();
web_display->UpdateAll();