Skip to content

refactor(lib): Remove ISF namespace remnants and modernize namespace usage - #108

Merged
jbeirer merged 2 commits into
mainfrom
main-renameNamespace
Jul 9, 2026
Merged

refactor(lib): Remove ISF namespace remnants and modernize namespace usage#108
jbeirer merged 2 commits into
mainfrom
main-renameNamespace

Conversation

@jbeirer

@jbeirer jbeirer commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR removes the remaining ISF-era identifiers now that FastCaloSim is being integrated into Athena as the replacement for the legacy ISF FastCaloSim implementation.

Changes

  • Rename ISF_FCS::MLogging to FastCaloSim::MLogging
  • Move the FCS_MSG enum into the FastCaloSim::MSG namespace
    • The FCS_MSG_* macros are intentionally kept, as macros cannot be namespaced and bare MSG::* names would conflict with Gaudi's MSG namespace inside Athena.
  • Replace all legacy ISF_* include guards with #pragma once, matching the style already used in the newer Geometry, Definitions, and test code.
  • Remove the unused ISF_FastCaloSimEventDict.h header and outdated ISF-related comments.

Backward Compatibility

Existing parametrization files embed ISF_FCS::MLogging in their ROOT streamer information (standalone v0 entry and the base-class elements of TFCSFunction and TFCSParametrizationBase). To preserve compatibility with these files, this PR includes:

  • Registration of
    ROOT::AddClassAlternate("FastCaloSim::MLogging", "ISF_FCS::MLogging")
    during library initialization in MLogging.cxx (this is not generated automatically by rootcling).
  • A LinkDef read rule mapping ISF_FCS::MLogging to FastCaloSim::MLogging.
  • ClassDef version bumps for all persistent classes directly inheriting from MLogging, since the base-class name contributes to the ROOT class checksum.

Closes #81

@github-actions github-actions Bot added the tests Issues affecting the CI tests label Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jbeirer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9d99801c-a65d-4119-abdc-ac6f536e31bb

📥 Commits

Reviewing files that changed from the base of the PR and between 71e5a1a and aab06a4.

📒 Files selected for processing (1)
  • include/FastCaloSim/LinkDef.h
📝 Walkthrough

Walkthrough

This PR converts nearly all headers in the codebase from traditional #ifndef/#define/#endif include guards to #pragma once, and migrates the MLogging class and MSG::Level enum from the ISF_FCS namespace into FastCaloSim. Dependent classes update their base class references and ROOT ClassDef versions, LinkDef.h adds a backward-compatible streamer read rule, and all FCS_MSG/ISF_FCS::MLogging usages in source and test files are updated to FastCaloSim::MSG/FastCaloSim::MLogging. One dictionary stub header is removed and minor include-order/comment cleanups are included.

Changes

Header guards and MLogging namespace migration

Layer / File(s) Summary
MLogging core and LinkDef migration
include/FastCaloSim/Core/MLogging.h, source/Core/MLogging.cxx, include/FastCaloSim/LinkDef.h
MSG::Level enum and MLogging class move from ISF_FCS to FastCaloSim namespace; method signatures updated to MSG::Level; ROOT dictionary link and backward-compatible streamer read rule added.
Dependent class base updates
TFCSExtrapolationState.h, TFCSFunction.h, TFCSGANEtaSlice.h, TFCSGANXMLParameters.h, TFCSMLCalorimeterSimulator.h, TFCSParametrizationBase.h, TFCSSimulationState.h, TFCSTruthState.h, VNetworkBase.h, FastCaloSimCaloExtrapolation.h
Base classes switch from ISF_FCS::MLogging to FastCaloSim::MLogging, and ClassDef versions are incremented accordingly.
FCS_MSG call-site updates
source/Core/*.cxx, test/TestConfig/*.h, test/include/BasicExtrapolTests.h, test/source/*.cxx
All msgLvl, PropagateMSGLevel, setLevel, and logger declarations updated from FCS_MSG/ISF_FCS::MLogging to FastCaloSim::MSG/FastCaloSim::MLogging.
Header include-guard conversion
include/FastCaloSim/**/*.h, param/include/FastCaloSimParam/FCS_Cell.h
Traditional #ifndef/#define/#endif include guards replaced with #pragma once across the majority of headers, with no functional changes; one dictionary stub header removed and minor include reordering/comment cleanup applied.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • fcs-proj/FastCaloSim#97: Both PRs modify the MLogging integration with ROOT/dictionary via MLogging.h and LinkDef.h.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removing ISF namespace remnants and updating namespace usage across the library.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main-renameNamespace

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jbeirer jbeirer changed the title refactor(lib): Remove ISF namespace remnants and modernize namespace … refactor(lib): Remove ISF namespace remnants and modernize namespace usage Jul 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@include/FastCaloSim/LinkDef.h`:
- Around line 590-594: The ROOT rename rule for MLogging is incomplete because
`#pragma` read with only sourceClass and targetClass will not trigger schema
evolution; update the rule in LinkDef.h to include either a version or checksum
selector so the old ISF_FCS::MLogging streamer info is actually mapped to
FastCaloSim::MLogging. Keep ROOT::AddClassAlternate in MLogging.cxx as a
separate alias, but ensure this I/O rule explicitly matches the legacy schema
using the existing class names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 04d39456-93c1-4ade-bcb9-ae6ee5a256e0

