#!/bin/bash pwd cd $PANDAPATH; pwd . ./setenv echo "anafilename:" $anafilename echo "histfilename:" $histfilename echo "runnumber:" $runnumber echo "gas:" $gas echo "field:" $field echo "gain:" $gain echo "error:" $error echo "coorectrion:" $correction echo "detonly:" $det echo "tpcID:" $tpcID echo $PANDAPATH echo "i am here:";pwd export MYTMPDIR=/var/tmp #export MYTMPDIR="`mktemp -d -p /var/tmp`"; trap "rm -rf \"$MYTMPDIR\"" EXIT #if [ ! -d "$MYTMPDIR" ]; then # echo "tmp directory is not existing, try recreating" # mkdir $MYTMPDIR #fi anapath=$(dirname "${anafilename}") anafilebasename=$(basename "${anafilename}") echo "tmpdir:" ${MYTMPDIR} echo "path: " ${anapath} echo "anfilebasename: " ${anafilebasename} echo "ls mytmpdir" ls -lrtah ${MYTMPDIR}/ #ls -lrtah /var/tmp/ echo "ls anafile" ls ${anafilename} echo "checking the stuff" date python $PANDAPATH/FOPI/BatchTools/check_disk_io.py date df -h /var/tmp python $PANDAPATH/FOPI/BatchTools/check_tmp_space.py date cp -v ${anafilename} ${MYTMPDIR}/ date echo "ls mytmpdir after copy:" ls -lrtah ${MYTMPDIR}/ echo "now finally sarting the actual script" python $PANDAPATH/FOPI/mberger/analyseFOPIReco_pions.py ${MYTMPDIR}/${anafilebasename} --batch --info "generator=data,angle=-1,error=${error},correction=${correction},gas=${gas}" --nopostprocess --detonly $det --tpcID $tpcID sleep 5 rm -v ${MYTMPDIR}/${anafilebasename} echo "moving output file to" ${anapath} mv -v ${MYTMPDIR}/${histfilename} ${anapath} ls ${MYTMPDIR} #rmdir -v ${MYTMPDIR} echo "all done"