v491 dev5 - bug fixes in lookup table reading #277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theterminate
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 thesetMCTableFiles
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 thegetTables
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 thei_noise_bin
variable instead of redeclaring it in thereadLookupTable
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 missingtpars
as missing telescopes. ([src/VTableLookupDataHandler.cppR464-R471](https://github.com/VERITAS-Observatory/EventDisplay_v4/pull/277/files#diff-0a22e38e8625ccb0dcafda3e1bc12a8a056336e20aca5b04b8593bd2ba57cfb0R464-R471)
)