ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/Processing/bin/downloadFile.sh
(Generate patch)

Comparing UserCode/MitProd/Processing/bin/downloadFile.sh (file contents):
Revision 1.6 by paus, Mon Sep 19 21:45:40 2011 UTC vs.
Revision 1.10 by paus, Wed Jul 25 03:05:45 2012 UTC

# Line 8 | Line 8 | echo " ";echo " ==== JOB ENVIRONMENT ===
8   echo " ";echo " ==== START JOB WITH ARGUMENTS: $* ====";echo " "
9  
10   DCCP='/afs/cern.ch/project/gd/LCG-share/3.1.44-0/d-cache/dcap/bin/dccp'
11 + LCGCP='lcg-cp'
12 + SRMCP='srmcp'
13  
14 < klist
14 > #klist
15   id=`id -u`
16   cp ~/.krb5/x509up_u${id} /tmp/
17   cp ~/.krb5/ticket        /tmp/krb5cc_${id}
18   ls -lhrt /tmp/krb5cc_${id}
19   export KRB5CCNAME=FILE:/tmp/krb5cc_${id}
20 < klist
20 > #klist
21  
22   dataFile=$1
23   target=$2
# Line 27 | Line 29 | echo " "; echo "Initialize CMSSW"; echo
29   pwd
30   pwd=`pwd`
31  
32 + # legacy but works on 32 bit machines
33 + if [ "`uname -p`" != "x86_64" ]
34 + then
35 +  source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env_3_1.sh
36 + fi
37 +
38   #export SCRAM_ARCH='slc5_ia32_gcc434'
39   #export VO_CMS_SW_DIR=/server/01a/mitdata/cmssoft
40   #source $VO_CMS_SW_DIR/cmsset_default.sh
# Line 45 | Line 53 | then
53    targetUrl="srm://${storageEle}:8443${storagePath}$target"
54   elif [ "`echo $target | grep /mnt/hadoop/cms/store`" != "" ]
55   then
56 <  storageEle="se02.cmsaf.mit.edu"
56 >  storageEle="se01.cmsaf.mit.edu"
57    storagePath='/srm/v2/server?SFN='
58    targetUrl="srm://${storageEle}:8443${storagePath}$target"
59   elif [ "`echo $target | grep /castor/cern.ch`" != "" ]
# Line 54 | Line 62 | then
62    storagePath='/srm/managerv2?SFN='
63    targetUrl="srm://${storageEle}:8443${storagePath}$target"
64   else
65 <  targetUrl=""
65 >  targetUrl="file:///$target"
66 >  #targetUrl=""
67   fi
68  
69   sourceUrl="file:///$dataFile"
# Line 65 | Line 74 | then
74    sourceUrl="srm://${storageEle}:8443${storagePath}$dataFile"
75   elif [ "`echo $dataFile | grep /mnt/hadoop/cms/store`" != "" ]
76   then
77 <  storageEle="se02.cmsaf.mit.edu"
77 >  storageEle="se01.cmsaf.mit.edu"
78    storagePath='/srm/v2/server?SFN='
79    sourceUrl="srm://${storageEle}:8443${storagePath}$dataFile"
80   elif [ "`echo $dataFile | grep /castor/cern.ch`" != "" ]
# Line 76 | Line 85 | then
85   fi
86  
87   echo " "; echo "Starting download now"; echo " "
88 < if   [ "$targetUrl" != "" ]
88 > if   [ "`echo $dataFile | grep /pnfs/cmsaf.mit.edu`" == "" ]
89   then
90 <  echo "srmcp -srm_protocol_version=2 $sourceUrl $targetUrl"
91 <  srmcp -srm_protocol_version=2 $sourceUrl $targetUrl
90 >  echo "$LCGCP -D srmv2 -b $sourceUrl $targetUrl"
91 >  $LCGCP -D srmv2 -b  $sourceUrl $targetUrl
92 >
93 >  #echo "$SRMCP -2 $sourceUrl $targetUrl"
94 >  #$SRMCP -2 $sourceUrl $targetUrl
95 >
96   else
97    echo "$DCCP dcap://t2srv0005.cmsaf.mit.edu/$dataFile $target"
98    $DCCP dcap://t2srv0005.cmsaf.mit.edu/$dataFile $target

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines