Conversation
|
I'll review this pull request by first loading the relevant details and changes.Here's my review of PR #5 — "updated CRV calibration macro". The PR modifies 4 existing files and adds 2 new files across 6 commits. Below are the issues I found: Issues Found1. 🔴 Potential Null Pointer Dereference in
|
| Severity | Count | Issues |
|---|---|---|
| 🔴 High | 2 | Null pointer dereferences (CrvCalibration.C hist, CrvTimeOffsets_extracted.C file) |
| 🟡 Medium | 5 | Uncaught map::at() exception, typo "opposide", memory leaks, hardcoded dates, absolute fit threshold for different scales |
| 🟢 Low | 2 | Oversized spectrumNPeaks, inconsistent verbose level |
The most critical issues are the null pointer dereferences — particularly the hist pointer in CrvCalibration.C which can realistically be null for missing channels.
|
Updated the code to address the issues from above. |
|
Memory leaks: TCanvas and TText objects are created with new inside loops but never deleted. In ROOT interactive sessions this is typical (ROOT manages garbage collection), but if this macro is ever run in batch or compiled mode, it would leak. Consider adding a comment or using RAII patterns. |
|
All TCanvas and TText objects are now added to gROOT for automatic memory clean up. |
|
Ralf says it's ready to be merged |
rlcee
left a comment
There was a problem hiding this comment.
This style of referring to database text in the Offline will only work in limited cases for a limited time. So OK for today, but I hope we can move on soon.
No description provided.