38void draw_canvas(
const std::string &title,
RColor col)
42 auto pHist = std::make_shared<RH1D>(xaxis);
43 auto pHist2 = std::make_shared<RH1D>(xaxis);
48 for (
int n = 0;
n < 10000; ++
n) {
55 auto canvas = RCanvas::Create(title);
57 canvas->Draw<RFrameTitle>(title);
58 canvas->Draw(pHist)->line.color = col;
59 canvas->Draw(pHist2)->line.color = RColor::kBlue;
65 std::cout << title <<
" started" <<std::endl;
67 for (
int loop = 0; loop < maxloop; ++loop) {
69 for (
int n = 0;
n < 10000; ++
n) {
86 std::cout << title <<
" completed" <<std::endl;
92void rcanvas_mt(
bool block_main_thread =
true)
94 if (block_main_thread) {
108 std::thread thrd1(draw_canvas,
"First canvas", RColor::kRed);
109 std::thread thrd2(draw_canvas,
"Second canvas", RColor::kBlue);
110 std::thread thrd3(draw_canvas,
"Third canvas", RColor::kGreen);
112 if (block_main_thread) {
Objects used to configure the different axis types.
static std::shared_ptr< RWebWindowsManager > & Instance()
Returns default window manager Used to display all standard ROOT elements like TCanvas or TFitPanel.
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
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.
void EnableThreadSafety()
Enable support for multi-threading within the ROOT code in particular, enables the global mutex to ma...