I’m a new Rooter and I’ve a little problem, if any of you could help me …
Let’s have a look at this short code:
h1 = new TH1F(“h1”,“The first”,100,0,100);
h2 = new TH1F(“h2”,“The second”,100,0,100);
h3 = new TH1F(“h3”,“The third”,100,0,100);
TFile *file = new TFile(“puppa.root”,“RECREATE”);
TTree *tree = new TTree(“tree”,“My tree”);
Classe *pointer = new Classe();
The problem is that when I execute the script and I look at the Root file, in the branch created, histos have only one entry which is 0!!! The right ones are in the top directory of the rootfile!
I also tried objects instead of pointers and the result was worse: no histos at all in the tree (again the right ones are in the top dir)!!!
I think that the problem might be the adress passed in the TTree::Branch method or the way I fill the tree.
How can I solve my problem???
Thanks a lot!