JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Exit if an array in parameter file smaller than requested. #441

Closed sawjlab closed 4 years ago

sawjlab commented 5 years ago

Currently, if you request an array with THcParmList::LoadParmValues and the array defined in the parameter files is smaller than the requested size, then a warning message is printed. Since a smaller than requested array can leave some elements of the array undefined, it is preferable to simply crash the analyzer instead of printing a warning that will probably be ignored.

Currently the SHMS shower counter has the lines:

pcal_c_cor = 0 0 pcal_d_cor = 0 0

that should have been

pcal_c_cor = 0, 0 pcal_d_cor = 0, 0

and there could other errors in the parameter files. We will wait a bit to merge this pull request until users have a chance to fix their parameter files.