Re: [ROOT] A question about a tree with a class which contains TLorentzVector.

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jul 04 2001 - 08:25:56 MEST


Hi Toshi,

The problem with classes of the type TLorentzVector (using internally another
class like TVector3 by composition) has been fixed in the CVS version.

Thanks for reporting this problem.

Rene Brun

Toshinori Abe wrote:
> 
> Dear Rooters,
> 
> I have a question about a tree with a class which contains TLorentzVector.
> I've got the different response between ROOT 3.00/06 and 3.01/05,
> when I try to do the following
> 
>   $ make
>   $ root
>   root [0] .x test_write.cxx // making a tree file.
>   root [1] .x test_read.cxx  // read the tree file.
> 
> The test_read.cxx macro works fine with ROOT 3.00/06 but it crashes with
> ROOT 3.01/05.
> 
> test_read.cxx macro is below
> 
> void test_read() {
>   gSystem->Load("libMyTrack");
>   TFile f2("test.root");
>   TTree *T=(TTree*)f2.Get("t1");
>   T->Draw("fA.fP.fX");
> }
> 
> The macro is simply read a tree with a class which contains TLorentzVector
> and draw a variable of the TLorentzVector. The class is
> 
> class MyTrack: public TObject {
> private:
>   TLorentzVector fA;
> 
> public:
>   // ... list of methods.
> };
> 
> I do not have any idea about the different behavior.
> Would you suggest me if any idea?
> 
> I attached the files I used, in this mail.
> And I've found the problem using the plat forms of
> 
> Sun SPARC Solaris 2.8 with CC5.2, version 3.01/05
> Intel x86 Linux for Redhat 6.1 (glibc 2.1) and egcs1.1.2, version 3.01/05
> 
> Thanks very much in advance, - Toshi
> 
>  Name   : Toshinori Abe
>  Add.   : SLAC M/S 96, 2575 SandHill Road, Menlo Park, CA 94025, USA
>  E-mail : toshi@SLAC.Stanford.EDU
> 
>   --------------------------------------------------------------------------------
> 
>                    Name: MyTrack.h
>    MyTrack.h       Type: Plain Text (Text/Plain)
>                Encoding: 7BIT
> 
>                      Name: MyTrack.cxx
>    MyTrack.cxx       Type: Plain Text (Text/Plain)
>                  Encoding: 7BIT
> 
>                   Name: Makefile
>    Makefile       Type: Plain Text (Text/Plain)
>               Encoding: 7BIT
> 
>                         Name: test_write.cxx
>    test_write.cxx       Type: Plain Text (Text/Plain)
>                     Encoding: 7BIT
> 
>                        Name: test_read.cxx
>    test_read.cxx       Type: Plain Text (Text/Plain)
>                    Encoding: 7BIT



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