📥 Commits

Reviewing files that changed from the base of the PR and between c3f4976 and 71e5a1a.

📒 Files selected for processing (121)
  • include/FastCaloSim/Core/DoubleArray.h
  • include/FastCaloSim/Core/ISF_FastCaloSimEventDict.h
  • include/FastCaloSim/Core/IntArray.h
  • include/FastCaloSim/Core/MLogging.h
  • include/FastCaloSim/Core/TFCS1DFunction.h
  • include/FastCaloSim/Core/TFCS1DFunctionHistogram.h
  • include/FastCaloSim/Core/TFCS1DFunctionInt16Histogram.h
  • include/FastCaloSim/Core/TFCS1DFunctionInt32Histogram.h
  • include/FastCaloSim/Core/TFCS1DFunctionRegression.h
  • include/FastCaloSim/Core/TFCS1DFunctionRegressionTF.h
  • include/FastCaloSim/Core/TFCS1DFunctionSpline.h
  • include/FastCaloSim/Core/TFCS1DFunctionTemplateHelpers.h
  • include/FastCaloSim/Core/TFCS1DFunctionTemplateHistogram.h
  • include/FastCaloSim/Core/TFCS1DFunctionTemplateInterpolationHistogram.h
  • include/FastCaloSim/Core/TFCS2DFunction.h
  • include/FastCaloSim/Core/TFCS2DFunctionHistogram.h
  • include/FastCaloSim/Core/TFCS2DFunctionLateralShapeParametrization.h
  • include/FastCaloSim/Core/TFCS2DFunctionTemplateHistogram.h
  • include/FastCaloSim/Core/TFCS2DFunctionTemplateInterpolationExpHistogram.h
  • include/FastCaloSim/Core/TFCS2DFunctionTemplateInterpolationHistogram.h
  • include/FastCaloSim/Core/TFCSBinnedShower.h
  • include/FastCaloSim/Core/TFCSBinnedShowerBase.h
  • include/FastCaloSim/Core/TFCSBinnedShowerONNX.h
  • include/FastCaloSim/Core/TFCSCenterPositionCalculation.h
  • include/FastCaloSim/Core/TFCSEnergyAndHitGANV2.h
  • include/FastCaloSim/Core/TFCSEnergyBinParametrization.h
  • include/FastCaloSim/Core/TFCSEnergyInterpolationHistogram.h
  • include/FastCaloSim/Core/TFCSEnergyInterpolationLinear.h
  • include/FastCaloSim/Core/TFCSEnergyInterpolationPiecewiseLinear.h
  • include/FastCaloSim/Core/TFCSEnergyInterpolationSpline.h
  • include/FastCaloSim/Core/TFCSEnergyParametrization.h
  • include/FastCaloSim/Core/TFCSEnergyRenormalization.h
  • include/FastCaloSim/Core/TFCSExtrapolationState.h
  • include/FastCaloSim/Core/TFCSFlatLateralShapeParametrization.h
  • include/FastCaloSim/Core/TFCSFunction.h
  • include/FastCaloSim/Core/TFCSGANEtaSlice.h
  • include/FastCaloSim/Core/TFCSGANLWTNNHandler.h
  • include/FastCaloSim/Core/TFCSGANXMLParameters.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeGausLogWeight.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeGausLogWeightHitAndMiss.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeParametrization.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeParametrizationFCal.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeWeight.h
  • include/FastCaloSim/Core/TFCSHistoLateralShapeWeightHitAndMiss.h
  • include/FastCaloSim/Core/TFCSHitCellMapping.h
  • include/FastCaloSim/Core/TFCSHitCellMappingFCal.h
  • include/FastCaloSim/Core/TFCSHitCellMappingWiggle.h
  • include/FastCaloSim/Core/TFCSHitCellMappingWiggleEMB.h
  • include/FastCaloSim/Core/TFCSInitWithEkin.h
  • include/FastCaloSim/Core/TFCSInvisibleParametrization.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrization.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrizationFixedHitChain.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrizationFluctChain.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrizationHitBase.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrizationHitChain.h
  • include/FastCaloSim/Core/TFCSLateralShapeParametrizationHitNumberFromE.h
  • include/FastCaloSim/Core/TFCSLateralShapeTuning.h
  • include/FastCaloSim/Core/TFCSMLCalorimeterSimulator.h
  • include/FastCaloSim/Core/TFCSNetworkFactory.h
  • include/FastCaloSim/Core/TFCSONNXHandler.h
  • include/FastCaloSim/Core/TFCSPCAEnergyParametrization.h
  • include/FastCaloSim/Core/TFCSParametrization.h
  • include/FastCaloSim/Core/TFCSParametrizationAbsEtaSelectChain.h
  • include/FastCaloSim/Core/TFCSParametrizationBase.h
  • include/FastCaloSim/Core/TFCSParametrizationBinnedChain.h
  • include/FastCaloSim/Core/TFCSParametrizationChain.h
  • include/FastCaloSim/Core/TFCSParametrizationEbinChain.h
  • include/FastCaloSim/Core/TFCSParametrizationEkinSelectChain.h
  • include/FastCaloSim/Core/TFCSParametrizationEtaSelectChain.h
  • include/FastCaloSim/Core/TFCSParametrizationFloatSelectChain.h
  • include/FastCaloSim/Core/TFCSParametrizationPDGIDSelectChain.h
  • include/FastCaloSim/Core/TFCSParametrizationPlaceholder.h
  • include/FastCaloSim/Core/TFCSPhiModulationCorrection.h
  • include/FastCaloSim/Core/TFCSPredictExtrapWeights.h
  • include/FastCaloSim/Core/TFCSSimpleLWTNNHandler.h
  • include/FastCaloSim/Core/TFCSSimulationState.h
  • include/FastCaloSim/Core/TFCSTruthState.h
  • include/FastCaloSim/Core/TFCSVoxelHistoLateralCovarianceFluctuations.h
  • include/FastCaloSim/Core/VNetworkBase.h
  • include/FastCaloSim/Core/VNetworkLWTNN.h
  • include/FastCaloSim/Extrapolation/FastCaloSimCaloExtrapolation.h
  • include/FastCaloSim/Geometry/MeanAndRMS.h
  • include/FastCaloSim/LinkDef.h
  • include/FastCaloSim/Transport/G4CaloTransportTool.h
  • param/include/FastCaloSimParam/FCS_Cell.h
  • source/Core/MLogging.cxx
  • source/Core/TFCS1DFunction.cxx
  • source/Core/TFCS2DFunction.cxx
  • source/Core/TFCS2DFunctionLateralShapeParametrization.cxx
  • source/Core/TFCSCenterPositionCalculation.cxx
  • source/Core/TFCSEnergyAndHitGANV2.cxx
  • source/Core/TFCSEnergyBinParametrization.cxx
  • source/Core/TFCSEnergyInterpolationHistogram.cxx
  • source/Core/TFCSEnergyInterpolationLinear.cxx
  • source/Core/TFCSEnergyInterpolationPiecewiseLinear.cxx
  • source/Core/TFCSEnergyInterpolationSpline.cxx
  • source/Core/TFCSEnergyRenormalization.cxx
  • source/Core/TFCSFlatLateralShapeParametrization.cxx
  • source/Core/TFCSHistoLateralShapeParametrization.cxx
  • source/Core/TFCSHistoLateralShapeWeight.cxx
  • source/Core/TFCSHitCellMapping.cxx
  • source/Core/TFCSHitCellMappingWiggle.cxx
  • source/Core/TFCSLateralShapeParametrization.cxx
  • source/Core/TFCSLateralShapeParametrizationFluctChain.cxx
  • source/Core/TFCSLateralShapeParametrizationHitChain.cxx
  • source/Core/TFCSLateralShapeParametrizationHitNumberFromE.cxx
  • source/Core/TFCSNetworkFactory.cxx
  • source/Core/TFCSPCAEnergyParametrization.cxx
  • source/Core/TFCSParametrizationBase.cxx
  • source/Core/TFCSParametrizationBinnedChain.cxx
  • source/Core/TFCSParametrizationChain.cxx
  • source/Core/TFCSPredictExtrapWeights.cxx
  • source/Core/TFCSVoxelHistoLateralCovarianceFluctuations.cxx
  • source/Extrapolation/FastCaloSimCaloExtrapolation.cxx
  • test/TestConfig/AtlasSimTestsConfig.h
  • test/TestConfig/AtlasTransportTestsConfig.h
  • test/TestPlugins/ATLAS/ATLASMagneticFieldMapPlugin/src/AtlasFieldSvc.cxx
  • test/TestPlugins/ATLAS/ATLASMagneticFieldMapPlugin/src/H8FieldSvc.cxx
  • test/include/BasicExtrapolTests.h
  • test/source/AtlasSimTests.cxx
  • test/source/BasicSimTests.cxx
