Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,12 @@ def createHistogram(self, *args, **kwargs):
r"""The RooAbsData::createHistogram() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsData.createHistogram` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createHistogram(*args, **kwargs)
out = self._createHistogram(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooAbsData *RooAbsData::reduce(const RooCmdArg& arg1,const RooCmdArg& arg2={},"
Expand All @@ -70,9 +73,12 @@ def reduce(self, *args, **kwargs):
r"""The RooAbsData::reduce() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsData.reduce` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._reduce(*args, **kwargs)
out = self._reduce(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooPlot *RooAbsData::statOn(RooPlot* frame,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ def fitTo(self, *args, **kwargs):
r"""The RooAbsPdf::fitTo() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsPdf.fitTo` for keyword arguments.
return self._fitTo["RooLinkedList const&"](args[0], _pack_cmd_args(*args[1:], **kwargs))
import ROOT

out = self._fitTo["RooLinkedList const&"](args[0], _pack_cmd_args(*args[1:], **kwargs))
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooPlot *RooAbsPdf::plotOn(RooPlot* frame,"
Expand Down Expand Up @@ -120,8 +123,11 @@ def createNLL(self, *args, **kwargs):
r"""The RooAbsPdf::createNLL() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsPdf.createNLL` for keyword arguments.
return self._createNLL["RooLinkedList const&"](args[0], _pack_cmd_args(*args[1:], **kwargs))
import ROOT

out = self._createNLL["RooLinkedList const&"](args[0], _pack_cmd_args(*args[1:], **kwargs))
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooAbsReal *RooAbsPdf::createCdf(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2={},"
Expand All @@ -133,9 +139,12 @@ def createCdf(self, *args, **kwargs):
r"""The RooAbsPdf::createCdf() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsPdf.createCdf` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createCdf(*args, **kwargs)
out = self._createCdf(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooDataHist *RooAbsPdf::generateBinned(const RooArgSet &whatVars,"
Expand All @@ -147,9 +156,12 @@ def generateBinned(self, *args, **kwargs):
r"""The RooAbsPdf::generateBinned() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsPdf.generateBinned` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._generateBinned(*args, **kwargs)
out = self._generateBinned(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"GenSpec *RooAbsPdf::prepareMultiGen(const RooArgSet &whatVars,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ def createHistogram(self, *args, **kwargs):
r"""The RooAbsReal::createHistogram() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsReal.createHistogram` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createHistogram(*args, **kwargs)
out = self._createHistogram(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooAbsReal* RooAbsReal::createIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2={},"
Expand All @@ -72,9 +75,12 @@ def createIntegral(self, *args, **kwargs):
r"""The RooAbsReal::createIntegral() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsReal.createIntegral` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createIntegral(*args, **kwargs)
out = self._createIntegral(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooAbsReal* RooAbsReal::createRunningIntegral(const RooArgSet& iset, const RooCmdArg& arg1, const RooCmdArg& arg2={},"
Expand All @@ -86,9 +92,12 @@ def createRunningIntegral(self, *args, **kwargs):
r"""The RooAbsReal::createRunningIntegral() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsReal.createRunningIntegral` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createRunningIntegral(*args, **kwargs)
out = self._createRunningIntegral(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooAbsReal* RooAbsReal::createChi2(RooDataHist& data, const RooCmdArg& arg1={}, const RooCmdArg& arg2={},"
Expand All @@ -99,9 +108,12 @@ def createChi2(self, *args, **kwargs):
r"""The RooAbsReal::createChi2() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsReal.createChi2` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createChi2(*args, **kwargs)
out = self._createChi2(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooFitResult *RooAbsReal::chi2FitTo(RooDataSet& xydata, const RooCmdArg& arg1={}, const RooCmdArg& arg2={},"
Expand All @@ -112,9 +124,12 @@ def chi2FitTo(self, *args, **kwargs):
r"""The RooAbsReal::chi2FitTo() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsReal.chi2FitTo` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._chi2FitTo(*args, **kwargs)
out = self._chi2FitTo(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

def setEvalErrorLoggingMode(m):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ def createHistogram(self, *args, **kwargs):
r"""The RooAbsRealLValue::createHistogram() function is pythonized with the command argument pythonization.
The keywords must correspond to the CmdArgs of the function.
"""
# Redefinition of `RooAbsRealLValue.createHistogram` for keyword arguments.
import ROOT

args, kwargs = _kwargs_to_roocmdargs(*args, **kwargs)
return self._createHistogram(*args, **kwargs)
out = self._createHistogram(*args, **kwargs)
ROOT.SetOwnership(out, True)
return out

@cpp_signature(
"RooPlot *RooAbsRealLValue::frame(const RooCmdArg& arg1, const RooCmdArg& arg2={},"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
## \date July 2024
## \author Robin Syring

import ROOT
import numpy as np
from sklearn.neural_network import MLPClassifier
import itertools

Check failure on line 33 in tutorials/roofit/roofit/rf617_simulation_based_inference_multidimensional.py

View workflow job for this annotation

GitHub Actions / ruff

ruff (I001)

tutorials/roofit/roofit/rf617_simulation_based_inference_multidimensional.py:30:1: I001 Import block is un-sorted or un-formatted help: Organize imports

# Kills warning messages
ROOT.RooMsgService.instance().setGlobalKillBelow(ROOT.RooFit.WARNING)
Expand Down Expand Up @@ -78,6 +78,7 @@
hist.add(hist.get(i_bin), 1.0)

templates[nd_idx] = ROOT.RooHistPdf(f"histpdf{idx}", f"histpdf{idx}", ROOT.RooArgSet(*x_vars), hist, 1)
templates[nd_idx]._data_hist = hist # To keep the underlying RooDataHist alive

# Add the PDF to the grid
grid.addPdf(templates[nd_idx], *nd_idx)
Expand Down
Loading