I have a very simple .root file from which I created a class file. In my C macro I ask to draw a canvas and then plot a histogram. When I execute this macro (.x basic_try.C), all I get is “(const class basic_try) 191039936”. The canvas doesnt draw. I have used TBrowser and also asked ROOT to draw me a simple histogram which worked without any problems so, I know I am able to open a canvas. I would appreciate any advice. Oh yes, I am using windows xp (I know, I know, I dont enjoy it either).
basic_try.C (1.43 KB)
basic_try.h (4.31 KB)
You forgot to post your data file basic.root
Ah yes, thank you…
basic.root (7.1 KB)
Your file basic_try.h does not match the definition of your Tree in basic.root.
You had also many C++ errors.
I have regenerated a file (see basic.h) in attachment corresponding to basic.root, by doing
the I have edited basic.C (see 2nd attachment) where I included your code in basic_try.C, fixing numerous C++ errors.
Thank you so much for the header file and fixing the C++ errors . However I still get the response “(const class basic)188776224”. I am not sure whether ROOT is actually going through the macros.
You must explain better what you are doing. With the files that I sent as attachment, you should do
root > .L basic.C
root > basic b;
root > b.Loop();
Thank you. I see the problem now; I looked in a mirror.