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

Comparing UserCode/MitProd/Processing/bin/download.sh (file contents):
Revision 1.7 by paus, Wed Oct 19 10:43:11 2011 UTC vs.
Revision 1.8 by paus, Sat Oct 22 13:07:04 2011 UTC

# Line 58 | Line 58 | do
58    dataset=`echo $line | tr -s ' ' | cut -d ' ' -f 3`
59    targetDir=`echo $line | tr -s ' ' | cut -d ' ' -f 4`
60  
61 +  
62    # stagein the sample if it is at CERN
63    if [ "`echo $baseDir | grep /castor/cern.ch`" != "" ]
64    then
65      echo "  ssh paus@lxplus.cern.ch ./stageSample.py --dataDir=$baseDir/$book/$dataset"
66      ssh paus@lxplus.cern.ch ./stageSample.py --dataDir=$baseDir/$book/$dataset
67    fi
68 <
68 >  
69    # download the sample
70    echo " downloadSample.sh $line"
71    downloadSample.sh $line
# Line 86 | Line 87 | do
87    removeZeroLengthFiles.sh $targetDir/$book/$dataset
88    
89    # finally make the corresponding catalog
90 <  echo "catalog.sh -ceg $version $dataset --retry $targetDir"
91 <  catalog.sh -ceg $version $dataset --retry $targetDir
90 >  if [ ${#version} == 3 ]
91 >  then
92 >    echo "catalog.sh -ceg $version $dataset --retry $targetDir"
93 >    catalog.sh -ceg $version $dataset --retry $targetDir
94 >  else
95 >    echo "This is not a normal dataset, make a simple catalog."
96 >    echo ""
97 >    list $targetDir/$book/$dataset > /tmp/list.$$
98 >    mkdir -p ~/catalog/t2mit/private/$book/$dataset
99 >    rm -f    ~/catalog/t2mit/private/$book/$dataset/Files
100 >    touch    ~/catalog/t2mit/private/$book/$dataset/Files
101 >    while read line
102 >    do
103 >      size=`echo $line | cut -d ' ' -f1`
104 >      file=`echo $line | cut -d ' ' -f2`
105 >      root -l -b -q $MIT_PROD_DIR/root/runSimpleFileCataloger.C\(\"$targetDir/$book/$dataset\",\"$file\"\) \
106 >          2> /dev/null | grep CATALOG >> ~/catalog/t2mit/private/$book/$dataset/Files
107 >    done < /tmp/list.$$
108 >    rm -f /tmp/list.$$
109 >  fi
110  
111    i=$(( $i+1 ))
112  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines