Re: interactive handling of TClonesArray (ROOT 1.01/07)

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sat Jul 05 1997 - 21:50:44 MEST


Pasha Murat wrote:
> 
> Rene Brun writes:
>  >
>  > You can access the Track data interactively. That is precisely the intention
>  > of the root/test/Event example you are quoting.
>  > This program writes a Tree with a TClonesArray.
>  > In an interactive session, you can then access any element of the array
>  > with statements like:
>  >    Root > TFile f("Event.root");
>  >    Root > T.Draw("fPx");  where fPx is a data member of the class Track
>  >
> 
>         Dear Rene,
> 
> I apologize for being a little bit impatient. What I mean is that given an event
> it doesn't seem possible to calculate an effective mass of 2 tracks or to find
> a track in event with highest Pt, in other words - it doesn't seem possible to
> get a pointer to a track defined in user's code. This is a problem.
> The option you mentioned - looping (inside ROOT, not inside user's code) over all
> the tracks - doesn't solve it.

Interactively, you have access to all the functionality defined
in your compiled classes. In particular look at:
        http://root.cern.ch/root/HowtoReadTree.html

The macros eventa and eventb provided in the root/test directory
are also practical examples of use. These macros also show how
to dynamically link a shared library with user classes.

We also support the case where you do not have access to the
original classes used to write the Tree file.
In this case, you can use TTree::MakeCode to automatically
generate a skeleton analysis function.
This function will contain the declaration of C data structures
corresponding to the data members in your objects.

Rene Brun



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