StrongPixelSet: Fix
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m4s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m5s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m46s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m53s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 16m42s
Build Packages / build:rpm (rocky8) (push) Successful in 17m23s
Build Packages / build:rpm (rocky9) (push) Successful in 18m15s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m27s
Build Packages / Generate python client (push) Successful in 58s
Build Packages / Build documentation (push) Successful in 1m54s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m51s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m51s
Build Packages / XDS test (durin plugin) (push) Successful in 11m3s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m17s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m45s
Build Packages / DIALS test (push) Successful in 14m1s
Build Packages / Unit tests (push) Successful in 1h0m46s

This commit is contained in:
2026-04-22 20:03:49 +02:00
parent b73848860f
commit 7265bd91f2
@@ -10,16 +10,16 @@
#include "StrongPixelSet.h"
StrongPixelSet::StrongPixelSet() : strong_pixel_count(0) {
pixels.reserve(UINT16_MAX);
pixels.reserve(max_strong_pixel_per_module);
}
void StrongPixelSet::AddStrongPixel(uint16_t col, uint16_t line, int32_t photons) {
pixels.push_back(strong_pixel{.col = col, .line = line, .counts = photons});
++strong_pixel_count;
}
bool is_far_enough(strong_pixel pixel0, strong_pixel pixel1) {
auto line_diff = pixel0.line - pixel1.line;
return line_diff > 1 || line_diff < -1;
return (pixel1.line - pixel0.line) > 1;
}
bool is_adjacent(strong_pixel pixel0, strong_pixel pixel1) {
@@ -30,11 +30,8 @@ bool is_adjacent(strong_pixel pixel0, strong_pixel pixel1) {
uint32_t StrongPixelSet::find_root(uint32_t e) {
uint32_t r = e;
//assert(r < L.size());
while (L[r] != r) {
while (L[r] != r)
r = L[r];
//assert(r < L.size());
}
return r;
}
@@ -42,11 +39,9 @@ uint32_t StrongPixelSet::make_union(uint32_t e1, uint32_t e2) {
uint32_t e;
if (e1 < e2) {
e = e1;
//assert(e2 < L.size());
L[e2] = e;
} else {
e = e2;
//assert(e1 < L.size());
L[e1] = e;
}
return e;