Skip to content

Conversation

henryiii
Copy link
Member

@henryiii henryiii commented Nov 2, 2017

This PR converts all1 Variables to pass by copy. All lifetime, etc. is handled inside the Variable, taking the burden off the programmer. This also makes DecayInfo... passable by value, and splits it into four versions, DecayInfo3, DecayInfo3t, DecayInfo4, and DecayInfo4t.

The largest downside is that now there is no such thing as a "null" variable; this was poorly handled before, and required extra checks for nullptr. I think this is less buggy than before.

Several bugfixes included.

GooPdf now allows multiple observables in the default constructor.

Footnotes

  1. One or two left as pointers, like in Tddp4, just to avoid duplicating the constructor initially. Should be converted eventually.

@codecov
Copy link

codecov bot commented Nov 3, 2017

Codecov Report

Merging #124 into py_dev_hsp will decrease coverage by 0.6%.
The diff coverage is 63.04%.

Impacted file tree graph

@@              Coverage Diff               @@
##           py_dev_hsp     #124      +/-   ##
==============================================
- Coverage       69.18%   68.58%   -0.61%     
==============================================
  Files              34       34              
  Lines            1233     1254      +21     
  Branches          164      162       -2     
==============================================
+ Hits              853      860       +7     
- Misses            380      394      +14
Impacted Files Coverage Δ
include/goofit/UnbinnedDataSet.h 100% <ø> (ø) ⬆️
include/goofit/fitting/Params.h 100% <ø> (ø) ⬆️
include/goofit/DataSet.h 100% <ø> (ø) ⬆️
include/goofit/PDFs/basic/ExpPdf.h 100% <ø> (ø) ⬆️
include/goofit/fitting/FitManagerMinuit2.h 100% <ø> (ø) ⬆️
include/goofit/PDFs/basic/GaussianPdf.h 100% <ø> (ø) ⬆️
include/goofit/GlobalCudaDefines.h 100% <ø> (ø) ⬆️
include/goofit/BinnedDataSet.h 100% <ø> (ø) ⬆️
src/goofit/Abort.cc 4.76% <0%> (ø) ⬆️
include/goofit/fitting/FitManagerMinuit1.h 100% <100%> (ø) ⬆️
... and 18 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 423e18e...46aa708. Read the comment docs.

@henryiii henryiii merged commit a001cbb into py_dev_hsp Nov 4, 2017
@henryiii henryiii deleted the cleanvar branch November 17, 2017 15:06
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.

1 participant