diff --git a/MC/run/ANCHOR/anchorMC.sh b/MC/run/ANCHOR/anchorMC.sh index 4016c3e54..9059673f5 100755 --- a/MC/run/ANCHOR/anchorMC.sh +++ b/MC/run/ANCHOR/anchorMC.sh @@ -309,6 +309,13 @@ if [[ ! -f workflowconfig.log ]]; then echo "Workflowconfig.log file not found" exit 1 fi +# each reco step must have its complete workflow printout (ending with o2-dpl-run), otherwise the MC would run without the anchored reco settings +NRECOSTEPS=$(grep -c "^Step [0-9])" workflowconfig.log) +[[ ${NRECOSTEPS} -eq 0 ]] && NRECOSTEPS=1 +if [[ $(grep -c "#Workflow command" workflowconfig.log) -lt ${NRECOSTEPS} || $(grep -c "^o2-dpl-run " workflowconfig.log) -lt ${NRECOSTEPS} ]]; then + echo_error "workflowconfig.log does not contain the complete reco workflow of every step. Exiting." + exit 1 +fi export ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP echo_info "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG" diff --git a/MC/run/ANCHOR/anchorMC_DataEmbedding.sh b/MC/run/ANCHOR/anchorMC_DataEmbedding.sh index 01d40fef7..313f913ec 100755 --- a/MC/run/ANCHOR/anchorMC_DataEmbedding.sh +++ b/MC/run/ANCHOR/anchorMC_DataEmbedding.sh @@ -315,6 +315,13 @@ if [[ ! -f workflowconfig.log ]]; then echo "Workflowconfig.log file not found" exit 1 fi +# each reco step must have its complete workflow printout (ending with o2-dpl-run), otherwise the MC would run without the anchored reco settings +NRECOSTEPS=$(grep -c "^Step [0-9])" workflowconfig.log) +[[ ${NRECOSTEPS} -eq 0 ]] && NRECOSTEPS=1 +if [[ $(grep -c "#Workflow command" workflowconfig.log) -lt ${NRECOSTEPS} || $(grep -c "^o2-dpl-run " workflowconfig.log) -lt ${NRECOSTEPS} ]]; then + echo_error "workflowconfig.log does not contain the complete reco workflow of every step. Exiting." + exit 1 +fi export ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP echo_info "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG"