Re: ??? copy constructor of TObjArray

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Fri Mar 12 1999 - 17:21:46 MET


Hi Valeriy,

   the TObjArray copy ctor is not good for the moment. I'll revise the container
copy ctor and assignment operators in the coming days.

Cheers, Fons.



Valeriy Onuchin wrote:
> 
> Hi!
> I have a problem with copy constructor of TObjArray
> 
> see example bellow:
> 
> a1 = new TObjArray();
> qq1 = new TNamed("qq1");
> a1->Add(qq1);
> qq2 = new TNamed("qq2");
> a1->Add(qq2);
> 
> a2 = new TObjArray(*a);
> a2->ls()
> OBJ: TNamed     qq1      : 0
> OBJ: TNamed     qq2      : 0
> 
> // looks good, but
> 
> a2->GetEntriesFast()
> (Int_t)0
> 
> a2->GetLast()
> (Int_t)(-1)
> 
> So, a2 is not empty, but it seems that the  method
>  TObjArray::GetAbsLast()  doesn't work correctly for a2
> 
>   With best regards,                    Valery

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



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