From f01f65742c32374c620d3bda958d07faf254f76a Mon Sep 17 00:00:00 2001
From: pospelov <pospelov@fz-juelich.de>
Date: Wed, 6 Feb 2013 13:54:57 +0100
Subject: [PATCH] New meso fit configuration

---
 App/inc/TestMesoCrystal2.h   |  1 +
 App/src/TestMesoCrystal2.cpp | 16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/App/inc/TestMesoCrystal2.h b/App/inc/TestMesoCrystal2.h
index 5e3d7390796..e8bc459a249 100644
--- a/App/inc/TestMesoCrystal2.h
+++ b/App/inc/TestMesoCrystal2.h
@@ -70,6 +70,7 @@ public:
     void fitsuite_config1();
     void fitsuite_config2();
     void fitsuite_config3();
+    void fitsuite_config4();
 
 private:
     void initializeRealData();
diff --git a/App/src/TestMesoCrystal2.cpp b/App/src/TestMesoCrystal2.cpp
index bcdafa034a8..8c4441b9d59 100644
--- a/App/src/TestMesoCrystal2.cpp
+++ b/App/src/TestMesoCrystal2.cpp
@@ -129,6 +129,9 @@ void TestMesoCrystal2::fitsuite_setup(int nconfig)
     case 3:
         fitsuite_config3();
         break;
+    case 4:
+        fitsuite_config4();
+        break;
     default:
         throw LogicErrorException("TestMesoCrystal2::fitsuite_setup() -> Error! Can't setup FitSuite");
         break;
@@ -185,14 +188,23 @@ void TestMesoCrystal2::fitsuite_config3()
     strategy_all->release_all();
     m_fitSuite->addFitStrategy(strategy_all);
 
-//    const double minima[]={0.042, 0.004};
-//    const double maxima[]={0.052, 0.03};
     Mask *mask1 = OutputDataFunctions::CreateRectangularMask(*m_real_data, 0.041, 0.003, 0.051, 0.03);
     m_real_data->setMask(*mask1);
 
 
 }
 
+void TestMesoCrystal2::fitsuite_config4()
+{
+    fitsuite_config3();
+    for(FitSuiteStrategies::iterator it = m_fitSuite->getFitStrategies()->begin(); it!= m_fitSuite->getFitStrategies()->end(); ++it) {
+        FitSuiteStrategyAdjustParameters *strategy = dynamic_cast<FitSuiteStrategyAdjustParameters *>( (*it) );
+        assert(strategy);
+        strategy->setPreserveOriginalValues(false);
+    }
+
+}
+
 
 // ----------------------------------------------------------------------------
 // FitSuite configuration #2
-- 
GitLab