[ROOT] Re: Once again, foreign classes support in ROOT

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Nov 14 2003 - 18:20:32 MET


Hi valentine,

Once you have built the dictionary with your classes, created the tree,
you should be able to browse your Tree, use TTree::Draw without having
your original classes, like it is already the case for ROOT-instrumented
classes.

Rene Brun


Valentine Kouznetsov wrote:
> 
> Thanks Rene for examples and explanation.
> 
> I meant by foreign classes exactly what you said, the classes which
> do not depend/inherit from ROOT-aware classes.
> 
> The example you point me is very trivial. I can load my classes in CINT and
> do some operations, but I need something more.
> 
> I need to know is it possible to create a dictionary/tree/ntuple with my
> classes, write out this ROOT object and read it back without loading back my
> class? I don't want to create an ntuple and fill its fields from data member
> of my class. I want to put in a tree/dictionary my class as it is.
> I need to know is it possible to embed my classes into ROOT without
> inheritance of ROOT into my classes?
> 
> Could you please tell me about it.
> Thank you,
> Valentine.
> 
> On Thu November 6 2003 03:35, Rene Brun wrote:
> > Hi Valentine,
> >
> > It is not exactly clear what you are asking.
> >
> > We use the terminology "foreign class" in ROOT to describe classes
> > not instrumented at all with ROOT includes or macros.
> > Support for such classes has been introduced about one year ago
> > and it does not require any special documentation.
> > You can produce your dictionaries, use the I/O sub-system and call
> > these classes from the interpreter. To get the dictionary, you run rootcint
> > on these classes like for ROOT-aware classes.
> > In the attachement, you will find a small tar file with two classes A and B
> > and the procedure to create the dictionary, compile and create a shared
> > lib.
> >
> > Obviously foreign classes do not provide the full functionality that you
> > find in ROOT instrumented classes (TObject functionality).
> > The support for foreign classes was important to facilitate I/O
> > and interactivity with external class libraries that you cannot modify.
> >
> > Rene Brun
> >
> > Valentine Kouznetsov wrote:
> > > Hi, I'm looking for any documentation about foreign classes in ROOT.
> > > Any examples, docs, notes, list of classes, class implementations.
> > > I would appreciate if someone briefly summarize their current status.
> > > Thank you,
> > > Valentine.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET