source ~/.bashrc
conda activate dqc

# Filter
if [ -z "$1" ]
  then
    echo "No filter argument supplied"	
    exit
fi
TAG=$1

cd /data/joan/c3s512-wp1-datachecker/dqc_wrapper
QAR_CONF_DIR="/data/joan/c3s512-wp1-datachecker/dqc_wrapper/QAR_dqc/conf"
QAR_RES_DIR="/shared/QAR_dqc/results"

for check_tests in `ls -1 $QAR_CONF_DIR/$TAG*`
do
	zip=`basename $conf | sed s/.ini/.zip/g`

	# Avoid skipping 
	if [ ! -f $QAR_RES_DIR/$zip ]; then
       		# Fork
		touch $QAR_RES_DIR/$zip
        	cmd="python checker.py $conf"
        	$cmd 
	fi

done
