Skip to content

Commit

Permalink
add protection against time-inverted IOVs in the comparator script
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Oct 16, 2024
1 parent be4adbc commit 953ee39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CondCore/SiStripPlugins/scripts/SiStripG2GainsValidator
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def getCommandOutput(command):
if err:
print ('%s failed w/ exit code %d' % (command, err))
sys.exit(1) # This will stop the script immediately with the failure exit code
print(data)
return data

##############################################
Expand Down
6 changes: 6 additions & 0 deletions CondCore/SiStripPlugins/scripts/testCompareSiStripG2Gains.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ W_DIR=$(pwd)
STARTIOV=$2
ENDIOV=$3

# Check if ENDIOV is greater than or equal to STARTIOV
if (( $ENDIOV < $STARTIOV )); then
echo "Error: ENDIOV ($ENDIOV) is less than STARTIOV ($STARTIOV). Skipping comparisons"
exit 0
fi

source /cvmfs/cms.cern.ch/cmsset_default.sh
eval "$(scram run -sh)"

Expand Down

0 comments on commit 953ee39

Please sign in to comment.