-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[v628][RF] Backports of RooFit PRs to v6-28-00-patches: Part 6
#12083
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
Merged
guitargeek
merged 4 commits into
root-project:v6-28-00-patches
from
guitargeek:v6-28-00-patches_roofit_backports_6
Jan 22, 2023
Merged
[v628][RF] Backports of RooFit PRs to v6-28-00-patches: Part 6
#12083
guitargeek
merged 4 commits into
root-project:v6-28-00-patches
from
guitargeek:v6-28-00-patches_roofit_backports_6
Jan 22, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds public methods to allow access and modification of the underlying factors of RooProdPdf and RooProduct.
This fixes a memory leak related to the usage of `TRef` in `TFoamCell`
that can be reproduced with the following code:
```C++
class MyTFoamBinding : public TFoamIntegrand {
public:
double Density(Int_t ndim, double *) override { return 1.0; }
};
void reproTFoam()
{
ProcInfo_t procinfo;
const float toMB = 1.f / 1024.f;
std::size_t nToys = 5000;
TRandom3 rand{};
for (std::size_t index_toy = 1; index_toy <= nToys; index_toy++) {
if (index_toy % 500 == 0) {
gSystem->GetProcInfo(&procinfo);
std::cout << index_toy << ": " << procinfo.fMemResident * toMB
<< " " << procinfo.fMemVirtual * toMB << std::endl;
}
MyTFoamBinding binding{};
TFoam tfoam{"TFOAM"};
tfoam.SetkDim(1);
tfoam.SetRho(&binding);
tfoam.SetPseRan(&rand);
tfoam.SetnCells(30);
tfoam.SetnSampl(200);
tfoam.SetPseRan(&rand);
tfoam.SetChat(0);
tfoam.Initialize();
}
}
```
Before this commit, you will see a steady memory increase that is gone
after this commit.
This fixes the fundamental memory increase in RooFit toy studies,
reported for example in root-project#8984.
The docs said explicitly to not use the copy constructor and the copy assignment, so these operators should be deleted, as well as moving.
Handle case where p0 or p1 are null -> ensure not null by time expectProxyIs is called.
|
Starting build on |
|
Build failed on windows10/cxx14. Errors:
|
52 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a backport of all the relevant RooFit PRs that were recently merged to master to v6-28-00-patches (in the right order, to not have the commit history diverge too much).
TFoamCell#12061Only the first commit that is not a fixup to a recent typo is
masterRelated to #11856.