#! /bin/bash
# $Id: gridka_storetosamlocal.sh,v 1.1 2003/11/28 16:20:06 wicke Exp $
#

# Source whatever is needed to make D0 UPS "setup" available:
# GridKa needs:
. /grid/fzk.de/software/d0/etc/profile

#
setup sam
setup sam_cp
setup sam_gridftp

# Get working directory and add to PATH:
OLDPWD=$PWD
cd `dirname $0`
export PATH=$PATH:$PWD
cd $OLDPWD

# List of space separated full paths where tagfiles
# could appear (subdirectories will be searched):
export RERECO_RESULT_DIRS="/grid/fzk.de/d0/d0-5/wicke/storetest/"

# Directory in which files to tag successfull copying to FNAL will be created
# Use "." if you want it in the same directory as the production tagfile.
export RERECO_SUCCESS_TAGFILE_DIR="/grid/fzk.de/home/sam/reprocessing/tags"

# If not defined until no define your SAM_STATION name
if [ -z $SAM_STATION ]; then
  export SAM_STATION=unknown
fi
export RERECO_TARGET="d0.fzk.de:/grid/fzk.de/d0/tapestore"

# Filename pattern for tagfiles (we put recoST*.tagfile to avoid copying DSTs)
export RERECO_TAGFILE_PATTERN="reco_*.tagfile"

# call Hendriks skript
echo "Copy to $RERECO_TARGET starting... ("`date`")"
./tagcopy.sh storelocal.sh 
echo "Copy to $RERECO_TARGET ended.      ("`date`")"
#

