Problm nderstanding how to use a copy const for a TObjArray

Dear all

I am trying to understand how to construct a
TObjArray to save the content of the Object I create right after
that I have done a contour of a 2D Histo

MyFirstHisto->Draw(“cont z list”);

so I do:

TObjArray* contFist =
(TObjArray*)gROOT->GetListOfSpecials()->FindObject(“contours”);

then I use it and I am able to draw the contour lines of MyHisto in a
canvas as explained at:
root.cern.ch/cgi-bin/print_hit_b … #first_hit

Then I have another Histo, again I compute a contour
around with

MySecondHisto->Draw(“cont z list”);

so again I do:

TObjArray* contSecond =
(TObjArray*)gROOT->GetListOfSpecials()->FindObject(“contours”);

I can also draw the contour in a second canvas

At the end
I want to superimpose from cont and contSecond
the contours of my 2 histos but in a single canvas

of course as contFirst and contSecond are defined as pointers
to (TObjArray*)gROOT->GetListOfSpecials()->FindObject(“contours”);
contFirst is empty after that I have defined conSecond

so my question is I understand TObject is apuclic class for TObjArray
I as a copy constructor :
root.cern.ch/root/html508/////TO … ct:TObject

So what shall I do to use this
so that at the end of my Macro I can use both
contFirst and conSecond or some copy of them at the
time I create them from

TObjArray* contSecond(First) =
(TObjArray*)gROOT->GetListOfSpecials()->FindObject(“contours”);

Many Thanks in advance
Vincent

TryTObjArray* copy = contFist->Clone();
Cheers,
Philippe

Thanks a lot this is excatly what I needed

I owe you a pint of beer !