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

Enum instead of string and C++14 support #76

Merged
merged 9 commits into from
Jul 19, 2024
Merged

Conversation

KSkwarczynski
Copy link
Member

@KSkwarczynski KSkwarczynski commented Jul 15, 2024

Pull request description:

Instead of doing string comaprison whether param is spline or norm let's use enum, param types always have to be defined by MaCh3 core, I can't imagine expeirent sepcyfic types, in future types might be expadnaed, using enums helps to mainaint good code.

Also not use python like structure binding, as this causes problem in c++14. Given still many poep have root with c++14 and this was easy change I did this. MaCh3 natively should use c++14 but if we can easily mianaint c++14 then why not.

This was the issue
image

Setting XsecNorm4 was a mess. First we filled variables like modes, only later to save it to XsecNomr4. Now rather than have many artifialc variabels we store only XsecNorm4. This means that potetnail expansion to XsecNorms5 will be easier as everythig is handled GetXsecNorm rather than many bits in different places.
image
left old, right new
image

…Enum, in addition don't use python liek structure binding as this isn't c++14 compliant. Given this was only place which c++14 doesn't like it is better to use something simpler.
@KSkwarczynski KSkwarczynski self-assigned this Jul 15, 2024
…ariables whihc are part of class (this is waste) now we fill xsec norm direclty from yaml. This should make mainanace and code clarity much better. I am thinking to make similiar stucture for splines in the near future.
… more mainainteable, but also is better memroy wise
@KSkwarczynski KSkwarczynski merged commit 1b49e17 into develop Jul 19, 2024
3 checks passed
@KSkwarczynski KSkwarczynski deleted the feature_Enumcpp14 branch July 19, 2024 18:16
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.

None yet

1 participant