Re: [Brahms-dev-l] root error

From: Bjorn H Samset <bjornhs@rcf2.rhic.bnl.gov>
Date: Fri Apr 30 2004 - 04:14:13 EDT
On Fri, 30 Apr 2004, Johnson, Erik B wrote:

> Brahms,
>   I have a general root error that I don't understand.  I fill a ntuple
> with the variable eta_r2.  I save the ntuple in a root file using TFile
> *sf = new TFile("filename","RECREATE"); ntulpe->Write(); sf->Close();
>
> When I try to draw eta_r2, I get this error message Error in
> <TFile::ReadBuffer>: error reading all requested bytes from file
> FlowNT.root, got 0 of 28964 Error in <TBranch::GetBasket>: File:
> FlowNT.root at byte:0, branch:eta_r2, entry:-1 Error in
> <TFile::ReadBuffer>: error reading all requested bytes from file
> FlowNT.root, got 0 of 28964
>
>   Does anyone know what could be wrong here?


Hi Erik. It's a bit hard to tell without the rest of the code, but it
looks to me like the ntuple was created OK but not written properly. A
simple thing to try is to make sure you write it in the proper place:

TFile *sf = new TFile("filename","RECREATE");
sf->cd(); // make sure you're in the right dir just before writing
ntulpe->Write();
sf->Close();

If that's not it, could you send us some more of the code?

Ping :-)

--
Bjorn H. Samset                           Phone: 22856465/92051998
PhD student, heavy ion physics            Adr:   Schouterrassen 6
Inst. of Physics, University of Oslo             0573 Oslo
                              \|/
----------------------------> -*- <-----------------------------
                              /|\

_______________________________________________
Brahms-dev-l mailing list
Brahms-dev-l@lists.bnl.gov
http://lists.bnl.gov/mailman/listinfo/brahms-dev-l
Received on Fri Apr 30 04:14:55 2004

This archive was generated by hypermail 2.1.8 : Fri Apr 30 2004 - 04:15:10 EDT