Update CalSourceEnergyCalib table format to include ndf; add CalEnergyCalibInfo table#1718
Update CalSourceEnergyCalib table format to include ndf; add CalEnergyCalibInfo table#1718
Conversation
|
☀️ The build tests passed at 31af759.
N.B. These results were obtained from a build of this Pull Request at 31af759 after being merged into the base branch at a500268. For more information, please check the job page here. |
|
Can you describe a bit more what purpose of CalEnergyCalibInfo? The "info" in the name implies it is an "adhoc" table, but it doesn't have the adhoc flag. (example of adhoc is CalCosmicEnergyCalibInfo) It is structured and seems to have the purpose of an archive table, like CalSourceEnergyCalib, and so if the intent is to record, channel by channel, the result of combining the calib sources, I'd expect it to be named more like CalCombinedEnergyCalib to keep in more in parallel with the other archive tables. Thanks |
|
I second Ray's comments. You could call this |
|
I'll review this pull request by first loading the PR details and its changes.Let me get the actual file changes in this PR.Now let me look at the existing similar table ( PR Review: #1718This PR makes two changes: (1) adds an 🐛 Bug: Pre-existing
|
| Severity | Issue | Location |
|---|---|---|
| 🐛 Bug (pre-existing, fixed here) | rowToCsv was missing frFull, frFirst, frSecond fields — this is a behavior change that should be documented |
CalSourceEnergyCalib.hh |
status_message string in CSV can break parsing if it contains commas |
CalEnergyCalibInfo.hh |
|
std::string passed by value instead of by const-ref or moved |
CalEnergyCalibInfo.hh Row constructor |
|
| 💡 Nit | Inconsistent code style with existing tables | CalEnergyCalibInfo.hh |
The most important item to address is Issue 1 (the status_message CSV safety concern). The pre-existing rowToCsv bug fix is a welcome improvement but should be called out in the PR description since it changes behavior beyond just adding ndf.
|
📝 The HEAD of |
This pull request introduces a new calibration metadata table for per-SiPM energy calibration and updates the source calibration table to include additional statistical information. It also ensures these changes are integrated with the table factory for proper instantiation. The main themes are the addition of a new table and enhancements to an existing table.
New calibration metadata table:
CalEnergyCalibInfoclass inDbTables/inc/CalEnergyCalibInfo.hhto store combined ADC/MeV calibration constants, uncertainties, and status flags for each SiPM, including handling of different calibration status codes.CalEnergyCalibInfoin the table factory by updatingDbTables/src/DbTableFactory.ccto include the header and add creation logic for the new table. [1] [2]Enhancements to source calibration table:
CalSourceEnergyCalib::Rowclass inDbTables/inc/CalSourceEnergyCalib.hhto include a newndf(number of degrees of freedom) field, and updated all relevant methods, CSV serialization, and constructor to handle this new field. [1] [2] [3] [4] [5]