Page MenuHomeHEPForge

Review `TestDecayModel::getValue` function in testing framework
Open, Needs TriagePublic

Description

The TestDecayModel::getValue function in the testing framework has become extremely long. This raises concerns for long term maintenance etc.

We should review it and see if can be refactored to make it easier to read and maintain.

Should also review the variable names to see if any can be improved. It would make sense to document them as well to aid people writing new tests for new decay models.

Event Timeline

tlatham created this object with visibility "Public (No Login Required)".
tlatham created this object with edit policy "Restricted Project (Project)".

I'm wondering whether it would make sense to define enum for individual variables to use instead of strings for names. Then we could split this huge function to set of functions (in namespace or class) for single variable. The generic getValue function could then have array of pointers to functions (or switch-case) to call right one based on the variable name.