I try to make a deep copy of a TObject’s subclass. The pointer to the destination object should not be changed. I thought the method “Copy()” was made for that. However :
root  TObject *s = new TObjString("asdf") root  TObject *s2 = new TObjString("new") root  s2->Copy(*s) root  cout << ((TObjString*)s)->GetString()->Data() << endl; asdf
Please note that it works for TH1F because Copy is overwritten.
How can I achieve this ?
Shouldn’t Copy be implemented in TObjString (and any other subclass of TObject) ?
Thanks in advance,