Skip to content

Commit

Permalink
Re #6931 Make stype static and check if it changed its value
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Apr 22, 2015
1 parent fb81ee1 commit 4a7eaa1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Expand Up @@ -144,6 +144,8 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm {
static std::string g_logName;
// LogValue function
static std::string g_logFunc;
// Type of computation: integral or differential
static std::string g_stype;
};

} // namespace Algorithm
Expand Down
10 changes: 6 additions & 4 deletions Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
Expand Up @@ -92,6 +92,7 @@ std::map<int64_t, double> PlotAsymmetryByLogValue::g_diffY;
std::map<int64_t, double> PlotAsymmetryByLogValue::g_diffE;
std::string PlotAsymmetryByLogValue::g_logName;
std::string PlotAsymmetryByLogValue::g_logFunc;
std::string PlotAsymmetryByLogValue::g_stype;

/** Initialisation method. Declares properties to be used in algorithm.
*
Expand Down Expand Up @@ -183,9 +184,6 @@ void PlotAsymmetryByLogValue::exec() {
// Get green and red periods
m_red = getProperty("Red");
m_green = getProperty("Green");
// Get type of computation
std::string stype = getProperty("Type");
m_int = stype == "Integral";
// Get type of dead-time corrections
m_dtcType = getPropertyValue("DeadTimeCorrType");
// Get runs
Expand Down Expand Up @@ -242,7 +240,8 @@ void PlotAsymmetryByLogValue::checkProperties () {

// Check if any property has changed
if ( g_logName != getPropertyValue("LogValue") ||
g_logFunc != getPropertyValue("Function") ) {
g_logFunc != getPropertyValue("Function") ||
g_stype != getPropertyValue("Type")) {

// If so, clear previous results
g_redX.clear();
Expand All @@ -264,6 +263,9 @@ void PlotAsymmetryByLogValue::checkProperties () {
g_logName = getPropertyValue("LogValue");
// Get function to apply to logValue
g_logFunc = getPropertyValue("Function");
// Get type of computation
g_stype = getPropertyValue("Type");
m_int = g_stype == "Integral";


}
Expand Down

0 comments on commit 4a7eaa1

Please sign in to comment.