chore(shipgen): remove unused Pythia6Generator#1275
Conversation
Pythia6Generator was a parser for a custom Pythia6 text event-record format added by S. Spataro in 2008. It has zero callsites anywhere in the repository (no Python script, no C++ caller, no doc, no CI workflow). Recent history shows only cosmetic touches (clang-tidy, NULL→nullptr, copyright, formatting) — no substantive change since the original import. It is also a latent bug: like tPythia6Generator before #1272, it inherits abstract Init overloads from SHiP::Generator without overriding them, and its default constructor leaves raw FILE* / file name pointers indeterminate so the destructor crashes if anything ever default-constructs it. Remove the class rather than fix it. tPythia6Generator (used by macro/makeCascade.py and the --Pythia6 branch of run_simScript.py) is unaffected; the ROOTEGPythia6 dependency stays for its sake.
📝 WalkthroughWalkthroughThe PR removes the unused legacy ChangesRemove legacy Pythia6Generator
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
CI Plots |
|
@coderabbitai review |
✅ Action performedReview finished.
|











































































































































Summary
Pythia6Generator(not) has zero callsites: no Python script constructs it, no C++ caller exists, no docs / README / CHANGELOG reference it, no CI workflow exercises it. Its.cxxand.hhave only seen cosmetic refactors since the 2008 import.Initoverloads fromSHiP::Generatorwithout overriding them, and its default constructor leaves rawFILE*/Char_t*pointers indeterminate, crashing the destructor on default-construction.tPythia6Generatoris unaffected (it is actively used bymacro/makeCascade.pyandrun_simScript.py --Pythia6). TheROOTEGPythia6dependency stays fortPythia6Generator.Test plan
pixi run buildsucceeds with no unresolved referenceshasattr(ROOT, 'Pythia6Generator')returnsFalseafter loadinglibShipGentPythia6Generatorsource file is untouched (git diff master -- shipgen/tPythia6Generator.*is empty); independent of this PR, it still has the tpythia6Generator error in makeCascade.py #1272 abstract-class bug that fix(shipgen): make tPythia6Generator concrete again (#1272) #1274 fixesIndependent of #1274 — neither PR blocks the other.
Summary by CodeRabbit