Skip to content

Commit fe43e56

Browse files
sawenzelclaude
andcommitted
Stop anchorMC when the reco workflow printout is missing
This adds a check that workflowconfig.log contains the printed reco workflow of every step. - If the printout was lost, config-json.json was created with empty ConfigParams and passed the existing check. - The MC then ran the reconstruction without the anchored settings, for example ITS cluster squashing off. - Existing reco tags keep the O2 script that can lose the printout, so the check is needed independently of an O2 fix. - The check is added to anchorMC.sh and anchorMC_DataEmbedding.sh. https://its.cern.ch/jira/browse/O2-7359 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 7290731 commit fe43e56

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎MC/run/ANCHOR/anchorMC.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,13 @@ if [[ ! -f workflowconfig.log ]]; then
309309
echo "Workflowconfig.log file not found"
310310
exit 1
311311
fi
312+
# each reco step must have its workflow printout, otherwise the MC would run without the anchored reco settings
313+
NRECOSTEPS=$(grep -c "^Step [0-9])" workflowconfig.log)
314+
[[ ${NRECOSTEPS} -eq 0 ]] && NRECOSTEPS=1
315+
if [[ $(grep -c "#Workflow command" workflowconfig.log) -lt ${NRECOSTEPS} ]]; then
316+
echo_error "workflowconfig.log does not contain the reco workflow of every step. Exiting."
317+
exit 1
318+
fi
312319

313320
export ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP
314321
echo_info "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG"

‎MC/run/ANCHOR/anchorMC_DataEmbedding.sh‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@ if [[ ! -f workflowconfig.log ]]; then
315315
echo "Workflowconfig.log file not found"
316316
exit 1
317317
fi
318+
# each reco step must have its workflow printout, otherwise the MC would run without the anchored reco settings
319+
NRECOSTEPS=$(grep -c "^Step [0-9])" workflowconfig.log)
320+
[[ ${NRECOSTEPS} -eq 0 ]] && NRECOSTEPS=1
321+
if [[ $(grep -c "#Workflow command" workflowconfig.log) -lt ${NRECOSTEPS} ]]; then
322+
echo_error "workflowconfig.log does not contain the reco workflow of every step. Exiting."
323+
exit 1
324+
fi
318325

319326
export ALIEN_JDL_LPMPRODUCTIONTAG=$ALIEN_JDL_LPMPRODUCTIONTAG_KEEP
320327
echo_info "Setting back ALIEN_JDL_LPMPRODUCTIONTAG to $ALIEN_JDL_LPMPRODUCTIONTAG"

0 commit comments

Comments
 (0)