💤 Files with no reviewable changes (2)
  • include/FastCaloSim/Core/ISF_FastCaloSimEventDict.h
  • test/TestPlugins/ATLAS/ATLASMagneticFieldMapPlugin/src/H8FieldSvc.cxx

Comment thread include/FastCaloSim/LinkDef.h Outdated
@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 75 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
source/Core/TFCSNetworkFactory.cxx 0.00% 7 Missing ⚠️
...re/TFCSVoxelHistoLateralCovarianceFluctuations.cxx 0.00% 6 Missing ⚠️
source/Core/MLogging.cxx 58.33% 5 Missing ⚠️
...Core/TFCSLateralShapeParametrizationFluctChain.cxx 0.00% 5 Missing ⚠️
...e/Core/TFCSLateralShapeParametrizationHitChain.cxx 50.00% 3 Missing ⚠️
...Core/TFCS2DFunctionLateralShapeParametrization.cxx 0.00% 2 Missing ⚠️
source/Core/TFCSCenterPositionCalculation.cxx 0.00% 2 Missing ⚠️
source/Core/TFCSEnergyAndHitGANV2.cxx 0.00% 2 Missing ⚠️
source/Core/TFCSEnergyBinParametrization.cxx 0.00% 2 Missing ⚠️
source/Core/TFCSEnergyInterpolationHistogram.cxx 0.00% 2 Missing ⚠️
... and 25 more
Files with missing lines Coverage Δ
include/FastCaloSim/Core/DoubleArray.h 0.00% <ø> (ø)
include/FastCaloSim/Core/IntArray.h 0.00% <ø> (ø)
include/FastCaloSim/Core/MLogging.h 75.00% <100.00%> (ø)
include/FastCaloSim/Core/TFCS1DFunction.h 16.66% <ø> (ø)
include/FastCaloSim/Core/TFCS1DFunctionHistogram.h 100.00% <ø> (ø)
...de/FastCaloSim/Core/TFCS1DFunctionInt16Histogram.h 0.00% <ø> (ø)
...de/FastCaloSim/Core/TFCS1DFunctionInt32Histogram.h 57.14% <ø> (ø)
...nclude/FastCaloSim/Core/TFCS1DFunctionRegression.h 0.00% <ø> (ø)
...lude/FastCaloSim/Core/TFCS1DFunctionRegressionTF.h 0.00% <ø> (ø)
include/FastCaloSim/Core/TFCS1DFunctionSpline.h 0.00% <ø> (ø)
... and 106 more

@jbeirer
jbeirer merged commit 01f8bf7 into main Jul 9, 2026
5 of 6 checks passed
@jbeirer
jbeirer deleted the main-renameNamespace branch July 9, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Issues affecting the CI tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant