I an using root 4.04/02b. I am seeing a strange problem when I use AddFriend and Draw method. This is what I am doing:
TFile f_mc_pc_us = new TFile("/neutrino_pc_us.root",“r”);
TTree pc_nu_us = (TTree)f_mc_pc_us->Get(“pc_nu_us”);
TFilef_mod_pc_us=newTFile(“mod_neutrino_pc_us.root”,“r”);
TH1F *wt_mc_pc_us = new TH1F(“wt_mc_pc_us”,“stopping upstream”,20,0,5);
pc_nu_us->AddFriend(“rwt_pc_nu_us”,f_mod_pc_us);
pc_nu_us->Draw(“evt_rewt>>wt_mc_pc_us”);
The problem is I can see the plot but the histogram is not getting filled. After this if I do:
wt_mc_pc_us->Draw();
I see an empty histogram. I tried the Fill() method and it works fine.
-thanks Debdatta.