Re: [ROOT] Copy constructor of TGraph

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Feb 16 2004 - 08:16:49 MET


Hi Michele,

Michele Zaffalon wrote:
> 
> Hi Rene
> 
> is the TObject::Clone() method copying a derived class
> object?

yes

> Anyway, I thought I could use the copy constructor...
> I use root 3.10/02 compiled on debian with g++3.3.
> Here is the code.

I do not see a problem with the  TGraph copy constructor.
To understand your problem, I will need a concrete piece of code and data.

Rene Brun

> 
> michele
> 
> On Sat, 14 Feb 2004 21:46:13 +0100 (MET)
>   Rene Brun <brun@pcbrun.cern.ch> wrote:
> >Hi Michele,
> >
> >If you modify the graph, add a clone of this graph
> >to the multigraph. Instead of
> >multigraph->Add(graph);
> >do
> >multigraph->Add(graph->Clone());
> >
> >To understand the problem with your copy constructor, I
> >need your
> >code,
> >but also the version of Root
> >
> >Rene Brun
> 
>   --------------------------------------------------------------------------------
>                 Name: zgraph.cc
>    zgraph.cc    Type: text/x-c++src
>             Encoding: base64
> 
>                Name: zgraph.h
>    zgraph.h    Type: text/x-chdr
>            Encoding: base64



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET