Opening a ROOT file from remote system through ssh

Hi,

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://user@host.com:/remote/path/file.root");

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

Thanks!

Hi,
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.

Cheers,
Enrico

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:

https://sultan.unizar.es/rawdata/Run00180_restG4_LowDMdecay_0.5bar_jgalan.root

Does this mean I could do something like that?

TFile *f = new TFile("https://sultan.unizar.es/rawdata/Run00180_restG4_LowDMdecay_0.5bar_jgalan.root")
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!