From 162cb4d57bd45bdabc9b1c892b79f1ce47413282 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 2 Aug 2016 19:41:04 +0200
Subject: [PATCH] revert automatic output for Beam (it's not a constructor
 here)

---
 Core/Export/PyGenVisitor.cpp        | 4 +++-
 auto/Wrap/doxygen_core.i            | 7 +++----
 auto/Wrap/libBornAgainCore.py       | 6 +-----
 auto/Wrap/libBornAgainCore_wrap.cpp | 6 +-----
 4 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/Core/Export/PyGenVisitor.cpp b/Core/Export/PyGenVisitor.cpp
index b5431b25166..2d0386ae00e 100644
--- a/Core/Export/PyGenVisitor.cpp
+++ b/Core/Export/PyGenVisitor.cpp
@@ -950,7 +950,9 @@ std::string PyGenVisitor::defineBeam(const GISASSimulation* simulation) const
     // result << indent() << "# Defining Beam Parameters\n";
     const Beam& beam = simulation->getInstrument().getBeam();
     result << indent() << "simulation.setBeamParameters("
-           << PyGenTools::argumentList(&beam) << ")\n";
+           << PyGenTools::printNm(beam.getWavelength()) << ", "
+           << PyGenTools::printDegrees(beam.getAlpha()) << ", "
+           << PyGenTools::printDegrees(beam.getPhi()) << ")\n";
     double beam_intensity = beam.getIntensity();
     if(beam_intensity > 0.0)
         result << indent() << "simulation.setBeamIntensity("
diff --git a/auto/Wrap/doxygen_core.i b/auto/Wrap/doxygen_core.i
index 07a85a0f6fa..2aa7082368c 100644
--- a/auto/Wrap/doxygen_core.i
+++ b/auto/Wrap/doxygen_core.i
@@ -7238,14 +7238,13 @@ C++ includes: Instrument.h
 %feature("docstring")  Instrument::~Instrument "Instrument::~Instrument()
 ";
 
-%feature("docstring")  Instrument::getBeam "Beam Instrument::getBeam() const
+%feature("docstring")  Instrument::getBeam "Beam& Instrument::getBeam()
+";
 
-Returns the beam data. 
+%feature("docstring")  Instrument::getBeam "const Beam& Instrument::getBeam() const 
 ";
 
 %feature("docstring")  Instrument::setBeam "void Instrument::setBeam(const Beam &beam)
-
-Sets the beam data. 
 ";
 
 %feature("docstring")  Instrument::setBeamParameters "void Instrument::setBeamParameters(double wavelength, double alpha_i, double phi_i)
diff --git a/auto/Wrap/libBornAgainCore.py b/auto/Wrap/libBornAgainCore.py
index 21e55041447..47ccd98e985 100644
--- a/auto/Wrap/libBornAgainCore.py
+++ b/auto/Wrap/libBornAgainCore.py
@@ -18313,9 +18313,7 @@ class Instrument(IParameterized):
         getBeam(Instrument self) -> Beam
         getBeam(Instrument self) -> Beam
 
-        Beam Instrument::getBeam() const
-
-        Returns the beam data. 
+        const Beam& Instrument::getBeam() const 
 
         """
         return _libBornAgainCore.Instrument_getBeam(self, *args)
@@ -18327,8 +18325,6 @@ class Instrument(IParameterized):
 
         void Instrument::setBeam(const Beam &beam)
 
-        Sets the beam data. 
-
         """
         return _libBornAgainCore.Instrument_setBeam(self, beam)
 
diff --git a/auto/Wrap/libBornAgainCore_wrap.cpp b/auto/Wrap/libBornAgainCore_wrap.cpp
index 1bc898fe2e5..a48cbcfa04a 100644
--- a/auto/Wrap/libBornAgainCore_wrap.cpp
+++ b/auto/Wrap/libBornAgainCore_wrap.cpp
@@ -108702,9 +108702,7 @@ static PyMethodDef SwigMethods[] = {
 		"getBeam() -> Beam\n"
 		"Instrument_getBeam(Instrument self) -> Beam\n"
 		"\n"
-		"Beam Instrument::getBeam() const\n"
-		"\n"
-		"Returns the beam data. \n"
+		"const Beam& Instrument::getBeam() const \n"
 		"\n"
 		""},
 	 { (char *)"Instrument_setBeam", _wrap_Instrument_setBeam, METH_VARARGS, (char *)"\n"
@@ -108712,8 +108710,6 @@ static PyMethodDef SwigMethods[] = {
 		"\n"
 		"void Instrument::setBeam(const Beam &beam)\n"
 		"\n"
-		"Sets the beam data. \n"
-		"\n"
 		""},
 	 { (char *)"Instrument_setBeamParameters", _wrap_Instrument_setBeamParameters, METH_VARARGS, (char *)"\n"
 		"Instrument_setBeamParameters(Instrument self, double wavelength, double alpha_i, double phi_i)\n"
-- 
GitLab