Via published commands one can enable/disable histograms filling There are also command to clear histograms content
Histograms will be automatically displayed and monitoring with interval 2000 ms started
void httpcontrol()
{
TH1D *hpx =
new TH1D(
"hpx",
"This is the px distribution",100,-4,4);
TH2D *hpxpy =
new TH2D(
"hpxpy",
"py vs px",40,-4,4,40,-4,4);
serv->Register("/", hpx);
serv->Register("/", hpxpy);
serv->SetItemField("/","_monitoring","5000");
serv->SetItemField("/","_layout","grid2x2");
serv->SetItemField("/","_drawitem","[hpxpy,hpx,Debug]");
serv->SetItemField("/","_drawopt","col");
serv->RegisterCommand("/Start", "bFillHist=kTRUE;", "button;rootsys/icons/ed_execute.png");
serv->RegisterCommand("/Stop", "bFillHist=kFALSE;", "button;rootsys/icons/ed_interrupt.png");
serv->Hide("/Start");
serv->Hide("/Stop");
serv->RegisterCommand("/ResetHPX","/hpx/->Reset()", "button;rootsys/icons/ed_delete.png");
serv->RegisterCommand("/ResetHPXPY","/hpxpy/->Reset()", "button;rootsys/icons/bld_delete.png");
serv->CreateItem("/Debug","debug output");
serv->SetItemField("/Debug", "_kind", "Text");
serv->SetItemField("/Debug", "value","\\(\\displaystyle{x+1\\over y-1}\\)");
serv->SetItemField("/Debug", "mathjax", "true");
if (bFillHist) {
} else {
}
serv->SetItemField(
"/Debug",
"value",
Form(
"\\(\\displaystyle{x+1\\over y-1}\\) Loop:%ld",
cnt/
kUPDATE));
}
}
}
char * Form(const char *fmt,...)
R__EXTERN TSystem * gSystem
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
1-D histogram with a double per channel (see TH1 documentation)}
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual Int_t Fill(Double_t x)
Increment bin with abscissa X by 1.
2-D histogram with a double per channel (see TH1 documentation)}
Int_t Fill(Double_t)
Invalid Fill method.
Random number generator class based on M.
virtual void Rannor(Float_t &a, Float_t &b)
Return 2 numbers distributed following a gaussian with mean=0 and sigma=1.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).