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

From: Valeri Fine (Faine) (fine@bnl.gov)
Date: Sun Jan 30 2000 - 17:04:48 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,

 I wonder one he can not do this. If one removes references how can he use
 it from the compiled code ?

> TTree method 
> 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.

 If code has any reference to TTree it will be linked with Root_Tree.lib 
against of Root_tree.DLL with no extra effort.
 If code has no refs to TTree it can not use TTree anyway on either platform.

 So it is a dictionary problem not the dynamic library. By some reason CINT Dictionary
 reports it doesn't know "TTree" ?
  Was there any change in the way the dictionaty is created  recently ?

  Valery

> 
> 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