In my standalone C++ code I create TCanvas and TH2F objects in order to dispaly a 2 dimentional histogram. When I draw the histogram and the canvas using the Draw method, I don’t get any Toolbar menu, so I cannot edit, zoom etc.
I wonder which commands should I use in order to get these capabilities.
Seems to me this function is a standard one. It should be there in any ROOT version. I do not know what AtlasROOT is doing but seems to me this function should be in it. Can you send a little macro showing the problem ? what is the ROOT version ?
If you want to have the canvas toolbar visible any time you create a canvas, you can add the line:
Canvas.ShowToolBar: true
in the file .rootrc in your working directory.
Via the interpreter any time you can switch it ON/OFF using the command:
gPad->GetCanvas()->ToggleToolBar()
I can’t find .rootrc file in my working directory. I use the Atlas environment, and the link to ROOT is done by adding use statement in the requirment file.
Where can I find this file ?
As Ilka said, this file should be created in your working directory (where you start root). If it doesn’t exist create it and put the line she told you in it.