Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Friendly coding suggestions: #4

Open
1 of 6 tasks
c-dilks opened this issue Aug 4, 2022 · 0 comments
Open
1 of 6 tasks

Friendly coding suggestions: #4

c-dilks opened this issue Aug 4, 2022 · 0 comments

Comments

@c-dilks
Copy link
Member

c-dilks commented Aug 4, 2022

Opened by @whit2333 at https://eicweb.phy.anl.gov/EIC/irt/-/issues/5


Here are some comments I have to make while briefly going through the code.

  • ROOT's TObject is not really needed anymore.
  • Avoid using ROOT specific-stuff unless it is really needed. Example from my experience, TRef is usually more of a headache than helpful.
  • From my other issue about using #include quotes : https://stackoverflow.com/a/3162067/13377601
  • Avoid unnecessary inheritance. Example: TObject -> TransientParticle -> {ChargedParticle, OpticalPhoton}. I do not see any polymorphism in the interface so there is no need for inheritance at all here.
  • The code is hard to read with all the pre-processor defines and logic.
  • The IRT::Solve member function should (ideally) be const.
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

No branches or pull requests

1 participant