Skip to content

Friendly coding suggestions: #4

@c-dilks

Description

@c-dilks

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions