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

From: Andrei Daniel (daniel@jinr.ru)
Date: Fri Dec 07 2001 - 07:12:51 MET


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