Re: [5.28.00a] GetBranch/SetAddress not working for TChains w/ multiple files ?

From: Sebastien Binet <binet_at_cern.ch>
Date: Wed, 9 Mar 2011 15:13:56 +0100


On Wed, 9 Mar 2011 14:50:39 +0100, Rene Brun <Rene.Brun_at_cern.ch> wrote:
> Sebastien,
>
> I am surprised by this remark. A TChain is a TTree but a TTree is not a
> TChain.

which remark ?
this one ?
'''
 (I was careful to check the methods I was calling on the TTree  were virtual ;))...
'''

I was merely stating that, relying on the TTree interface, I could leverage the usual polymorphism-fu via virtual calls and still get the correct behaviour if 'init_branches' was given a TChain pointer.

> If your case it worked for the first Tree in the TChain because this
> Tree was already loaded at the time of the call.
> I strongly suggest to use a TSelector based analysis instead of
> reinventing once more the wheel ::)
> This will take care of the changes of files and Trees in the TChain and
> in addition you will be ready to run on parallel architectures too.
yes, but my use case is not really writing an analysis code but integrate the ROOT event loop with the Athena one (and check the performance numbers w.r.t. percolating through POOL)

and we (athena/gaudi) have also some code for parallel architectures :)

Philippe,

   > Any action done directly to a TBranch object is explicitly lost
   > because the liftetime of the TBranch objects is exactly the same
   > as the TTree object (i.e. and the same as each file in the TChain).

ok, thanks.
I guess a TBranchChain doesn't make sense, performance-wise.

-s

-- 
#########################################
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################

  • application/pgp-signature attachment: stored
Received on Wed Mar 09 2011 - 15:15:29 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 09 2011 - 17:50:01 CET