Re: [ROOT] Problem of TCutG object writing in the file

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Dec 07 2001 - 10:32:51 MET


Hi Andrei,

The problem is that TTreeFormula is in libTreePlayer.so. This library
is not linked by default. It is automatically linked when doing
for example tree.Draw. If you link this library, the problem disappears.

To avoid these warnings/errors, I have added support for an additional case
(a pointer to a fix length array of objects, as found in TTreeFormula)
as a native type that does not require access to the shared library.
This new code is now in CVS.

Rene Brun

Andrei Daniel wrote:
> 
> Hi Rene Brun,
> 
> Thanks. The describing problem was fixed in the new version 3.02.05 it?s
> true.
> But when root file is opened in the next time I get warning:
> 
> Warning in <TClass::TClass>: no dictionary for class TTreeFormula is
> available
> 
> When TCutG object is drawn I get the next warnings and errors after them
> object is drawing.
> 
> root [1] C10440D1S3.Draw("LA")
> Error in <TBuffer::CheckByteCount>: object of class TTreeFormula read too
> few bytes
> Warning in <TBuffer::CheckByteCount>: TTreeFormula::Streamer() not in sync
> with
> data on file, fix Streamer()
> Error in <TBuffer::CheckByteCount>: object of class TTreeFormula read too
> few bytes
> Warning in <TBuffer::CheckByteCount>: TTreeFormula::Streamer() not in sync
> with
> data on file, fix Streamer()
> 
> Other objects like TH1F are drawn from this root file without errors.
> What is a better way of TCutG using to exclude this problem.
> 
> Andrei
> 
> -----Original Message-----
> From: brun@pcbrun.cern.ch [mailto:brun@pcbrun.cern.ch]On Behalf Of Rene Brun
> Sent: Thursday, November 29, 2001 2:13 PM
> To: Andrei Daniel
> Cc: Roottalk
> Subject: Re: [ROOT] Problem of TCutG object writing in the file
> 
> Hi Andrei,
> 
> Thanks for explaining the conditions when you get the problem.
> This turned out to be a stupid problem in TTreeFormula now fixed in
> the development version in CVS.
> 
> Rene Brun
> 
> Andrei Daniel wrote:
> >
> > Hi Rooters,
> >
> > Yesterday I asked a question about writing TCutG object
> > in the file. I would like to refine it. When TCutG
> > object is created and immediately is written in the file
> > all works. Problem arises when I use TCutG object
> > to make a draw from TTree and then write it in
> > the file. On practice, I am interesting to see
> > two one-dimensional projections created with
> > the same TCutG object before it will be written in
> > the file for the future use.
> >
> > What is a difference between two groups of commands?
> >
> > //== Common part
> > TCanvas c1;
> > TCanvas c2;
> > TFile Fi("namei", "READ"); //== File with large TTree T
> > TFile Fo("nameo", "UPDATE");
> > c1.cd();
> > Fi.cd();
> >
> > //== 1st group works
> > T.Draw("y:x","x>0&&y>0");
> > //== Creation and rename of TcutG using Edit command from canvas
> > Fo.cd();
> > CUTXY.Write();
> >
> > //== 2nd group get an error
> > T.Draw("y:x","x>0&&y>0");
> > //== Creation and rename of TcutG using Edit command from canvas
> > c2.cd();
> > T.Draw("x","CUTXY");
> > htemp.Fit("gaus");
> > Fo.cd();
> > CUTXY.Write();
> >
> > I tried to use these commands on the Windows XP for
> > the root 3.02.04 and on the Linux SuSE 7.2 for the root
> > 3.02.00 with the same result.
> >
> > Andrei
> > ----------------------------------------------
> > Andrei Daniel
> > FLNR, JINR, Dubna 141980 Russia
> > e-mail: daniel@jinr.ru
> > tel: 7 (09621) 64568   fax: 7 (09621) 65083



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:11 MET