diff --git a/Sim/Simulation/DepthprobeSimulation.cpp b/Sim/Simulation/DepthprobeSimulation.cpp index e73f099370ee5af2e29c6a3de869669a60b5e10d..3c028ae53200eccffdc9add29ad558dbe671b698 100644 --- a/Sim/Simulation/DepthprobeSimulation.cpp +++ b/Sim/Simulation/DepthprobeSimulation.cpp @@ -29,12 +29,6 @@ #include "Sim/Computation/DepthprobeComputation.h" #include "Sim/Scan/AlphaScan.h" -DepthprobeSimulation::DepthprobeSimulation(const MultiLayer& sample) - : ISimulation(sample) - , m_beam(Beam::horizontalBeam().clone()) -{ -} - DepthprobeSimulation::DepthprobeSimulation(const IBeamScan& scan, const MultiLayer& sample) : ISimulation(sample) , m_scan(scan.clone()) diff --git a/Sim/Simulation/DepthprobeSimulation.h b/Sim/Simulation/DepthprobeSimulation.h index 535f4b9f90007f6083911a36a969cb7c083d6ef8..226a0c65419c2ec0c9aebad52b43cf288feb768a 100644 --- a/Sim/Simulation/DepthprobeSimulation.h +++ b/Sim/Simulation/DepthprobeSimulation.h @@ -33,7 +33,6 @@ class IFootprintFactor; class DepthprobeSimulation : public ISimulation { public: DepthprobeSimulation(const IBeamScan& scan, const MultiLayer& sample); - DepthprobeSimulation(const MultiLayer& sample); ~DepthprobeSimulation() override; std::string className() const final { return "DepthprobeSimulation"; } diff --git a/auto/Wrap/libBornAgainSim.py b/auto/Wrap/libBornAgainSim.py index 3e81515139172680cff43a8918f8801675bfc0f8..e6febd834a2c81d0f9980d2fa1e205e93b2e437d 100644 --- a/auto/Wrap/libBornAgainSim.py +++ b/auto/Wrap/libBornAgainSim.py @@ -2726,12 +2726,9 @@ class DepthprobeSimulation(ISimulation): thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") __repr__ = _swig_repr - def __init__(self, *args): - r""" - __init__(DepthprobeSimulation self, IBeamScan scan, MultiLayer const & sample) -> DepthprobeSimulation - __init__(DepthprobeSimulation self, MultiLayer const & sample) -> DepthprobeSimulation - """ - _libBornAgainSim.DepthprobeSimulation_swiginit(self, _libBornAgainSim.new_DepthprobeSimulation(*args)) + def __init__(self, scan, sample): + r"""__init__(DepthprobeSimulation self, IBeamScan scan, MultiLayer const & sample) -> DepthprobeSimulation""" + _libBornAgainSim.DepthprobeSimulation_swiginit(self, _libBornAgainSim.new_DepthprobeSimulation(scan, sample)) __swig_destroy__ = _libBornAgainSim.delete_DepthprobeSimulation def className(self): diff --git a/auto/Wrap/libBornAgainSim_wrap.cpp b/auto/Wrap/libBornAgainSim_wrap.cpp index 4792e4453cc6a60f75c783d7e340e54046140c0a..6dfa68dcd56274c188c06d5f3d5e8a83553ca550 100644 --- a/auto/Wrap/libBornAgainSim_wrap.cpp +++ b/auto/Wrap/libBornAgainSim_wrap.cpp @@ -33393,7 +33393,7 @@ SWIGINTERN PyObject *ScatteringSimulation_swiginit(PyObject *SWIGUNUSEDPARM(self return SWIG_Python_InitShadowInstance(args); } -SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { +SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation(PyObject *self, PyObject *args) { PyObject *resultobj = 0; IBeamScan *arg1 = 0 ; MultiLayer *arg2 = 0 ; @@ -33401,9 +33401,10 @@ SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation__SWIG_0(PyObject *self, Py_s int res1 = 0 ; void *argp2 = 0 ; int res2 = 0 ; + PyObject *swig_obj[2] ; DepthprobeSimulation *result = 0 ; - if ((nobjs < 2) || (nobjs > 2)) SWIG_fail; + if (!SWIG_Python_UnpackTuple(args, "new_DepthprobeSimulation", 2, 2, swig_obj)) SWIG_fail; res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_IBeamScan, 0 | 0); if (!SWIG_IsOK(res1)) { SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DepthprobeSimulation" "', argument " "1"" of type '" "IBeamScan const &""'"); @@ -33428,68 +33429,6 @@ fail: } -SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) { - PyObject *resultobj = 0; - MultiLayer *arg1 = 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - DepthprobeSimulation *result = 0 ; - - if ((nobjs < 1) || (nobjs > 1)) SWIG_fail; - res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_MultiLayer, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DepthprobeSimulation" "', argument " "1"" of type '" "MultiLayer const &""'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DepthprobeSimulation" "', argument " "1"" of type '" "MultiLayer const &""'"); - } - arg1 = reinterpret_cast< MultiLayer * >(argp1); - result = (DepthprobeSimulation *)new DepthprobeSimulation((MultiLayer const &)*arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DepthprobeSimulation, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_DepthprobeSimulation(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[3] = { - 0 - }; - - if (!(argc = SWIG_Python_UnpackTuple(args, "new_DepthprobeSimulation", 0, 2, argv))) SWIG_fail; - --argc; - if (argc == 1) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_MultiLayer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_DepthprobeSimulation__SWIG_1(self, argc, argv); - } - } - if (argc == 2) { - int _v = 0; - int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_IBeamScan, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_MultiLayer, SWIG_POINTER_NO_NULL | 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_DepthprobeSimulation__SWIG_0(self, argc, argv); - } - } - } - -fail: - SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_DepthprobeSimulation'.\n" - " Possible C/C++ prototypes are:\n" - " DepthprobeSimulation::DepthprobeSimulation(IBeamScan const &,MultiLayer const &)\n" - " DepthprobeSimulation::DepthprobeSimulation(MultiLayer const &)\n"); - return 0; -} - - SWIGINTERN PyObject *_wrap_delete_DepthprobeSimulation(PyObject *self, PyObject *args) { PyObject *resultobj = 0; DepthprobeSimulation *arg1 = (DepthprobeSimulation *) 0 ; @@ -36496,10 +36435,7 @@ static PyMethodDef SwigMethods[] = { { "ScatteringSimulation_detector", _wrap_ScatteringSimulation_detector, METH_O, "ScatteringSimulation_detector(ScatteringSimulation self) -> IDetector &"}, { "ScatteringSimulation_swigregister", ScatteringSimulation_swigregister, METH_O, NULL}, { "ScatteringSimulation_swiginit", ScatteringSimulation_swiginit, METH_VARARGS, NULL}, - { "new_DepthprobeSimulation", _wrap_new_DepthprobeSimulation, METH_VARARGS, "\n" - "DepthprobeSimulation(IBeamScan scan, MultiLayer const & sample)\n" - "new_DepthprobeSimulation(MultiLayer const & sample) -> DepthprobeSimulation\n" - ""}, + { "new_DepthprobeSimulation", _wrap_new_DepthprobeSimulation, METH_VARARGS, "new_DepthprobeSimulation(IBeamScan scan, MultiLayer const & sample) -> DepthprobeSimulation"}, { "delete_DepthprobeSimulation", _wrap_delete_DepthprobeSimulation, METH_O, "delete_DepthprobeSimulation(DepthprobeSimulation self)"}, { "DepthprobeSimulation_className", _wrap_DepthprobeSimulation_className, METH_O, "DepthprobeSimulation_className(DepthprobeSimulation self) -> std::string"}, { "DepthprobeSimulation_setBeamParameters", _wrap_DepthprobeSimulation_setBeamParameters, METH_VARARGS, "DepthprobeSimulation_setBeamParameters(DepthprobeSimulation self, double _lambda, int nbins, double alpha_i_min, double alpha_i_max, IFootprintFactor const * beam_shape=None)"},