7 |
|
echo " ";echo " ==== JOB ENVIRONMENT ==== ";echo " "; whoami;id;/bin/hostname;pwd |
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 |
+ |
|
12 |
|
klist |
13 |
|
id=`id -u` |
14 |
|
cp ~/.krb5/x509up_u${id} /tmp/ |
27 |
|
pwd |
28 |
|
pwd=`pwd` |
29 |
|
|
30 |
< |
export SCRAM_ARCH=slc5_ia32_gcc434 |
31 |
< |
export VO_CMS_SW_DIR=/osg/app/cmssoft/cms |
32 |
< |
source $VO_CMS_SW_DIR/cmsset_default.sh |
33 |
< |
cd $HOME/cms/cmssw/017/CMSSW_3_9_5_patch1/src |
34 |
< |
eval `scram runtime -sh` |
35 |
< |
source $CMSSW_BASE/src/MitProd/Processing/bin/processing.sh |
36 |
< |
cd $pwd |
30 |
> |
#export SCRAM_ARCH='slc5_ia32_gcc434' |
31 |
> |
#export VO_CMS_SW_DIR=/server/01a/mitdata/cmssoft |
32 |
> |
#source $VO_CMS_SW_DIR/cmsset_default.sh |
33 |
> |
#cd $HOME/cms/cmssw/019/CMSSW_3_9_7/src |
34 |
> |
#eval `scram runtime -sh` |
35 |
> |
#source $CMSSW_BASE/src/MitProd/Processing/bin/processing.sh |
36 |
> |
#cd $pwd |
37 |
|
|
38 |
|
# make storage Urls for target and source |
39 |
|
|
40 |
< |
targetUrl=$target |
40 |
> |
targetUrl="file:///$target" |
41 |
|
if [ "`echo $target | grep /pnfs/cmsaf.mit.edu`" != "" ] |
42 |
|
then |
43 |
|
storageEle="se01.cmsaf.mit.edu" |
44 |
|
storagePath='/srm/managerv2?SFN=' |
45 |
|
targetUrl="srm://${storageEle}:8443${storagePath}$target" |
46 |
+ |
elif [ "`echo $target | grep /mnt/hadoop/cms/store`" != "" ] |
47 |
+ |
then |
48 |
+ |
storageEle="se02.cmsaf.mit.edu" |
49 |
+ |
storagePath='/srm/v2/server?SFN=' |
50 |
+ |
targetUrl="srm://${storageEle}:8443${storagePath}$target" |
51 |
|
elif [ "`echo $target | grep /castor/cern.ch`" != "" ] |
52 |
|
then |
53 |
|
storageEle='srm-cms.cern.ch' |
54 |
|
storagePath='/srm/managerv2?SFN=' |
55 |
|
targetUrl="srm://${storageEle}:8443${storagePath}$target" |
56 |
+ |
else |
57 |
+ |
targetUrl="" |
58 |
|
fi |
59 |
|
|
60 |
< |
sourceUrl=$dataFile |
60 |
> |
sourceUrl="file:///$dataFile" |
61 |
|
if [ "`echo $dataFile | grep /pnfs/cmsaf.mit.edu`" != "" ] |
62 |
|
then |
63 |
|
storageEle="se01.cmsaf.mit.edu" |
64 |
|
storagePath='/srm/managerv2?SFN=' |
65 |
|
sourceUrl="srm://${storageEle}:8443${storagePath}$dataFile" |
66 |
+ |
elif [ "`echo $dataFile | grep /mnt/hadoop/cms/store`" != "" ] |
67 |
+ |
then |
68 |
+ |
storageEle="se02.cmsaf.mit.edu" |
69 |
+ |
storagePath='/srm/v2/server?SFN=' |
70 |
+ |
sourceUrl="srm://${storageEle}:8443${storagePath}$dataFile" |
71 |
|
elif [ "`echo $dataFile | grep /castor/cern.ch`" != "" ] |
72 |
|
then |
73 |
|
storageEle='srm-cms.cern.ch' |
76 |
|
fi |
77 |
|
|
78 |
|
echo " "; echo "Starting download now"; echo " " |
79 |
< |
echo "srm-copy $sourceUrl $targetUrl" |
80 |
< |
srm-copy $sourceUrl $targetUrl |
79 |
> |
if [ "$targetUrl" != "" ] |
80 |
> |
then |
81 |
> |
echo "srmcp -srm_protocol_version=2 $sourceUrl $targetUrl" |
82 |
> |
srmcp -srm_protocol_version=2 $sourceUrl $targetUrl |
83 |
> |
else |
84 |
> |
echo "$DCCP dcap://t2srv0005.cmsaf.mit.edu/$dataFile $target" |
85 |
> |
$DCCP dcap://t2srv0005.cmsaf.mit.edu/$dataFile $target |
86 |
> |
fi |
87 |
|
|
88 |
|
exit 0 |