Re: TTree branches and member functions

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Mar 28 2000 - 10:33:19 MEST


Hi Gene,
Plans are to extend the functionality of TTree::Draw to support:
 - calls to object member functions (TClonesArray case)
   Currently only data member names of the objects in the TClonesArray
   are accepted.
 - possibility to specify a data member name of any TObject*
   Currently, only member functions calls are accepted.

Our priority is for the time being to introduce support for the
StreamerInfo
facility, such that we have a complete object description in the file.
This is necessary to read a Tree when the original classes are not
available
any more and also to support one of the two cases above.

Rene Brun


Gene Van Buren wrote:
> 
> Hello. I understand the three different types of TBranches one can
> use with TTrees:
> 
> a) non-objects
> b) TObject derivatives
> c) TClonesArray collections
> 
> Option b provides the ability to call member functions of the class
> stored in the TTree when using TTree::Draw(), but requires reading in
> all sub-branches if the split option is used. Option c allows reading
> in only some sub-branches, but not the use of member functions.
> 
> It seems to me that option c could be made "smarter" - with the
> ability to do member functions. This would add some complexity in
> figuring out the branches (variables) on which a member function
> has dependency, perhaps writing those depended-upon variables into
> a (perhaps static) instance of the class on which the member function
> could execute, and (unfortunately) would add a dependency on TTrees
> using TClonesArrays on the library containing the class (already the
> case in option b).
> 
> Has anyone tried to implement this or are the any thoughts to incorporate
> this into the future of Root?
> 
> (I realize the member functions are available if you read the TTree
> events into actualy instances of the class in memory, but I'd really
> like to be able to use them in Draw().)
> 
> -Gene Van Buren



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:22 MET