From 605c28bc19cbb676d2fe29e5f47bf83825d0a295 Mon Sep 17 00:00:00 2001 From: vhinger Date: Thu, 20 Aug 2026 12:30:11 +0200 Subject: [PATCH] Fix names of format helpers and remove unused --- include/aare/InclusiveROI.hpp | 2 +- include/aare/RemapFormat.hpp | 8 ++++---- src/RemapAlgorithm.cpp | 21 +++++++++++++-------- src/RemapFormat.cpp | 32 ++++++++++++++++---------------- 4 files changed, 34 insertions(+), 29 deletions(-) diff --git a/include/aare/InclusiveROI.hpp b/include/aare/InclusiveROI.hpp index 0cd0654f..39664612 100644 --- a/include/aare/InclusiveROI.hpp +++ b/include/aare/InclusiveROI.hpp @@ -48,7 +48,7 @@ inline ROI toHalfopenROI(InclusiveROI const &r) { } /*********************** - * Printint utility + * Printing utility ***********************/ inline std::ostream &operator<<(std::ostream &os, InclusiveROI const &roi) { os << "ROI (inclusive): x=[" << roi.xmin << ", " << roi.xmax << "], y=[" diff --git a/include/aare/RemapFormat.hpp b/include/aare/RemapFormat.hpp index fb3034c1..681af8db 100644 --- a/include/aare/RemapFormat.hpp +++ b/include/aare/RemapFormat.hpp @@ -3,9 +3,9 @@ #include "aare/RemapDefs.hpp" namespace aare::remap::format { -static inline std::string toString(defs::Rotation); -static inline std::string toString(defs::SensorPixelGeometry const &g); -static inline std::string toString(defs::GroupStrixelGeometry const &g); -static inline std::string toString(defs::GroupConfig const &c); +// static inline std::string to_string(defs::Rotation); +// static inline std::string to_string(defs::SensorPixelGeometry const &g); +static inline std::string to_string(defs::GroupStrixelGeometry const &g); +static inline std::string to_string(defs::GroupConfig const &c); inline std::ostream &operator<<(std::ostream &os, defs::GroupConfig const &c); } // namespace aare::remap::format \ No newline at end of file diff --git a/src/RemapAlgorithm.cpp b/src/RemapAlgorithm.cpp index 0cdb909e..09afee7c 100644 --- a/src/RemapAlgorithm.cpp +++ b/src/RemapAlgorithm.cpp @@ -102,20 +102,23 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config, // -- 1) Rebase the user ROI (rx_roi) into sensor-local coordinates const InclusiveROI roi_user_local = inclusiveroi::geom::rebaseROI(roi_user, placement.placement_on_module); - LOG(logDEBUG) + // LOG(logDEBUG) + std::cout << "aare::remap::algo::strixel_to_pixel_map: Transformed user ROI: " << roi_user_local << std::endl; - LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Group ROI " - "before transformation (as in global config)" - << group_config.placement_on_sensor << '\n'; + // LOG(logDEBUG) + std::cout << "aare::remap::algo::strixel_to_pixel_map: Group ROI " + "before transformation (as in global config)" + << group_config.placement_on_sensor << '\n'; // -- 2) Apply the physical bond shift first, sensor rotation second. const InclusiveROI roi_group = shift_rotate_roi(group_config.placement_on_sensor, pixel, bond_shift, placement.rotation); - LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Group ROI after " + // LOG(logDEBUG) + std::cout << "aare::remap::algo::strixel_to_pixel_map: Group ROI after " "transformation (as in local transformation) " << roi_group << '\n'; @@ -131,7 +134,8 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config, return {{}, InclusiveROI::emptyROI()}; } - LOG(logDEBUG) << "aare::remap::algo::strixel_to_pixel_map: Result of " + // LOG(logDEBUG) + std::cout << "aare::remap::algo::strixel_to_pixel_map: Result of " "intersecting ROIs " << effective_roi << '\n'; @@ -177,7 +181,7 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config, } if (min_row > max_row) { - return {{}, effective_roi}; // nothing mapped + return {{}, effective_roi}; // nothing mapped } // Now from the found bounds of the strixel grid, we define the space to @@ -188,7 +192,8 @@ strixel_to_pixel_map(defs::GroupConfig const &group_config, // And allocate aare::NDArray map({nrows, ncols}, -1); - LOG(logDEBUG) + // LOG(logDEBUG) + std::cout << "aare::remap::algo::strixel_to_pixel_map: Resulting strixel grid: (" << map.shape(0) << ", " << map.shape(1) << ")" << '\n'; diff --git a/src/RemapFormat.cpp b/src/RemapFormat.cpp index 49a40bf8..076a424a 100644 --- a/src/RemapFormat.cpp +++ b/src/RemapFormat.cpp @@ -3,23 +3,23 @@ #include namespace aare::remap::format { -static inline std::string toString(defs::Rotation r) { - return (r == defs::Rotation::Identity ? "Identity" : "Rotate180"); -} +// static inline std::string to_string(defs::Rotation r) { +// return (r == defs::Rotation::Identity ? "Identity" : "Rotate180"); +// } -static inline std::string toString(defs::SensorPixelGeometry const &g) { - std::ostringstream os; +// static inline std::string to_string(defs::SensorPixelGeometry const &g) { +// std::ostringstream os; - os << "SensorPixelGeometry\n" - << " cols x rows: " << g.num_pix_x << " x " << g.num_pix_y << "\n" - << " guardring :\n" - << " x = " << g.guardring.x << "\n" - << " y = " << g.guardring.y << "\n"; +// os << "SensorPixelGeometry\n" +// << " cols x rows: " << g.num_pix_x << " x " << g.num_pix_y << "\n" +// << " guardring :\n" +// << " x = " << g.guardring.x << "\n" +// << " y = " << g.guardring.y << "\n"; - return os.str(); -} +// return os.str(); +// } -static inline std::string toString(defs::GroupStrixelGeometry const &g) { +static inline std::string to_string(defs::GroupStrixelGeometry const &g) { std::ostringstream os; os << "GroupStrixelGeometry\n" @@ -29,11 +29,11 @@ static inline std::string toString(defs::GroupStrixelGeometry const &g) { return os.str(); } -static inline std::string toString(defs::GroupConfig const &c) { +static inline std::string to_string(defs::GroupConfig const &c) { std::ostringstream os; os << "GroupConfig\n" - << toString(c.strixel) << "\n" + << to_string(c.strixel) << "\n" << " placement on sensor:\n" << c.placement_on_sensor << "\n"; @@ -41,6 +41,6 @@ static inline std::string toString(defs::GroupConfig const &c) { } inline std::ostream &operator<<(std::ostream &os, defs::GroupConfig const &c) { - return os << toString(c); + return os << to_string(c); } } // namespace aare::remap::format \ No newline at end of file