From 52824eeb22e7a81ed1186acb0c6c6957ef421a18 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Mon, 24 Mar 2025 11:20:57 -0400 Subject: [PATCH 1/3] feat: pre-commit hook to update banks README --- .../util/dumpBankIDs.rb => .github/make_banks_readme.rb | 9 ++------- .github/make_banks_readme_precommit.sh | 2 ++ .pre-commit-config.yaml | 8 ++++++++ 3 files changed, 12 insertions(+), 7 deletions(-) rename etc/bankdefs/util/dumpBankIDs.rb => .github/make_banks_readme.rb (92%) create mode 100755 .github/make_banks_readme_precommit.sh create mode 100644 .pre-commit-config.yaml diff --git a/etc/bankdefs/util/dumpBankIDs.rb b/.github/make_banks_readme.rb similarity index 92% rename from etc/bankdefs/util/dumpBankIDs.rb rename to .github/make_banks_readme.rb index 1f6ac8dc5f..32dbef3b0f 100755 --- a/etc/bankdefs/util/dumpBankIDs.rb +++ b/.github/make_banks_readme.rb @@ -51,13 +51,8 @@ # dump a table puts """# Bank Group and Item IDs -This file was generated by -```bash -#{$0} #{ARGV.join ' '} -``` - -> [!IMPORTANT] -> Please re-run this script if you modify any of the bank definitions. +> [!NOTE] +> Iguana banks, which are defined in the `iguana` repository, use group number 30000. """ diff --git a/.github/make_banks_readme_precommit.sh b/.github/make_banks_readme_precommit.sh new file mode 100755 index 0000000000..d2fed8649f --- /dev/null +++ b/.github/make_banks_readme_precommit.sh @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +.github/make_banks_readme.rb etc/bankdefs/hipo4 > etc/bankdefs/hipo4/README.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000000..a482a3ca64 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +repos: +- repo: local + hooks: + - id: make_banks_readme + name: make banks readme + entry: .github/make_banks_readme_precommit.sh + language: script + pass_filenames: false From 261b170bc4cc19a81d1f7d1049105ea94a5c980f Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Wed, 26 Mar 2025 17:57:38 -0400 Subject: [PATCH 2/3] test: re-trigger precommit bot --- .github/make_banks_readme.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/make_banks_readme.rb b/.github/make_banks_readme.rb index 32dbef3b0f..ca67af8768 100755 --- a/.github/make_banks_readme.rb +++ b/.github/make_banks_readme.rb @@ -52,7 +52,7 @@ puts """# Bank Group and Item IDs > [!NOTE] -> Iguana banks, which are defined in the `iguana` repository, use group number 30000. +> Iguana banks, which are defined in the Iguana repository, use group number 30000. """ From 36d4c135e05c4add932f87f95a3df2689756e253 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 21:58:16 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- etc/bankdefs/hipo4/README.md | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/etc/bankdefs/hipo4/README.md b/etc/bankdefs/hipo4/README.md index 8b0eac1a24..cf2881f836 100644 --- a/etc/bankdefs/hipo4/README.md +++ b/etc/bankdefs/hipo4/README.md @@ -1,12 +1,7 @@ # Bank Group and Item IDs -This file was generated by -```bash -etc/bankdefs/util/dumpBankIDs.rb etc/bankdefs/hipo4 -``` - -> [!IMPORTANT] -> Please re-run this script if you modify any of the bank definitions. +> [!NOTE] +> Iguana banks, which are defined in the Iguana repository, use group number 30000. ## Group 40 @@ -381,13 +376,24 @@ etc/bankdefs/util/dumpBankIDs.rb etc/bankdefs/hipo4 | Item ID | Name | Description | | --- | --- | --- | -| 12 | `AHDC::tdc` | TDC bank for the ALERT Wire Chamber | +| 10 | `AHDC::wf` | Waveform bank for the AHDC | +| 11 | `AHDC::adc` | ADC bank for the ALERT Wire Chamber | ## Group 22500 | Item ID | Name | Description | | --- | --- | --- | -| 11 | `ATOF::adc` | ADC bank for the ALERT time-of-flight detector | +| 12 | `ATOF::tdc` | TDC bank for the ALERT TOF | +| 21 | `ATOF::hits` | Reconstructed ATOF hits | +| 22 | `ATOF::clusters` | Clusters in ATOF | + +## Group 22600 + +| Item ID | Name | Description | +| --- | --- | --- | +| 21 | `RECOIL::hits` | RECOIL hits | +| 22 | `RECOIL::clusters` | reconstructed clusters from RECOIL | +| 23 | `RECOIL::crosses` | reconstructed crosses from RECOIL | ## Group 23000 @@ -399,3 +405,5 @@ etc/bankdefs/util/dumpBankIDs.rb etc/bankdefs/hipo4 | 24 | `AHDC::PreClusters` | Pre Clusters info | | 25 | `AHDC::Clusters` | Clusters info | | 26 | `AHDC::KFTrack` | Reco Kalman Filter Tracks | +| 30 | `AHDC_AI::Prediction` | Prediction given by AI | +| 31 | `ALERT::Projections` | Track Projections to ATOF |