Re: [ROOT] tree->Branch problem

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jun 27 2001 - 12:46:14 MEST


Hi Jacek,

Jacek M. Holeczek wrote:
> 
> Hi,
> > The default BuildIndex algorithms assumes that teh majorname & minorname are
> > positive. Note that you can specify a formula for the major and minor name
> This is not mentioned anywhere (that they must be positive).
>

I have added the relevant comments in the comments of TTree::BuildIndex.
 
> >  You can set a bit via TObject::SetBit to specify if you have ownership or not
> The TObject::SetBit does NOT say that I own an object. It only says that
> SOMEONE (it MAY be me) owns it.
> I think I will need to introduce additional fields in my class.
> 

I was simply suggesting the use of SetBit/TestBit as an economical way
of doing the job. You can obviously introduce new data members.
Bits have the interesting feature that you can easily use masks to perform
multiple tests in one single if.

> > Why don't you create a static object TWireInfo?
> Because I want to use "new" and "delete".
> 
> > Note that in version 3.01, the way the dictionaries are built has been optimized
> (The cint in 3.01 broke some of my existing code, so I stay with 3.00.)

I know that you have reported several problems to Masa. I thought that these
problems had already been fixed by Masa. Did you try with teh CVS version ?

> Well, ... I just tried it. I added to my TWireInfo.cxx the following :
>         Int_t Dictionaries = gInterpreter->InitializeDictionaries(); // first reinitialize dictionaries ...
>         TWireInfo *gWireInfo = new TWireInfo(); // ... then create the global instance
> This partially works -> I need to set precise order of object files while
> creating shared library (if I change it, it breaks with old errors) :
>         g++ -O2 -g -Wall -fPIC -shared -o TIcaDiag.so TWireInfo.o TIcaDiagDict.o
> then I get :
>         root [0] gSystem->Load("TIcaDiag"); // fine, no errors, but ...
>         root [1] delete gWireInfo // or "new TWireInfo()"
> 
>          *** Break *** segmentation violation
>         Root >

Is it something not protected in your destructor? Please provide more
information.
Let's continue this discussion outside of roottalk.

Rene Brun

> Jacek.



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