Re: [ROOT] Error reading TH2F from file Version 3.05/02 on Win2K

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Mar 06 2003 - 21:21:59 MET


Hi Ed,

I am aware of this minor problem. You have drawn your TH2 pXy with
a color palette and then saved it to a file.
TPaletteAxis is in the shared lib libHistPainter. This library is not
loaded by default). It is automatically loaded when you paint
an histogram.
In your case, do the following:
 root > gSystem->Load("libHistpainter")
 root > TFile f("example.root")
 root > pXy.Draw()

Rene Brun

On 
Thu, 
6 Mar 2003, Ed Oltman wrote:

> Hello,
> 
> I have recently converted a root based application from 3.02/9a to 3.05/2 on
> Win2k.
> The output is a bunch of objects written to a root file.  One of the objects
> contains
> a TH2F which causes the error message seen below:  I have extracted this
> TH2F and
> written it to the attached example.root file.
> 
> When I read the file, I get the following warnings and error:
> 
> root [0] TFile *f = new TFile("example.root")
> Warning in <TClass::TClass>: no dictionary for class TPaletteAxis is
> available
> root [1] TH2F *pXy=(TH2F *)f->Get("pXy")
> Error in <TBuffer::CheckByteCount>: object of class TPaletteAxis read too
> few bytes: 17 instead of 311
> Warning in <TBuffer::CheckByteCount>: TPaletteAxis::Streamer() not in sync
> with data on file, fix Streamer()
> root [2]
> 
> 
> I have tried to generate a TH2F using using a simple script that would
> present the same problem,
> but have not been able to.  Is there anything in the file that might suggest
> a problem with
> how my application creates or saves the hitogram?
> 
> Note: I do not get the above warnings or error when my application that
> generates them is
> linked against 3.02/9a.
> 
> Thanks,
> Ed Oltman
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:10 MET