Re: Copy constructor of TObjArray

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Tue, 20 Apr 2010 14:53:25 +0200


Hi Vassili,

If you want to make a deep copy of all the objects in the collection for a TObjArray *a (or TClonesArray), do

   TObjArray *b = (TObjArray*)a->Clone();

Rene Brun

Vassili Maroussov wrote:
> Dear ROOTers,
>
> It seems the copy constructor of TObjArray and TClonesArray copies
> only the pointers' array but doesn't create copies of objects in
> collection, correct?
>
> Regards,
>
> Vassili
>
Received on Tue Apr 20 2010 - 14:50:30 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 21 2010 - 17:50:01 CEST