Reading Writing ROOT files to Storage Element - jniedzie/SVJanalysis_wiki GitHub Wiki

Grid certificate

Do not forget to activate your gird certificate with:

voms-proxy-init --rfc --voms cms -valid 192:00


T3 PSI Storage Element

Writing files

On the PSI T3 hosts (e.g. t3ui02), ROOT files MUST be written to the T3 Storage Element via:

xrdcp <file_name.root> root://t3dcachedb03.psi.ch//pnfs/psi.ch/cms/trivcat/store/user/<username>/<path>

If you do not do like this, you won't be able to access your files from outside the T3 hosts!
Note the two // before pnfs. One would be enough for the command line to work. But this is needed to be consistent with the usual format of path with redirectors.

On other hosts (e.g. lxplus, login-el7.uscms.org), ROOT files MUST be written to the T3 Storage Element via:

xrdcp <file_name.root> root://t3se01.psi.ch:1094//store/user/<username>/<path>

where <path> must be replaced by the path to a directory where the file will be copied, or by the path to a file name.


Reading files

On any host, any file can be accessed via:

root://t3se01.psi.ch:1094//store/user/<username>/<path_to_file.root>

and any file can be copied locally via:

xrdcp root://t3se01.psi.ch:1094//store/user/<username>/<path_to_file.root> .


T2_CH_CSCS Storage Element

Writing/Reading files

With XRootD:

xrdcp <file_name.root> root://storage01.lcg.cscs.ch:1096//pnfs/lcg.cscs.ch/cms/trivcat/store/user/<username>/<path>
xrdcp root://storage01.lcg.cscs.ch:1096//pnfs/lcg.cscs.ch/cms/trivcat/store/user/<username>/<path_to_file_name.root> .

With GFAL:

gfal-copy <file_name.root> srm://storage01.lcg.cscs.ch:8443/srm/managerv2?SFN=/pnfs/lcg.cscs.ch/cms/trivcat/store/user/<username>/<path>
gfal-copy root://storage01.lcg.cscs.ch:1096//pnfs/lcg.cscs.ch/cms/trivcat/store/user/<username>/<path_to_file_name.root> .


Some tips

  • In case the destination already exists, and you want to replace the file, use xrdcp -f or gfal-copy -f
  • You can check if a file exists using
    xdrfs root://t3se01.psi.ch:1094/ ls /store/user/<username>/<path_to_file.root>
    xdrfs root://storage01.lcg.cscs.ch:1096/ ls /pnfs/lcg.cscs.ch/cms/trivcat/store/user/<username>/<path_to_file.root>
    
⚠️ **GitHub.com Fallback** ⚠️