I wrote a class (deriving from TNamed) and I’m writing it to a file using the class->Write() function.
I understand that I can prevent class members from being written to file by adding //! after the member declaration. It works, but not for a TString member in the class. How can I prevent the TString from being written to the file?
This would be a serious deficiency … Do you have a reproducer? Does it also fail if you use std::string instead of TString? Which version of ROOT are you using?
I’m seeing it with root v5-34-30. I attached two files that reproduce my issue. When I looked at bit closer, I saw that the content of the string is not saved, it is only that the string (both for TString and std::string) shows up in the TBrowser. I don’t know if that is intended or not.
[quote]I saw that the content of the string is not saved, it is only that the string (both for TString and std::string) shows up in the TBrowser.[/quote]Perfect. It is indeed completely intentional for the TBrowser to also let you browser transient members.