Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v491 dev5 - bug fixes in lookup table reading #277

Merged
merged 3 commits into from
Oct 21, 2024
Merged

v491 dev5 - bug fixes in lookup table reading #277

merged 3 commits into from
Oct 21, 2024

Conversation

GernotMaier
Copy link
Member

This pull request includes several changes to the VTableLookup class and related files to improve the handling of noise levels, directory structure, and error checking. The most important changes include modifying the directory structure for noise levels, clearing noise-related vectors at appropriate times, and adding error checks for index boundaries.

Directory Structure and Noise Levels:

  • src/VPlotLookupTable.cpp: Modified the directory structure for noise levels to place the noise directory at the end. ([src/VPlotLookupTable.cppL253-R253](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-b169aa876a729c59db54348848b787791371dd24acdf2c47fae51460ec0466b0L253-R253))
  • src/VTableLookup.cpp: Updated the directory structure format for noise levels in the terminate method. ([src/VTableLookup.cppL897-R899](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL897-R899))

Clearing Noise-Related Vectors:

  • src/VTableLookup.cpp: Cleared noise-related vectors at appropriate times in the setMCTableFiles method to ensure proper memory management. ([[1]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fR364), [[2]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL372-R405), [[3]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL415))

Error Checking:

  • src/VTableLookup.cpp: Added error checks for index boundaries in the getTables method to prevent out-of-range errors. ([src/VTableLookup.cppL1231-R1257](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL1231-R1257))

Additional Changes:

  • inc/VTableLookup.h: Updated comments to reflect the inclusion of noise levels in the data structure. ([inc/VTableLookup.hL67-R70](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-af20600c21e46438b83d3280c59e76d1e5822fb93af703e3e996a3a20a6d711dL67-R70))
  • src/VTableLookup.cpp: Reused the i_noise_bin variable instead of redeclaring it in the readLookupTable method. ([[1]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fR685), [[2]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL734-R737), [[3]](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-8c7714f1b69ca503cce72465a5f7b9a85d7fc8d11acc24ddffec965e2aa7e95fL758-R762))
  • src/VTableLookupDataHandler.cpp: Added a check to treat missing tpars as missing telescopes. ([src/VTableLookupDataHandler.cppR464-R471](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-0a22e38e8625ccb0dcafda3e1bc12a8a056336e20aca5b04b8593bd2ba57cfb0R464-R471))

@GernotMaier GernotMaier self-assigned this Oct 21, 2024
@GernotMaier GernotMaier marked this pull request as ready for review October 21, 2024 08:07
@GernotMaier GernotMaier merged commit 9064658 into main Oct 21, 2024
5 checks passed
@GernotMaier GernotMaier deleted the v491-dev5 branch October 21, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant