root [0] TFile f("root://eospublic.cern.ch//eos/root-eos/benchmark/Run2012B_SingleMu.root")
Error in <TFile::TFile>: file /eos/root-eos/benchmark/Run2012B_SingleMu.root does not exist
(TFile &) Name: /eos/root-eos/benchmark/Run2012B_SingleMu.root Title:
Desirable behavior:
root [0] TFile f("root://eospublic.cern.ch//eos/root-eos/benchmark/Run2012B_SingleMu.root")
Error in <TFile::TFile>: please use TFile::Open to access remote files:
auto f = std::unique_ptr<TFile>{TFile::Open("root://eospublic.cern.ch//eos/root-eos/benchmark/Run2012B_SingleMu.root")}
(TFile &) Name: /eos/root-eos/benchmark/Run2012B_SingleMu.root Title:
The text was updated successfully, but these errors were encountered:
Hello @Harshalzzzzzzz ,
basically what the description says: currently, if you construct a TFile directly (i.e. not going through the factory function TFile::Open) the constructor errors out if some protocol must be used to access the file (e.g. root:// or http://) -- like in the first example in the description. The reason why this does not work is not very important, the point is that TFile("root://...") fails and the right thing to do instead is TFile::Open("root://...").
So if the TFile constructor fails with that "file ... does not exist" error, before printing that error we want to check whether the filename contains "://" and if it does we want to print a different error message that does not say "file ... does not exist" but instead it points users to using "TFile::Open" instead (as in the issue description).
You can use a debugger or grep the source code for the error message text to see where the relevant logic resides.
Current behavior:
Desirable behavior:
The text was updated successfully, but these errors were encountered: