20std::shared_ptr<ROOT::RWebWindow> window;
27void ProcessData(
unsigned connid,
const std::string &arg)
29 printf(
"Get msg %s \n", arg.c_str());
33 if (arg ==
"get_text") {
36 }
else if (arg ==
"get_binary") {
39 for (
int n = 0;
n < 10; ++
n)
41 window->SendBinary(connid,
arr,
sizeof(
arr));
42 }
else if (arg ==
"halt") {
44 window->TerminateROOT();
45 }
else if (arg.compare(0, 8,
"channel:") == 0) {
46 int chid = std::stoi(arg.substr(8));
69 hist =
new TH1I(
"hpx",
"Test histogram", 40, -5, 5);
81 auto pos = fdir.find(
"webwindow.cxx");
86 window->SetDefaultPage(
"file:" + fdir +
"dist/index.html");
89 window->SetDataCallBack(ProcessData);
91 window->SetGeometry(1200, 800);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
static std::shared_ptr< RWebWindow > Create()
Create new RWebWindow Using default RWebWindowsManager.
TCanvasImp * GetCanvasImp() const override
void Update() override
Update canvas pad buffers.
1-D histogram with an int per channel (see TH1 documentation)
virtual void FillRandom(TF1 *f1, Int_t ntimes=5000, TRandom *rng=nullptr)
void Modified(Bool_t flag=true) override
Mark pad modified Will be repainted when TCanvas::Update() will be called next time.
void Add(TObject *obj, Option_t *opt="", Bool_t modified=kTRUE) override
Add an object to list of primitives with speicified draw option When.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Handles synchronous and a-synchronous timer events.
Basic TCanvasImp ABI implementation for Web-based Graphics Provides painting of main ROOT classes in ...
static TCanvas * CreateWebCanvas(const char *name, const char *title, UInt_t width=1200, UInt_t height=800)
Create TCanvas and assign TWebCanvas implementation to it Canvas is not displayed automatically,...