diff --git a/DATA/production/common/getStat.sh b/DATA/production/common/getStat.sh index 29a0fdbaa..32f149ff8 100755 --- a/DATA/production/common/getStat.sh +++ b/DATA/production/common/getStat.sh @@ -12,7 +12,7 @@ nCTFsFilesFailed=`grep "FileFetcher: non-zero exit code [0-9]*" $1 | wc -l` nCTFsProcessed=`grep "Read CTF" $1 | tail -1 | sed 's/^.*Read CTF \([0-9]*\).*$/\1/'` nCTFsProcessed=$((nCTFsProcessed + 1)) -if [[ $nCTFsFilesInspected != $((nCTFsFilesFailed + nCTFsFilesOK)) ]]; then +if [[ $nCTFsFilesInspected > 0 && $nCTFsFilesInspected != $((nCTFsFilesFailed + nCTFsFilesOK)) ]]; then echo "Something went wrong with parsing the log file: CTF files inspected ($nCTFsFilesInspected) is not the sum of those successfully processed ($nCTFsFilesOK) and those that failed ($nCTFsFilesFailed)" exit 8 fi diff --git a/DATA/production/configurations/asyncReco/async_pass.sh b/DATA/production/configurations/asyncReco/async_pass.sh index 28969d0ce..3911ffcdb 100755 --- a/DATA/production/configurations/asyncReco/async_pass.sh +++ b/DATA/production/configurations/asyncReco/async_pass.sh @@ -23,23 +23,28 @@ timeStartFullProcessing=`date +%s` export inputarg="${1}" if [[ "${1##*.}" == "root" ]]; then - #echo ${1##*.} - #echo "alien://${1}" > list.list - #export MODE="remote" - echo "${1}" > list.list - if [[ ! -z $ASYNC_BENCHMARK_ITERATIONS ]]; then - for i in `seq 1 $ASYNC_BENCHMARK_ITERATIONS`; do echo "${1}" >> list.list; done - fi - export MODE="LOCAL" - shift + #echo ${1##*.} + #echo "alien://${1}" > list.list + #export MODE="remote" + echo "${1}" > list.list + if [[ ! -z $ASYNC_BENCHMARK_ITERATIONS ]]; then + for i in `seq 1 $ASYNC_BENCHMARK_ITERATIONS`; do echo "${1}" >> list.list; done + fi + export MODE="LOCAL" + shift elif [[ "${1##*.}" == "xml" ]]; then + if [[ $ALIEN_JDL_DOWNLOADINPUTFILES == "1" ]]; then + echo "Downloading input files done by the job agent" + sed -rn 's/.*file\ name="(o2_ctf[^"]*)".*/\1/p' $1 > list.list + else sed -rn 's/.*turl="([^"]*)".*/\1/p' $1 > list.list - export MODE="remote" - shift + fi + export MODE="remote" + shift elif [[ $1 != "list.list" && "${1##*.}" == "list" ]]; then - cp $1 list.list - export MODE="remote" - shift + cp $1 list.list + export MODE="remote" + shift fi # Could need sometimes to iterate just a subset of the input files