Skip to content

Eliminate CI build warnings#1122

Open
olantwin wants to merge 1 commit intomasterfrom
fix/ci-build-warnings
Open

Eliminate CI build warnings#1122
olantwin wants to merge 1 commit intomasterfrom
fix/ci-build-warnings

Conversation

@olantwin
Copy link
Copy Markdown
Contributor

@olantwin olantwin commented Mar 24, 2026

Use ClassDefOverride instead of ClassDef for classes inheriting from TObject, fix Print() and Init() virtual hiding in field and generator classes, and remove unused FairShipFields LinkDef entry.

Checklist

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Resolved CI build warnings related to missing override specifiers and virtual method hiding issues.
    • Removed unused field configuration dictionary entry.
  • Chores

    • Updated internal code to align with modern C++ standards by replacing deprecated macro declarations with override-compatible variants.
    • Standardized method signatures across detector and field components.

wcmartylee
wcmartylee previously approved these changes Mar 24, 2026
Gfrisella
Gfrisella previously approved these changes Mar 24, 2026
@olantwin olantwin added this to the 26.04 milestone Mar 31, 2026
@olantwin olantwin dismissed stale reviews from Gfrisella and wcmartylee via b7654f8 April 2, 2026 09:07
@olantwin olantwin force-pushed the fix/ci-build-warnings branch from 641e046 to b7654f8 Compare April 2, 2026 09:07
@olantwin olantwin requested a review from kholoimov as a code owner April 2, 2026 09:07
@olantwin
Copy link
Copy Markdown
Contributor Author

olantwin commented Apr 7, 2026

@kholoimov @jasminwss @eduard322 @matclim Could you please review this as code owners of some of the affected code?

jasminwss
jasminwss previously approved these changes Apr 7, 2026
Copy link
Copy Markdown

@jasminwss jasminwss left a comment

Choose a reason for hiding this comment

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

I was not able to meaningfully review the remaining 2 files (LinkDef.h and Generator.h) as I am relatively new to this codebase, but nothing I reviewed raised any concerns

@olantwin
Copy link
Copy Markdown
Contributor Author

olantwin commented Apr 7, 2026

I was not able to meaningfully review the remaining 2 files (LinkDef.h and Generator.h) as I am relatively new to this codebase, but nothing I reviewed raised any concerns

Thanks @jasminwss !

@kholoimov
Copy link
Copy Markdown

I think it will be important to squash the commits before merging, as the first commit is breaking ShipFieldMaker.

The rest is fine for me

kholoimov
kholoimov previously approved these changes Apr 8, 2026
@olantwin olantwin disabled auto-merge April 8, 2026 15:42
matclim
matclim previously approved these changes Apr 8, 2026
@olantwin olantwin force-pushed the fix/ci-build-warnings branch from b7654f8 to 8258d7f Compare April 8, 2026 19:32
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f17a669-07ca-4e31-b69f-4ac82acd2907

📥 Commits

Reviewing files that changed from the base of the PR and between 1c6ffca and 259c6b1.

📒 Files selected for processing (36)
  • CHANGELOG.md
  • Detector/DetectorPoint.h
  • SND/EmulsionTarget/TTPoint.h
  • SND/EmulsionTarget/TargetPoint.h
  • SND/MTC/MTCDetHit.h
  • SND/MTC/MTCDetPoint.h
  • SND/SiliconTarget/SiliconTargetHit.h
  • SND/SiliconTarget/SiliconTargetPoint.h
  • TimeDet/TimeDetHit.h
  • UpstreamTagger/UpstreamTaggerHit.h
  • field/LinkDef.h
  • field/ShipBFieldMap.h
  • field/ShipBellField.cxx
  • field/ShipBellField.h
  • field/ShipCompField.h
  • field/ShipConstField.cxx
  • field/ShipConstField.h
  • field/ShipFieldCreator.h
  • field/ShipFieldPar.h
  • passive/ShipCave.h
  • passive/ShipGeoCave.h
  • passive/ShipMagnet.h
  • passive/ShipMuonShield.h
  • passive/ShipPassiveContFact.h
  • passive/ShipTAUMagneticSpectrometer.h
  • passive/ShipTargetStation.h
  • shipdata/ShipMCTrack.h
  • shipdata/ShipStack.h
  • shipgen/Generator.h
  • splitcal/splitcalContFact.h
  • splitcal/splitcalHit.h
  • strawtubes/strawtubesContFact.h
  • strawtubes/strawtubesHit.h
  • veto/vetoContFact.h
  • veto/vetoHit.h
  • veto/vetoHitOnTrack.h
💤 Files with no reviewable changes (1)
  • field/LinkDef.h
✅ Files skipped from review due to trivial changes (16)
  • splitcal/splitcalContFact.h
  • CHANGELOG.md
  • strawtubes/strawtubesContFact.h
  • SND/EmulsionTarget/TargetPoint.h
  • Detector/DetectorPoint.h
  • SND/SiliconTarget/SiliconTargetPoint.h
  • passive/ShipPassiveContFact.h
  • SND/EmulsionTarget/TTPoint.h
  • veto/vetoHitOnTrack.h
  • SND/SiliconTarget/SiliconTargetHit.h
  • strawtubes/strawtubesHit.h
  • field/ShipBFieldMap.h
  • passive/ShipCave.h
  • shipdata/ShipMCTrack.h
  • passive/ShipTargetStation.h
  • field/ShipFieldCreator.h
🚧 Files skipped from review as they are similar to previous changes (16)
  • field/ShipBellField.cxx
  • shipdata/ShipStack.h
  • UpstreamTagger/UpstreamTaggerHit.h
  • field/ShipConstField.cxx
  • veto/vetoContFact.h
  • splitcal/splitcalHit.h
  • passive/ShipMagnet.h
  • field/ShipCompField.h
  • passive/ShipTAUMagneticSpectrometer.h
  • SND/MTC/MTCDetPoint.h
  • shipgen/Generator.h
  • passive/ShipGeoCave.h
  • veto/vetoHit.h
  • field/ShipConstField.h
  • field/ShipBellField.h
  • TimeDet/TimeDetHit.h

📝 Walkthrough

Walkthrough

This pull request updates C++11 virtual method declarations across 50+ header files to use explicit override specifiers and replaces ROOT's ClassDef macros with ClassDefOverride variants throughout the codebase. Additionally, it corrects Print() method signatures to include Option_t* parameter and const qualification, removes an unused FairShipFields LinkDef entry, and adds a using declaration in Generator.h.

Changes

Cohort / File(s) Summary
ROOT Dictionary Macro Updates (ClassDef → ClassDefOverride)
Detector/DetectorPoint.h, SND/EmulsionTarget/TTPoint.h, SND/EmulsionTarget/TargetPoint.h, SND/MTC/MTCDetHit.h, SND/MTC/MTCDetPoint.h, SND/SiliconTarget/SiliconTargetHit.h, SND/SiliconTarget/SiliconTargetPoint.h, TimeDet/TimeDetHit.h, UpstreamTagger/UpstreamTaggerHit.h, field/ShipBFieldMap.h, field/ShipCompField.h, field/ShipFieldCreator.h, field/ShipFieldPar.h, passive/ShipCave.h, passive/ShipGeoCave.h, passive/ShipMagnet.h, passive/ShipMuonShield.h, passive/ShipPassiveContFact.h, passive/ShipTAUMagneticSpectrometer.h, passive/ShipTargetStation.h, shipdata/ShipMCTrack.h, splitcal/splitcalContFact.h, splitcal/splitcalHit.h, strawtubes/strawtubesContFact.h, strawtubes/strawtubesHit.h, veto/vetoContFact.h, veto/vetoHit.h, veto/vetoHitOnTrack.h
Updated ROOT dictionary macro from ClassDef(ClassName, version) to ClassDefOverride(ClassName, version) to enable override-aware reflection/streaming behavior.
Virtual to Override Conversions
field/ShipBellField.h, field/ShipConstField.h, passive/ShipMagnet.h, passive/ShipMuonShield.h, passive/ShipTAUMagneticSpectrometer.h, passive/ShipTargetStation.h, shipdata/ShipStack.h, SND/MTC/MTCDetPoint.h, field/ShipBFieldMap.h, field/ShipCompField.h, field/ShipFieldPar.h
Replaced virtual keyword with C++11 override specifier on method declarations (Field(), ConstructGeometry(), GetBx()/GetBy()/GetBz(), putParams(), getParams(), GetListOfParticles()).
Print Method Signature Updates
field/ShipBellField.h, field/ShipBellField.cxx, field/ShipConstField.h, field/ShipConstField.cxx
Updated Print() method signatures from virtual void Print() to void Print(Option_t* = "") const override, adding default parameter and const qualification.
Changelog and LinkDef Updates
CHANGELOG.md, field/LinkDef.h
Added unreleased changelog entry documenting CI build warning fixes; removed unused FairShipFields class from ROOT dictionary pragma link directive.
Generator.h Using Declaration
shipgen/Generator.h
Added using FairGenerator::Init; to public interface to re-export base class init overloads.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Eliminate CI build warnings' clearly and concisely summarizes the main objective of the pull request.
Description check ✅ Passed The description provides a clear summary of changes and includes all required checklist items completed, though minimal detail is provided.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-build-warnings

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
passive/ShipMuonShield.h (1)

