Thank you for your reply. Indeed, if I plot with CONT rather than CONT2, my pointer to the TObjArray is no longer null. I am now finding that my contours have no graphs. I can see a nice contour from my histogram draw command, however.
Do you have any suggestions on what I might be missing? All I am looking for is to be able to redraw my contour on other plots.
Thanks again for the reply. It turns out that the problem was that saving my canvas in between updating my canvas and the FindObject line was causing problems.
Anyway, many thanks for all of the help!
Will
hxsecminusxsec->Draw(“cont list”)
c1->Update();
…
c1->SaveAs(“xsecminusxsec.pdf”,“pdf”); <- Inserting this line was causing problems
…
TObjArray conts = (TObjArray)gROOT->GetListOfSpecials()->FindObject(“contours”);