Re: Event/TTree reading

From: Rene Brun <>
Date: Fri, 15 Dec 2006 12:27:43 +0100

Hi Dmitry,

I am afraid that you will have to provide more information if you want to get a meaningful answer.
Did you look at the friend trees. See TTree::AddFriend.

Rene Brun

Dmitry Naumov wrote:
> Dear Rooters,
> may I ask your advice on the following problem. We save simulated
> events into a TTree object. However sometimes the events are too large
> and we split them into pieces and save each piece as an entry of the
> TTree. This works OK. What would be a clever way to read these events
> from the TTree?
> A simple code which we had before (before splitting) is not useful
> anymore:
> // open the tree
> Event *ev=0;
> tree->SetBranchAddress("fEvent",&ev);
> do (int i(0); i<tree->GetEntries()l i++) {
> tree->GetEntry(i);
> // do something with ev: fill its global information (energy,
> position, etc), fill its hits
> }
> Following this way the concept of entry as an event is no more
> working, and we have to organize something like "SubEvent" and do
> cycle over ev->GetSubEvents() entries or so. This is the way I have in
> mind. However before trying to realize it it would be great if
> ROOT/C++ gurus could give an advice on that. [Building the whole event
> from different entries of TTree is not OK because the event might not
> fit into the memory].
> Thank you in advance, Dmitry
Received on Fri Dec 15 2006 - 12:27:57 MET

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:02 MET