Commit a0ab6947 authored by Gernot Maier's avatar Gernot Maier
Browse files

add some loops to take prod3b SCT case into account

parent cead550b
......@@ -8,9 +8,16 @@
DD="Prod5_Paranal_AdvancedBaseline_NSB1x"
# Prod4b SST production
DD="Prod4b_Paranal"
# Prod4b SST production
DD="Prod3b_Paranal"
ZE="20deg"
DL="DL0"
SCT="FALSE"
if [[ $DD == "Prod3b_Paranal" ]]; then
DL="HB9"
SCT="TRUE"
fi
mkdir -p tmp_log
......@@ -37,8 +44,21 @@ do
FFLIST="${DD}_${ZE}/${DD}_${PP}_${A}_${ZE}_SSTOnly_${S}_${DL}.GRID.list"
./getRawFilesFromGRID-DIRAC.sh ${FFLIST} ${DD}/${P}/ 100 &> tmp_log/${P}_${A}_${S}.log &
done
# all other productions
else
./getRawFilesFromGRID-DIRAC.sh ${DD}/${DD}_${PP}_${A}_${ZE}_${DL}.GRID.list ${DD}/${P}/ 100 &> tmp_log/${P}_${A}.log &
FLIST="${DD}/${DD}_${PP}_${A}_${ZE}_${DL}.GRID.list"
# prod3b needs some special treatment
if [[ ! -e ${FLIST} ]]; then
echo "File list not found; trying prod3b naming ($FLIST); trying prod3b lists:"
FLIST="${DD}_${ZE}_${DL}/Paranal_${PP}_${A}_${ZE}_${DL}.GRID.list"
if [[ ! -e ${FLIST} ]]; then
echo "$FLIST not found"
exit
fi
echo "...found ${FLIST}"
fi
echo "Reading file list $FLIST"
./getRawFilesFromGRID-DIRAC.sh $FLIST ${DD}/${P}/ 100 ${SCT} &> tmp_log/${P}_${A}.log &
fi
sleep 10
done
......
......@@ -9,7 +9,7 @@
if [ $# -lt 3 ]; then
echo "
./getRawFilesFromGRID-DIRAC.sh <run list> <target directory> <max files (100)>
./getRawFilesFromGRID-DIRAC.sh <run list> <target directory> <max files (100)> [SCT cut=TRUE]
download using DIRAC tools
(adjusted to DESY environment)
......@@ -17,13 +17,17 @@ download using DIRAC tools
exit
fi
echo "RUNLSIT ${1}"
echo "Target directory: ${2}"
echo "Max file: ${3}"
[[ "$4" ]] && SCT=$4 || SCT="FALSE"
PDIR=`pwd`
if [ -e ${2} ]
then
mkdir -p ${2}
fi
if [ ! -e ${1} ]; then
echo "error: file list not found: ${1}"
exit
......@@ -43,7 +47,12 @@ do
let "z = $z + 1"
LLIST=$2/tmplists/$FFN.tmplist.d.$z.list
echo $LLIST
sed -n "$l,$k p" $1 > $LLIST
# optionally download only SCT files
if [[ $SCT = "TRUE" ]]; then
sed -n "$l,$k p" $1 | grep SCT > $LLIST
else
sed -n "$l,$k p" $1 > $LLIST
fi
# check if files are on disk
FF=`cat $LLIST`
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment