Skip to content

Conversation

@olantwin
Copy link
Contributor

@olantwin olantwin commented Dec 2, 2025

No description provided.

@olantwin olantwin force-pushed the fix/compilation-warnings branch 2 times, most recently from b6baaf1 to d68ff4e Compare December 2, 2025 10:40
@olantwin olantwin force-pushed the fix/compilation-warnings branch from d68ff4e to 9961667 Compare December 2, 2025 10:59
@olantwin olantwin requested a review from wcmartylee December 2, 2025 11:00
- Initialise uninitialised variables in GenieGenerator (pout, x, y, z)
- Initialise uninitialised variables in MuonBackGenerator (mass, e, tof, phi)
- Replace undefined pointer comparison with TString::IsNull() in FixedTargetGenerator
- Correct member initialisation order in veto and Tracklet constructors to match declaration order
- Remove unused return value in TimeDetHit::GetNode()
- Remove unused variables in MTCDetector (hit, N, mat_number, t1)
- Remove unused material pointers in strawtubes (air, Se, Al)
- Remove unused variables in splitcalHit (pointZ, boxPassive)
- Remove unused variables in generator files (max_nr, buffer, t, top, phi, ns, hadDecay, fsrPtrIn, destParticle)
- Remove unused i_nlayECAL_gas variable and all its assignments in splitcal
- Remove unused bparam assignment in GenieGenerator (keep function call)
- Remove unused old decay vertex variables (td, xd, yd, zd) in HNLPythia8Generator
- Fix signed/unsigned comparison in GenieGenerator loop (use size_t)
- Fix signed/unsigned comparison in TEvtGenDecayer (add static_cast)
Add using declarations to bring base class Print methods into scope for all detector Hit and Point classes. This prevents the derived class Print() methods from hiding the base class Print(Option_t*) methods.

Affected classes:
- ShipHit-derived: TimeDetHit, MTCDetHit, SiliconTargetHit, vetoHit, splitcalHit, UpstreamTaggerHit, strawtubesHit
- FairMCPoint-derived: TimeDetPoint, MTCDetPoint, SiliconTargetPoint, vetoPoint, splitcalPoint, UpstreamTaggerPoint, strawtubesPoint
- TObject-derived: ShipMCTrack
The TGeoBBox and TGeoTubeSeg objects in ShipMagnet::MagnetSupport() are registered by name in ROOT's geometry manager and referenced in the boolean expression for TGeoCompositeShape. While they appear unused to the compiler, they are accessed by ROOT via their registered names.
Annotate all remaining TGeo objects that are registered by name and used in composite shape boolean expressions:
- magyoke1, magyoke2 (used in three different design variants)
- magnet1a, magnet1b, magnet1c, magnet1d
- C1, C2, Box1, Box2 (coil shapes)
- my1, my2, CTop, CBot (yoke and coil shapes for design 4)
- ShipTargetStation: enclosure_outer_tube and enclosure_cutout_box (used in composite shape)
- ShipMagnet: myc composite shape (used by name in CTop1, CTop2, CBot1, CBot2 shapes)
Annotate proximity_shielding_envelope, proximity_shielding_inner, and
proximity_shielding_hole which are used by name in the composite shape
boolean expression at lines 238-240.
@olantwin olantwin force-pushed the fix/compilation-warnings branch from 6495294 to 56845ec Compare December 2, 2025 13:33
- Add [[maybe_unused]] to 'abs' in ShipMuonShield.cxx which is used
  by name in the composite shape at line 487
- Initialise 'material' pointer to nullptr in ShipTargetStation.cxx
  and change second if to else if for clarity
- Add [[maybe_unused]] to detbox1/detbox2 in strawtubes.cxx (used in
  composite shape at line 318)
- Add [[maybe_unused]] to histogram pointers in exitHadronAbsorber.cxx
  (registered in ROOT's gDirectory)
- Initialise xmu, ymu, zmu to 0 in MuDISGenerator.cxx to prevent
  maybe-uninitialized warnings
@olantwin olantwin requested a review from Gfrisella as a code owner December 2, 2025 14:44
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.

3 participants