Skip to content

Commit 167c0cc

Browse files
committed
[RF] Propagate implicit object registration settings to RooPlot.
1 parent c462d3d commit 167c0cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

roofit/roofitcore/src/RooPlot.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ object onto a one-dimensional plot.
5656
#include "TH1D.h"
5757
#include "TBrowser.h"
5858
#include "TVirtualPad.h"
59+
#include "TROOT.h"
5960

6061
#include "TAttLine.h"
6162
#include "TAttFill.h"
@@ -73,7 +74,7 @@ object onto a one-dimensional plot.
7374

7475
bool RooPlot::_addDirStatus = true ;
7576

76-
bool RooPlot::addDirectoryStatus() { return _addDirStatus; }
77+
bool RooPlot::addDirectoryStatus() { return ROOT::Experimental::IsImplicitObjectOwnershipEnabled() && _addDirStatus; }
7778
bool RooPlot::setAddDirectoryStatus(bool flag) { bool ret = flag ; _addDirStatus = flag ; return ret ; }
7879

7980

0 commit comments

Comments
 (0)