Project

General

Profile

How to Access Files in SAM » History » Version 6

« Previous - Version 6/8 (diff) - Next » - Current version
Qizhong Li, 12/04/2014 08:50 AM


How to Access Files in SAM

To setup SAM:
> kinit
> kx509
> setup sam_web_client

To setup IFDH commands:
> setup ifdhc v1_6_2

To fetch one file from SAM using the file name:
> ifdh_fetch -e lbne filename

For example:

<lbnegpvm02.fnal.gov> ifdh_fetch -e lbne v35t_r0000101_s0001_test_raw.root
found file on enstore, using dcache gridftp
doing: ifdh cp gsiftp://fndca1.fnal.gov:2811/test-data/lbne/raw/00/00/69/00/v35t_r0000101_s0001_test_raw.root ./v35t_r0000101_s0001_test_raw.root

<lbnegpvm02.fnal.gov> ls *.root
v35t_r0000101_s0001_test_raw.root
<lbnegpvm02.fnal.gov>

To get all files from a dataset definition:
> /lbne/app/users/qzli/dhtools/get_files.py definition-name destination-location

For example:
<lbnegpvm02.fnal.gov> /lbne/app/users/qzli/dhtools/get_files.py singleparticle-test /scratch/lbne/qzli/files/
Project name is qzli_singleparticle-test_20141203120539
Project URL is http://samweb.fnal.gov:8480/sam/lbne/api/running/projects/lbne/qzli_singleparticle-test_20141203120539
...
<lbnegpvm02.fnal.gov> ls /scratch/lbne/qzli/files/
35T_singleparticle_piplus_01.root  35T_singleparticle_proton_01.root
<lbnegpvm02.fnal.gov>