From fffe9ce30e267b74e71fd8ef05d33d59bb8bdefc Mon Sep 17 00:00:00 2001
From: Raquel Alvarez Banos <raquel.alvarez.banos@gmail.com>
Date: Fri, 31 Jul 2015 11:35:11 +0100
Subject: [PATCH] Re #13151 Minor changes

---
 .../PlotAsymmetryByLogValue.h                 | 44 +++++++++++--------
 .../src/PlotAsymmetryByLogValue.cpp           |  5 +++
 2 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h
index 96016768280..cc416d0f25e 100644
--- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h
+++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/PlotAsymmetryByLogValue.h
@@ -114,27 +114,43 @@ private:
   /// Check input properties
   void checkProperties(size_t &is, size_t &ie);
 
+  /// Properties needed to load a run
   /// Stores base name shared by all runs
   std::string m_filenameBase;
   /// Stores extension shared by all runs
   std::string m_filenameExt;
   /// Sotres number of zeros in run name
   int m_filenameZeros;
-  /// Stores property "Int"
-  bool m_int;
-  /// Store forward spectra
-  std::vector<int> m_forward_list;
-  /// Store backward spectra
-  std::vector<int> m_backward_list;
   /// Store type of dead time corrections
   std::string m_dtcType;
   /// File to read corrections from
   std::string m_dtcFile;
-  /// Store red period
+  /// Store forward spectra
+  std::vector<int> m_forward_list;
+  /// Store backward spectra
+  std::vector<int> m_backward_list;
+
+  /// Properties needed to analyse a run
+  /// Type of calculation: integral or differential
+  bool m_int;
+  /// Red period
   int m_red;
-  /// Store green period
+  /// Green period
   int m_green;
-  // Mantid maps to store intermediate results
+  // LogValue name
+  // Type of computation: integral or differential
+  std::string m_stype;
+  /// Minimum time for the analysis
+  double m_minTime;
+  /// Maximum time for the analysis
+  double m_maxTime;
+
+  /// Properties needed to get the log value
+  std::string m_logName;
+  /// LogValue function
+  std::string m_logFunc;
+
+  /// Mantid maps to store intermediate results
   // Map to store log value
   std::map<size_t, double> m_logValue;
   // Red values
@@ -149,16 +165,6 @@ private:
   // Diff values (Red - Green)
   std::map<size_t, double> m_diffY;
   std::map<size_t, double> m_diffE;
-  // LogValue name
-  std::string m_logName;
-  // LogValue function
-  std::string m_logFunc;
-  // Type of computation: integral or differential
-  std::string m_stype;
-  // Minimum time for the analysis
-  double m_minTime;
-  // Maximum time for the analysis
-  double m_maxTime;
 
   // String containing all the properties
   std::string m_allProperties;
diff --git a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
index 80b103e3dab..a3e82b78f95 100644
--- a/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/PlotAsymmetryByLogValue.cpp
@@ -242,6 +242,11 @@ void PlotAsymmetryByLogValue::checkProperties(size_t &is, size_t &ie) {
   m_allProperties = ss.str();
 
   // Check if we can re-use results from previous run
+  // We can reuse results if:
+  // 1. There is a ws in the ADS with name m_currResName
+  // 2. It is a MatrixWorkspace
+  // 3. It has a title equatl to m_allProperties
+  // This ws stores previous results as described below
   if (AnalysisDataService::Instance().doesExist(m_currResName)) {
     MatrixWorkspace_sptr prevResults =
         AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>(
-- 
GitLab