Re: Error in <TKey::ReadObj>: Unknown class TTree

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Jan 31 2000 - 08:18:31 MET


Hi Reinhard,
I do not know what you did in MainEvent.cxx.
If you remove all the references to TTree or classes in the libTree
library,
you must load explicitely the library at the library at the start of the
main program with gSystem->Load("libTree"). On NT, it is not sufficient
to
specify the library in the list of libs when you link the program.

Rene Brun


Reinhard Schwienhorst wrote:
> 
> Hi,
> I have run into a problem when reading trees from a file with a program
> rather than in a macro. I am using the event example from the test area and
> I have created the event.root file. I modified MainEvent.cxx and removed
> everything in the write case ( the "else {" part of "if read == 1)").
> I get the following output:
> bash.exe-2.02$ Event 100 0 0 20
> TFile**         Event.root
>  TFile*         Event.root
>   KEY: TH1F     htime;1 Real-Time to write versus time
>   KEY: TTree    T;1     An example of a ROOT tree
>   KEY: TH1F     hstat;1 Event Histogram
> Error in <TKey::ReadObj>: Unknown class TTree
> 
> What is going on? How can TKey not know about TTrees?
> Reading the tree works fine with the unmodified MainEvent.cxx routine. That
> is puzzling, because I only removed parts that don't get called.
> 
> I am running on Windows NT with ROOT 2.23/11.
> 
> Thanks for any help,
> 
> Reinhard



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET