Hi Ludger,
Yes, I agree, that this should work in case of a public data member.
I did not implement this case assuming that data members should
be private or protected.
I could also implement this facility for private/protected members.
It would be nice also from the browser to histogram any member
of an object in case of non-split mode.
Rene Brun
> +-------------------------------------------------------------------+
>
> On Thu, 3 Sep 1998, T Auger wrote:
>
> > [...snip...]
> >
> > It makes a lot of sense to be able to add leaves to a tree after it
> > was created, at one point I wanted to do that myself. However, I use a
> > different approach which can be useful for small event size type analysis.
> > To be able to use the tree.Draw() function and make cuts on it, I
> > defined a Event class which does contain method returning invariant
> > masses, missing masses, angles for certain type of particle, etc... :
> >
> > Float_t TClasEvent::InvM_gp() {
> > ...
> > return(inv_mass);
> > }
> >
> > Then when creating the tree, I use the split switch set to 0. That
> > way, the event is saved as a TObject and is no longer a collection of
> > leaves. Then when I want to draw a quantity I simply need to call the
> > method I defined InvM_gp() like that :
> > T.Draw("event.InvM_gp()","event.InvM_gp()>0&&event.Mm_ppip()>0.5")
> >
> > All of that works because I store the event with the non-split method.
> >
> > Therefore, I do not want to store these kinematic quantities anymore
> > since I can recalculate them on the fly.
> > Of course the drawback is that I have to read back the entire event
> > from the file which means that it takes longer to draw my
> > histograms. But I still prefer it because, I do not need to re-create
> > my tree when I add a cut, I just change the shared library TClasEvent that I
> > created.
> >
> > hope this helps,
> > Thierry
> >