Pop-up of the canvas


Please read tips for efficient and successful posting and posting code

_ROOT Version:6.30/4
Platform: Not Provided
_Compiler:


I want a pop-up window by running -
void tree_r(string rootfile)
{
TFile f = new TFile(rootfile.c_str());
TTree
t1 =(TTree*) f->Get(“t1”);
t1->Draw(“X1off>>h1(1000,-100,200)”);
}

I use this in main() and compiled it. On running the executable this is showing “Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1” but no canvas is poping out.

Thanks,
Soumalya

Dear Soumalya,

thanks for the post and welcome to the ROOT Community!

I would point you to this documentation Creating a user application with ROOT - ROOT which explains exactly how to achieve what you are trying.

Let us know how this goes!

Cheers,
Danilo