Re: TChain built with pointers to trees

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Wed, 12 Sep 2007 16:18:47 +0200


Chiara,

This case is not supported. Instead I suggest to make one single TTree in memory with
  tree1->CopyEntries(tree2);
  delete tree2;
  tree2->CopyEntries(tree3); //etc

Rene Brun

Chiara Zampolli wrote:
> Dear rooters,
>
> I would like to know whether it could be possible to build a chain
> adding trees instead of files. Actually, what I would like to do is
> something like:
>
> TTree *tree1 = new TTree("T","Tree test");
> TTree *tree2 = new TTree("T","Tree test"); TTree *tree3 =
> new TTree("T","Tree test");
> TChain *chain = new TChain("T");
> chain->Add(tree1);
> chain->Add(tree2);
> chain->Add(tree3);
>
> Is it something possible or not? Is there any workaround that I
> don't know?
> Thank you in advance.
>
> Regards, Chiara
>
Received on Wed Sep 12 2007 - 16:19:06 CEST

This archive was generated by hypermail 2.2.0 : Wed Sep 12 2007 - 17:50:02 CEST