From 42a5cd5c8ecf351f22f3613e7095e6a93f0496bf Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Fri, 20 Feb 2026 20:36:30 -0500 Subject: [PATCH 1/6] add convenience scripts for diffing gold runs --- libexec/gold-diff | 14 ++++++++++++++ libexec/gold-run | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 libexec/gold-diff create mode 100644 libexec/gold-run diff --git a/libexec/gold-diff b/libexec/gold-diff new file mode 100644 index 0000000000..93e8fdfd12 --- /dev/null +++ b/libexec/gold-diff @@ -0,0 +1,14 @@ +#!/bin/bash + +a=development +b=redecodering2 + +for x in $a/*.hipo +do + y=$b/$(basename $x) + stub=$(basename $x) + stub=${stub%%.*} + hipo-diff -q 1 -s 0,1,2 -n 1000 $x $y >& $stub.log & +done + +wait diff --git a/libexec/gold-run b/libexec/gold-run new file mode 100644 index 0000000000..de9b919c5e --- /dev/null +++ b/libexec/gold-run @@ -0,0 +1,18 @@ +#!/bin/bash + +exe=decoder4u -n 10000 +csv=gold.csv +cache=$(cd $(dirname ${BASH_SOURCE[0]}) &> /dev/null && pwd)/pin-gold.txt +IFS=$'\n' + +for x in $(tail -n +2 $csv) +do + x=${x//[[:space:]]/} + run=${x##*,} + period=${x%%,*} + stub=${period}_${run} + data=$(grep ${run} $cache | grep 1$) + $exe -o $stub.hipo $data >& $stub.log & +done + +wait From 35e6af83fe591a306daf831803dc3d74479fe6be Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Mon, 23 Feb 2026 22:00:17 -0500 Subject: [PATCH 2/6] Increase hipo-diff limit from 1000 to 10000 --- libexec/gold-diff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/gold-diff b/libexec/gold-diff index 93e8fdfd12..43e33588fa 100644 --- a/libexec/gold-diff +++ b/libexec/gold-diff @@ -8,7 +8,7 @@ do y=$b/$(basename $x) stub=$(basename $x) stub=${stub%%.*} - hipo-diff -q 1 -s 0,1,2 -n 1000 $x $y >& $stub.log & + hipo-diff -q 1 -s 0,1,2 -n 10000 $x $y >& $stub.log & done wait From acf3f61d7d68bf4c6d808709f3a59aaeaf01de6a Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Thu, 26 Feb 2026 15:47:24 -0500 Subject: [PATCH 3/6] add git-lfs helper --- libexec/git-lfs-wget | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 libexec/git-lfs-wget diff --git a/libexec/git-lfs-wget b/libexec/git-lfs-wget new file mode 100755 index 0000000000..cf3faa39be --- /dev/null +++ b/libexec/git-lfs-wget @@ -0,0 +1,10 @@ +#!/bin/bash + +[ "$#" -ne 2 ] && echo 'Usage: git-lfs-wget URI subpath' && exit 1 +subdir=$(echo $1 | awk -F/ '{print$NF}' | awk -F. '{print$1}') +GIT_LFS_SKIP_SMUDGE=1 git clone $1 +cd $subdir +git lfs install --skip-smudge +git config lfs.fetchinclude "$2" +git lfs pull + From f992eed03d7fa2496a977d8f057a34a77d927d55 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Thu, 26 Feb 2026 15:55:15 -0500 Subject: [PATCH 4/6] add help printout --- libexec/gold-diff | 0 libexec/gold-run | 13 +++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) mode change 100644 => 100755 libexec/gold-diff mode change 100644 => 100755 libexec/gold-run diff --git a/libexec/gold-diff b/libexec/gold-diff old mode 100644 new mode 100755 diff --git a/libexec/gold-run b/libexec/gold-run old mode 100644 new mode 100755 index de9b919c5e..9a1fe66339 --- a/libexec/gold-run +++ b/libexec/gold-run @@ -1,8 +1,17 @@ #!/bin/bash -exe=decoder4u -n 10000 +exe='decoder4u -n 10000' csv=gold.csv -cache=$(cd $(dirname ${BASH_SOURCE[0]}) &> /dev/null && pwd)/pin-gold.txt +cache=pin-gold.txt + +if ! [ -f $csv ] || ! [ -f $cache ] +then + echo "ERROR: This requires the gold text files from the 'raw-data' repository" + echo "to be in your current working directory. The easiest way to get them:" + echo "GIT_LFS_SKIP_SMUDGE=1 git clone https://code.jlab.org/hallb/clas12/raw-data.git" + exit 1 +fi + IFS=$'\n' for x in $(tail -n +2 $csv) From 6eb6f29ca0d3b10fd506edf2cfda3ec417c27408 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Thu, 26 Feb 2026 16:00:10 -0500 Subject: [PATCH 5/6] generalize --- libexec/gold-diff | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libexec/gold-diff b/libexec/gold-diff index 43e33588fa..8e2903ae0a 100755 --- a/libexec/gold-diff +++ b/libexec/gold-diff @@ -1,7 +1,9 @@ #!/bin/bash -a=development -b=redecodering2 +[ "$#" -ne 2 ] && echo 'Usage: gold-diff dir1 dir2' && exit 1 + +a=$1 +b=$2 for x in $a/*.hipo do From 5fe20f1f36a8b4d5c1e90883faed05fdab614997 Mon Sep 17 00:00:00 2001 From: Nathan Baltzell Date: Thu, 26 Feb 2026 17:11:35 -0500 Subject: [PATCH 6/6] only clone if necessary --- libexec/git-lfs-wget | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/libexec/git-lfs-wget b/libexec/git-lfs-wget index cf3faa39be..84646d2f91 100755 --- a/libexec/git-lfs-wget +++ b/libexec/git-lfs-wget @@ -1,10 +1,24 @@ #!/bin/bash [ "$#" -ne 2 ] && echo 'Usage: git-lfs-wget URI subpath' && exit 1 + subdir=$(echo $1 | awk -F/ '{print$NF}' | awk -F. '{print$1}') -GIT_LFS_SKIP_SMUDGE=1 git clone $1 + +if [ -d $subdir ] +then + if ! [ -e $subdir/.git ] + then + echo "ERROR: $subdir already exists but is not a git repo." + exit 1 + fi +else + GIT_LFS_SKIP_SMUDGE=1 git clone $1 + git lfs install --skip-smudge +fi + cd $subdir -git lfs install --skip-smudge + git config lfs.fetchinclude "$2" + git lfs pull