Hi rooters. I have some probrem. My root version is 3.01/06 linux egcs. When I used interpreter, next code works { TH1D hist("hist","hist",100,0,10); TFile file("test.root","UPDATE"); TNtuple* ntup; ntup = (TNtuple*) file.Get("ntup"); ntup->Draw("p>>hist","","goff"); hist.Draw(); file.Close(); } but , when I compiled next code using gcc #include <TFile.h> #include <TROOT.h> #include <TH1.h> #include <TNtuple.h> TROOT root("root","root"); int main(){ TH1D hist("hist","hist",100,0,10); TFile file("test.root","UPDATE"); TNtuple* ntup; ntup = (TNtuple*) file.Get("ntup"); ntup->Draw("p>>hist","","goff"); hist.Draw(); file.Close(); } The Histgram hist on the root file. did not filled. Am I someting wrong? Is there something I have to do?
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:53 MET