Re: [ROOT] tree->Branch problem

From: Jacek M. Holeczek (holeczek@us.edu.pl)
Date: Wed Jun 27 2001 - 10:26:39 MEST


Hi,
Many thanks for you help.
Unfortunately your changes break my original idea.
However, you did provide me with the required fixes :
	1. I need to "branch->SetAutoDelete(kFALSE);" in order to get my
	   class working at all
	2. I need to set "split = 1;" in order to get tree indexing
	   working (I don't remember if this is described anywhere)
I've got some additional problems (as usually :-) :
1. Tree indexing does not work reliably :
	root [6] gWireInfo->WireMapTree->GetEntryNumberWithIndex(800,-80)
	(const Int_t)8 // that's fine
	root [7] gWireInfo->WireMapTree->GetEntryNumberWithIndex(700,-70)
	(const Int_t)(-1) // !!!!!!!!!!!!!!!!!!!!!!
	root [8] gWireInfo->WireMapTree->GetEntryNumberWithIndex(600,-60)
	(const Int_t)6 // that's fine
	root [9] gWireInfo->WireMapTree->GetEntryNumberWithBestIndex(700,-70)
	(const Int_t)6 // !!!!!!!!!!!!!!!!!!!!!!
2. Can I somehow "store" the information who is the "owner" of the TFile,
   TTree object INSIDE of this object ? I mean, for example, I store the
   "address" of the object that made "new TFile", "new TTree", so that I
   could do "if (myTFileTTree->OnwnerAddress == this) delete myTFileTTree"
3. I'd like to be able to create the global instance of my object
   automatically when the shared library is loaded, so I do :
	globalWireInfo = new TWireInfo();
   but then I get :
	Warning in <TClass::TClass>: no dictionary for class TWireInfo is available
	Warning in <TLeafObject::Streamer>: Cannot find class:TWireInfo
   This is (I suppose) because the "compiler" creates the instance of the
   TWireInfo class BEFORE CINT's table of classes was updated. I think I
   can overcome it using something like this :
	globalWireInfo = (MagicallyUpdateCintTable(), new TWireInfo());
   Could you, please, provide me with the correct name of the magic
   dictionary-updater function to call ?
Thanks in advance,
Jacek.
P.S. Of course this was root 3.00/06 on a RH6.1/i386 machine. Jacek.



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