28-28: ⚠️ Potential issue | 🟡 Minor

Missing override specifier on ConstructGeometry().

ShipMuonShield::ConstructGeometry() overrides a virtual method from FairModule but lacks the override specifier, inconsistent with the same method in ShipCave.h (line 17).

Proposed fix
-  void ConstructGeometry();
+  void ConstructGeometry() override;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@passive/ShipMuonShield.h` at line 28, The method declaration for
ShipMuonShield::ConstructGeometry() is missing the override specifier; update
the declaration in ShipMuonShield.h to mark ConstructGeometry() as overriding
the virtual method from FairModule (i.e., add the override keyword to the method
signature) so it matches the style used in ShipCave.h and ensures
compiler-checked overriding.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@splitcal/splitcalCluster.h`:
- Line 83: The macro used for ROOT dictionary generation is incorrect: replace
ClassDefOverride with ClassDef for the class splitcalCluster because it inherits
directly from TObject (which is not a ClassDef-instrumented subclass); locate
the declaration containing ClassDefOverride(splitcalCluster, 4) and change it to
ClassDef(splitcalCluster, 4) so the ROOT instrumentation matches the inheritance
(do not alter base class TObject or other macros).

---

Outside diff comments:
In `@passive/ShipMuonShield.h`:
- Line 28: The method declaration for ShipMuonShield::ConstructGeometry() is
missing the override specifier; update the declaration in ShipMuonShield.h to
mark ConstructGeometry() as overriding the virtual method from FairModule (i.e.,
add the override keyword to the method signature) so it matches the style used
in ShipCave.h and ensures compiler-checked overriding.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 42b6540d-38b4-4d54-bb86-1ba92a75fba8

📥 Commits

Reviewing files that changed from the base of the PR and between 50cf541 and 8258d7f.

📒 Files selected for processing (37)
  • CHANGELOG.md
  • Detector/DetectorPoint.h
  • SND/EmulsionTarget/TTPoint.h
  • SND/EmulsionTarget/TargetPoint.h
  • SND/MTC/MTCDetHit.h
  • SND/MTC/MTCDetPoint.h
  • SND/SiliconTarget/SiliconTargetHit.h
  • SND/SiliconTarget/SiliconTargetPoint.h
  • TimeDet/TimeDetHit.h
  • UpstreamTagger/UpstreamTaggerHit.h
  • field/LinkDef.h
  • field/ShipBFieldMap.h
  • field/ShipBellField.cxx
  • field/ShipBellField.h
  • field/ShipCompField.h
  • field/ShipConstField.cxx
  • field/ShipConstField.h
  • field/ShipFieldCreator.h
  • field/ShipFieldPar.h
  • passive/ShipCave.h
  • passive/ShipGeoCave.h
  • passive/ShipMagnet.h
  • passive/ShipMuonShield.h
  • passive/ShipPassiveContFact.h
  • passive/ShipTAUMagneticSpectrometer.h
  • passive/ShipTargetStation.h
  • shipdata/ShipMCTrack.h
  • shipdata/ShipStack.h
  • shipgen/Generator.h
  • splitcal/splitcalCluster.h
  • splitcal/splitcalContFact.h
  • splitcal/splitcalHit.h
  • strawtubes/strawtubesContFact.h
  • strawtubes/strawtubesHit.h
  • veto/vetoContFact.h
  • veto/vetoHit.h
  • veto/vetoHitOnTrack.h
💤 Files with no reviewable changes (1)
  • field/LinkDef.h

@olantwin olantwin dismissed stale reviews from matclim, kholoimov, and jasminwss via 1c6ffca April 9, 2026 07:15
@olantwin olantwin force-pushed the fix/ci-build-warnings branch from 8258d7f to 1c6ffca Compare April 9, 2026 07:15
Use override instead of virtual, ClassDefOverride instead of ClassDef
where appropriate, nullptr instead of 0, = default for trivial
constructors, and add missing includes.
@olantwin
Copy link
Copy Markdown
Contributor Author

olantwin commented Apr 9, 2026

@coderabbitai help

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

1 similar comment
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue comments.

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve merge conflict to automatically resolve merge conflicts.
  • @coderabbitai autofix to automatically fix issues identified in unresolved review comments.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@olantwin
Copy link
Copy Markdown
Contributor Author

olantwin commented Apr 9, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@olantwin olantwin enabled auto-merge April 9, 2026 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants