Skip to content

Change TPG threshold value type from u16 to s16.#287

Merged
aeoranday merged 2 commits into
developfrom
aeo/change-threshold-bounds
Apr 28, 2026
Merged

Change TPG threshold value type from u16 to s16.#287
aeoranday merged 2 commits into
developfrom
aeo/change-threshold-bounds

Conversation

@aeoranday
Copy link
Copy Markdown
Member

Description

The value type in configuration for TPG thresholds were incorrectly set to unsigned integer 16 instead of signed. The problem was notice at-scale with ProtoDUNE VD (NP02) when setting the permissible configuration maximum for u16. Manually setting the value to s16 maximum behaved appropriately and as expected for TPG.

Configurations should generally not be using threshold values near the maximum, so it is not expected to break existing configurations.

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature or enhancement (non-breaking change which adds functionality)
  • Optimization (non-breaking change that improves code/performance)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Testing checklist

  • Unit tests pass (e.g. dbt-build --unittest)
  • Minimal system quicktest passes (pytest -s minimal_system_quick_test.py)
  • Full set of integration tests pass (dunedaq_integtest_bundle.sh)
  • Python tests pass if applicable (e.g. python -m pytest)
  • Pre-commit hooks run successfully if applicable (e.g. pre-commit run --all-files)

Check that trying to set a threshold value greater than 32767 is not permitted. There is otherwise no TPG or Readout functionality change. This is purely a first-level configuration change.

Further checks

  • Code is commented where needed, particularly in hard-to-understand areas
  • Code style is correct (dbt-build --lint, and/or see https://dune-daq-sw.readthedocs.io/en/latest/packages/styleguide/)
  • If applicable, new tests have been added or an issue has been opened to tackle that in the future.
    (Indicate issue here: # (issue))

@aeoranday aeoranday requested a review from MRiganSUSX April 22, 2026 11:51
@aeoranday aeoranday self-assigned this Apr 22, 2026
@aeoranday aeoranday added bug Something isn't working enhancement New feature or request labels Apr 22, 2026
Copy link
Copy Markdown
Contributor

@MRiganSUSX MRiganSUSX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested max limit at ehn1 and worked as expected.
(whether this should be a signed int is beyond me)

@aeoranday aeoranday merged commit 555ac4e into develop Apr 28, 2026
4 checks passed
@aeoranday aeoranday deleted the aeo/change-threshold-bounds branch April 28, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants