What is Castor?

Setup castor on a cern machine

You need to setup the following enviroment variables:
  • If you use .sh
export RFIO_USE_CASTOR_V2=YES 
export STAGE_HOST=castoratlas 
export STAGE_SVCCLASS=default
  • If you use .tcsh
setenv RFIO_USE_CASTOR_V2 YES
setenv STAGE_HOST castoratlas
setenv STAGE_SVCCLASS default

Your own castor space

If you have a cern account you have automatically been allocated some castor space. If your cern login is susana your castor space is in:
/castor/cern.ch/user/s/susana

Castor commands

Frequent commands

  • rfmkdir create a castor directory
rfmkdir /castor/cern.ch/user/s/susana/tmp
Will create a directory called tmp in previously existing /castor/cern.ch/user/s/susana castor directory.

  • rfcp copy files to/from castor
rfcp myfile.root /castor/cern.ch/user/s/susana/tmp
Will copy a file called myfile.root into corresponding tmp castor directory

  • rfrm deletes a file
rfrm /castor/cern.ch/user/s/susana/tmp/myfile.root

  • rfdir lists the files in a given directory
rfdir /castor/cern.ch/user/s/susana/tmp

  • nsls
nsls /castor/cern.ch/grid/atlas/datafiles/csc11/digit | wc
Will tell you how many files you do have in such a castor directory

Reference web pages where to find more commands

http://castor.web.cern.ch/castor/DOCUMENTATION/CASTOR2_DEPLOYMENT/FILES/Commands_in_CASTOR2_v_s_CASTOR1.html

Run athena on castor data

From afs (or other machines with castor access) you can run athena jobs on data stored in castor adding castor: in front of each data file path, in your favorite jobOptions. Examples:
EventSelector.InputCollections = [
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile1.root",
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile2.root",
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile3.root",
....]
Or if you run in RecExCommon framework:
PoolESDInput =[
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile1.root",
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile2.root",
    "castor:/castor/cern.ch/user/s/susana/tmp/myfile3.root",
....]

Useful castor addresses (to get data)

  • /castor/cern.ch/grid/atlas/dq2
  • /castor/cern.ch/grid/atlas/datafiles/

-- TeresaFonsecaMartin - 02 Apr 2008

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2008-04-02 - TeresaFonsecaMartin
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback