Re: [ROOT] 2 dictionnaries ?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Sep 25 2002 - 23:08:19 MEST


Hi Colin,

The problem in MakecLass should be fixed in the current CVS version.
Thanks for sending an example.

Rene Brun

On Mon, 23 Sep 2002, Colin Bernet wrote:

> 
> Hi Rene, 
> 
> Sorry, I forgot that : root 3.03/08 on a RH6.1 (kernel 2.2.19-6.2.1.1smp).
> /afs/cern.ch/sw/root/v3.03.08/rh61_gcc2952/root/
> I answered your questions below
> 
> cheers,
> 
> Colin
> 
> On Mon, 23 Sep 2002, Rene Brun wrote:
> 
> > Hi Colin,
> > 
> > Please indicate which version of Root and the platform?
> > 
> > see below
> > 
> > > 
> > > What I want to do is : 
> > > 1 - Fill trees (split 99) using classes located in lib1.so
> > > 2 - Use MakeClass on one of these trees, modify the code so it compiles,
> > > and create a shared library lib2.so out of that. 
> > > 
> > 
> > This should work. Why do you have to modify the code to get it compiled?
> > please try version 3.03/09 in case you use older versions.
> > 
> 
> The tree has one masterbranch, based on my event class. 
> 
> ******************************************************************************
> *Branch  :event
> *
> *Entries :     1461 : BranchElement (see
> below)                              *
> *............................................................................*
> 
> Because of this guy, MakeClass adds a 
>    MEvent          *event;
> 
> to the header, without including the necessary MEvent.h, nor using this
> pointer afterwards. After removing this, it compiles
> 
> > > The only way to work that out was to create a library demo.so using
> > > TFile::MakeProject.
> > > in ROOT, I can then do 
> > > .L demo.so 
> > > .L lib2.so
> > > this works perfectly, despite the fact demo.so, to my point of view,
> > > should not be necessary to read a tree containing basic data types.
> > 
> > Using version 3.03, you should be able to read/query a file containing
> > classes and not only basic data types, even if you do not have the
> > original class library.
> 
> This only gives segv, if I try to do other than print the tree. 
> > > 
> > > Now, I have some code in lib1.so that I would 
> > > like to reuse in lib2.so. I tried to load these libraries in different
> > > orders, to link lib1.so as a module inside lib2.so, but nothing works. I'm
> > > afraid this is because 2 dictionnaries are conflicting.
> > 
> > if lib2 depends on lib1, you should load lib1 first. I cannot tell you
> > more without looking at your classes.
> > 
> 
> This is what I'm doing. 
> 
> root [0] .L libminidst.so
> root [1] .L libreadmdst.so        
> root [2] ReadMDST mdst("MDST","DstOut_ds_22388/*/*.root","")
> Error: Function ReadMDSTmdst("MDST","DstOut_ds_22388/*/*.root","") is not
> defined in current scope  FILE:/tmp/file6ZtX6E_cint LINE:1
> Possible candidates are...
> filename       line:size busy function type and name  
> *** Interpreter error recovered ***
> 
> ReadMDST symbols are contained in libreadmdst.so. It is just an enhanced
> version of the MakeClass code. 
> 
> > I repeat: You can analyze a Tree containing classes, even if you do not
> > have the original class library.
> 
> This would be great ! If you want to have a further look, I prepared a
> directory for you in 
> /afs/cern.ch/user/c/cbernet/public/Rene
> there, MDST contains the package used to produce the tree in MDST_0.root
> ReadMDST was generated by MadeClass, and then modified.
> everything is compiled with the precited version of root and platform, but
> it should be no problem to recompile it.
> 
> thanks for your help,
> Colin
> 
> 
> > 
> > Rene Brun
> > 
> > 
> > > 
> > > Is there a way to solve this problem without duplicating the source files
> > > of lib1 to compile and link them in lib2 ? 
> > > 
> > > Many thanks, 
> > > 
> > > Colin
> > > 
> > > 
> > 
> > 
> 
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:11 MET