Oscar's notes on XRootD access to Grid storage

It seems that at least in CMS (and at CERN, due to EOS), the most supported and standarized way to access the storage space in the Grid (and others, like EOS) is XRootD. The traditional commands based on srm and gfal tools are still working, but the XRootD commands should be preferred when available.

Here I document the main tools for achieving the goals. It should be noted that the main difficulty with XRootD is the need most of the time of the correct name for the locations. Sometimes this can be avoided using xrd[fs] but not always. In the examples below one can find the correct names to be used.

Basic handling of files


Opening ROOT files from the Grid

  • Opening a ROOT file located in the Grid is trivial using the XrootD protocol:
          TFile *file = TFile::Open("root://eoscms//eos/cms/store/user/oglez/test.root");
          TFile *file = TFile::Open("root://gaexrdoor.ciemat.es//store/user/oglez/test.root");
    
    
  • Using a file in the Grid inside a local CMS job is similar:
          fileNames = cms.untracked.vstring("root://eoscms//eos/cms/store/caf/user/oglez/...")
    
  • It should be noted that a documented/archived official CMS file can be accessed with a generic "direction":
      fileNames = cms.untracked.vstring("root://cms-xrd-global.cern.ch//store/...")
    
    which of course also works in the usual ROOT.

  • XRootD and the Grid interaction

    In principle XRootD is the default way of accessing the files in the Grid these days, at least in which respect the interaction with EOS. It should be noted that this does not imply to use the XRootD commands... in fact one can use the GFal tools using the XRootD protocol, as in the examples:
          gfal-copy root://gaexrdoor.ciemat.es//store/user/oglez/hola.txt .
          gfal-copy hola.txt root://eoscms.cern.ch//store/user/oglez/hola.cv .
    

    On the other hand it should be remarked that the T2_ES_CIEMAT allows the read-access using this XRootD protocol, but not for write-access. It is unfortunate, and it may be changed in the future, but for writing in the T2_ES_CIEMAT one needs the SRM protocol.

    Comments about the web page: Oscar González