My question is whether there is a way to simply check if a snapshot exists without triggering the ObjectHandling error message? If not I think it would make more sense if the getSnapshot method does not trigger such a message since we are not loading the snapshot anyway.
Hi @AlkaidCheng, thanks for starting this discussion!
You’re absolutely right in my opinion, the ERROR message is redundant with returning a nullptr if no snapshots is found, and that it’s annoying for the usecase where you want to use getSnapshot() to check if a snapshot exists.
Also, a strong argument is that all these other accessors like pdf(), arg(), function() and war() don’t have this error message as well.
So I opened a PR to remove this error message, then you won’t see it anymore in ROOT 6.28: