Re: Bug in TChain::GetTree() ?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jun 09 1998 - 17:34:09 MEST


sven schagen wrote:
> 
> Dear All,
> 
> First of all, I hope that this bug has not been reported before (I
> thought it might have been, but I can't find it so....)
> 
> After an upgrade from 1.03 to 2.00 I found that some of my programs
> didnt work anymore.
> After working out different possible causes, I found that the core of
> the error seems to be that TChain::CloneTree() by default (and always) a
> NULL Pointer returns.
> 
> For instance:
> 
> // Usual stuff and declarations
> .....
> 
>         TChain mychain("h1");
>         mychain.Add("somefile");
>         mychain.Draw("some_variable_from_somefile");
>         cout << mychain.GetTree();
> 
> .....
> 
> The output will then be that some_variable_from_somefile will be plotted
> , but the output of cout will be 0x0, the NULL pointer.
> 
> So my question now is: is this a bug ?
> 

Do you mean CloneTree or GetTree?
Tree::CloneTree clones an existing TTree (see doc). You should use this
function on a TTree, not a TChain.
Use TChain::Merge if you want to Merge teh files of a TChain
into one single file.
Please be more specific and give a more complete example.
Reply to me directly, not to the list.

Rene Brun



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