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