Re: TChain of TTrees with weights

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Mon, 21 May 2007 08:30:22 +0200


Hi Remi,

In your analysis code processing the chain, you can call functions like   TChain::GetFile
  TChain::GetTreeNumber

For example when building the TChain, you can create a user array weights[maxfiles].
Then at each entry call TChain::GetTreeNumber.

Rene Brun

Remi Mommsen wrote:
> Dear rooters,
>
> I have a question concerning weights when using a TChain. Assume I
> have 3 root files, each containing a tree myTree. I'd like to chain
> the 3 root files together using TChain. However, each myTree should
> have a different weight depending on the root file it resides. I
> understand that TChain uses by default the weight stored in the file.
> However, in my case the trees in the file does not have a weight set
> yet. How do I do this?
>
> TIA,
> Remi
>
>
> --
> No trees were killed in the sending of this message.
> However, a large number of electrons were terribly inconvenienced.
>
> *********************************************************************
> Remigius K. Mommsen e-mail: mommsen_at_fnal.gov
> University of Manchester URL: http://cern.ch/mommsen
> Fermilab, MS 357 voice: ++1 (630) 840-8321
> P.O. Box 500 fax: ++1 (630) 840-2649
> Batavia, Il 60510, US home: ++1 (630) 236-0932
> *********************************************************************
>
>
Received on Mon May 21 2007 - 08:30:29 CEST

This archive was generated by hypermail 2.2.0 : Mon May 21 2007 - 17:50:02 CEST