RE: [ROOT] Build a tree with classes object.

From: Philippe Canal (pcanal@fnal.gov)
Date: Fri Aug 03 2001 - 17:33:58 MEST


> 1) Given such a class, am I forced to add the
> ClassDef/ClassImp declaration as well (for trees implementations)?

Currently ClassDef and ClassImp are still necessary.

2) is the library libEvent.so a generic tool for handling objects in

The libEvent.so is only an example of one way of creating an Event and
Track class and storing them in a TTree.  You are free to inspire/copy/etc.
from this library.

Cheers,
Philippe


-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Tommaso Chiarusi
Sent: Friday, August 03, 2001 8:18 AM
To: Root Newsgroup
Subject: [ROOT] Build a tree with classes object.


Dear rooters,
I am quite a beginner in root using.
I have some doubts in tree building.

I need to implement  a tree and storing in it objects from a class that I
wrote and called Track.hh

Up to now, I managed to use such a  class in a root macro simply including
it in the
macro via 

#include "Track.hh"

without adding the  ClassDef/ClassImp  statement to allow the relative
macros.
In the end, my class is a unique file where header and methods are joined
together in a sole script. 


Well, here my  2 questions are:
1) Given such a class, am I forced to add the
ClassDef/ClassImp declaration as well (for trees implementations)?
2) is the library libEvent.so a generic tool for handling objects in
trees or is it specific to the Event class only? (i.e. May I customize
such a library accordingly to my Track.hh, or I take it for free and use
it as it is kindly provided by the Root's authors?)

Thank you very much!

Tommaso



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