Xrootd is a service implemented in ROOT that allows the user to remotely read data located at various CMS sites. The protocol details can be found at the following TWiki page:

Once you have a valid grid proxy (obtained by doing voms-proxy-init --voms cms), you can read a file on a remote site by using a ROOT command like.

TFile *f = TFile::Open("root://cmsxrootd.fnal.gov//store/mc/path/to/file");


The prefix root://cmsxrootd.fnal.gov/ is known as the redirector. In this case, it is the Fermilab redirector. There are also root://xrootd-cms.infn.it/ for Europe regional redirector, and root://cms-xrd-global.cern.ch/ for global redirector. The path /store/mc/... or /store/data/... is known as the Logical File Name (LFN), which is the global identifier of an official CMS dataset. You can also access non-official files stored under /store/user/username/... at any CMS storage element that provides Xrootd service. To download the file, you can use xrdcp:

xrdcp root://cmsxrootd.fnal.gov//store/mc/path/to/file /some/local/path


In case your grid proxy is not recognized, check if the environment variable \$X509_USER_PROXY is set. If not, set it by doing:

export X509_USER_PROXY=/tmp/x509up_uid -u


or:

export X509_USER_PROXY=voms-proxy-info -path


To debug what’s wrong with Xrootd, do

export XRD_LOGLEVEL=Debug