In C++, I know how to test to see if a file is a ROOT file:
bool test = TFile("filename").IsZombie();
However, when I make this test, I get error output if it’s not a ROOT file:
Error in <TFile::Init>: filename not a ROOT file
For what I’m trying to do, I have my program doing one thing if
filename is not a ROOT file and another if it is. In my case, neither is an error. In fact, it’s more likely that
filename is not a ROOT file.
How do I suppress this message? Or is there another way of testing this that produces no output?
ROOT Version: 6.22/06
Platform: CentOS 7
Compiler: GCC 10.2.0