Can a class revert from using a custom streamer?

So I read I/O Concepts - ROOT
as I have been asked to work with a class that uses a Streamer. Currently the class I’m working with has a custom streamer, and I’ve been asked if it’s possible to backtrack on that.

Previously, we read a string, then initialised another object with it. Say we don’t need that any more, we just need the string in memory. Can I revert the class to use the automatically generated streamer if it now only needs things that are within the capacity of the automatically generated streamer?

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.24/06
Platform: NAME=“CentOS Linux” VERSION=“7 (Core)” ID_LIKE=“rhel fedora” CLUSTER=“sunrise”
Compiler: using GNU Make 3.82, which presumably calls g++ (GCC) 11.2.0 under the hood.

Maybe. If you don’t need backward compatibility, then yes. If you do need backward compatibility (reading old files with the new code) then it depends of what the custom streamer did to store the data. If the data was stored by the custom streamer in the same way the default/implicit streamer does then yes you can. If it does not, you can but only if you don’t need backward compatibility.

Thanks, yes the custom streamer appears to store the data exactly as an automatic one would. It’s really just used as a hook on the loading process.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.