Re: TTree::GetEvent without creating new objects?

From: Robert Casties (casties@mail.desy.de)
Date: Thu Oct 30 1997 - 18:40:46 MET


On Thu, 30 Oct 1997, Rene Brun wrote:

> We give an example in $ROOTSYS/test/Event.
> TFile f("file.root");
> TTree *tree = (TTree*)f.Get("T");  if your Tree was called "T"
> Event *event = 0;   // fundamental to preset the pointer to 0
^^^^^^^^^^^^^^^^^^^^^^
Okay this was my error! 

SetBranchAddress takes the address of a pointer instead of a pointer (as
in the case of simple datatypes).

But if I give it the address of an existing object the objects destructor
is properly called and the object is recreated at the same place. Is it
pure coincidence or is this implied? 

Maybe the documentation should make the differences in behaviour more
clear between TTrees split/unsplit with objects/simple types :-) 


So what do i have to do if I want to split my object myself to have the
ability to read back only parts of it? And how do I read only a selected
part of an object into the object? 


Cheers
	Robert



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:22 MET