Skip to content

Commit e147061

Browse files
committed
update
1 parent cc1ab3e commit e147061

File tree

2 files changed

+20
-27
lines changed

2 files changed

+20
-27
lines changed

Python/Core/src/Utilities.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,26 @@ void addUtilities(py::module_& m) {
285285
{
286286
// Single axis type covering regular, variable, and log axes
287287
py::class_<AxisVariant>(m, "Axis")
288+
.def_static(
289+
"regular",
290+
[](unsigned bins, double low, double high,
291+
const std::string& title) {
292+
return AxisVariant(BoostRegularAxis(bins, low, high, title));
293+
},
294+
"bins"_a, "low"_a, "high"_a, "title"_a = "")
295+
.def_static(
296+
"log",
297+
[](unsigned bins, double low, double high,
298+
const std::string& title) {
299+
return AxisVariant(BoostLogAxis(bins, low, high, title));
300+
},
301+
"bins"_a, "low"_a, "high"_a, "title"_a = "")
302+
.def_static(
303+
"variable",
304+
[](const std::vector<double>& edges, const std::string& title) {
305+
return AxisVariant(BoostVariableAxis(edges, title));
306+
},
307+
"edges"_a, "title"_a = "")
288308
.def_property_readonly("size", &AxisVariant::size)
289309
.def_property_readonly(
290310
"label",

Python/Examples/src/plugins/Root.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -98,34 +98,7 @@ PYBIND11_MODULE(ActsExamplesPythonBindingsRoot, root) {
9898

9999
// Output
100100
{
101-
// Bindings for axis variant used in PlotTool configurations
102101
{
103-
py::class_<Acts::Experimental::AxisVariant>(root, "AxisVariant")
104-
.def_static(
105-
"regular",
106-
[](unsigned bins, double low, double high,
107-
const std::string& title) {
108-
return Acts::Experimental::AxisVariant(
109-
Acts::Experimental::BoostRegularAxis(bins, low, high,
110-
title));
111-
},
112-
"bins"_a, "low"_a, "high"_a, "title"_a = "")
113-
.def_static(
114-
"log",
115-
[](unsigned bins, double low, double high,
116-
const std::string& title) {
117-
return Acts::Experimental::AxisVariant(
118-
Acts::Experimental::BoostLogAxis(bins, low, high, title));
119-
},
120-
"bins"_a, "low"_a, "high"_a, "title"_a = "")
121-
.def_static(
122-
"variable",
123-
[](const std::vector<double>& edges, const std::string& title) {
124-
return Acts::Experimental::AxisVariant(
125-
Acts::Experimental::BoostVariableAxis(edges, title));
126-
},
127-
"edges"_a, "title"_a = "");
128-
129102
py::class_<EffPlotTool::Config>(root, "EffPlotToolConfig")
130103
.def(py::init<>())
131104
.def_readwrite("varBinning", &EffPlotTool::Config::varBinning)

0 commit comments

Comments
 (0)