Opening a ROOT file from remote system through ssh


I have access to a system through ssh with public key. I was just wondering if it is possible to open a remote ROOT file on my local system doing something like:

TFile *f = new TFile("ssh://");

If not, which would be the most appropriate way to open a remote file with a local ROOT system?


one option might be mounting the system’s remote directory with SSHFS.

To open the file directly with ROOT, I think you would have to start an xrootd server on the system and tunnel the connection through ssh.

Others might have better suggestions though.


1 Like

If you can instead use http - that’s be the optimal solution! E.g. files from lxplus at CERN can be served through http.

Thanks, actually opening a remote http file would also do the job for me.

I made available a ROOT file temporary at:

Does this mean I could do something like that?

TFile *f = new TFile("")
Error in <TFile::TFile>: file rawdata/Run00180_restG4_LowDMdecay_0.5bar_jgalan.root does not exist
(TFile *) 0x7f98280a3160

Use TFile::Open(...) instead of new TFile(...) and it will work!

1 Like

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