42void draw_canvas(
const std::string &title,
RColor col)
46 auto pHist = std::make_shared<RH1D>(xaxis);
47 auto pHist2 = std::make_shared<RH1D>(xaxis);
52 for (
int n = 0;
n < 10000; ++
n) {
59 auto canvas = RCanvas::Create(title);
61 canvas->Draw<RFrameTitle>(title);
62 canvas->Draw(pHist)->line.color = col;
63 canvas->Draw(pHist2)->line.color = RColor::kBlue;
69 std::cout << title <<
" started" <<std::endl;
71 for (
int loop = 0; loop < maxloop; ++loop) {
73 for (
int n = 0;
n < 10000; ++
n) {
90 std::cout << title <<
" completed" <<std::endl;
96void rcanvas_mt(
bool block_main_thread =
true)
98 if (block_main_thread) {
112 std::thread thrd1(draw_canvas,
"First canvas", RColor::kRed);
113 std::thread thrd2(draw_canvas,
"Second canvas", RColor::kBlue);
114 std::thread thrd3(draw_canvas,
"Third canvas", RColor::kGreen);
116 if (block_main_thread) {
#define R__LOAD_LIBRARY(LIBRARY)
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...