Skip to content

Commit

Permalink
Re #6931 Pass first and last run by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Apr 23, 2015
1 parent 36e15fb commit fde0fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -101,7 +101,7 @@ class DLLExport PlotAsymmetryByLogValue : public API::Algorithm {
/// Populate output workspace with results
void populateOutputWorkspace (API::MatrixWorkspace_sptr &outWS, int nplots);
/// Check input properties
void checkProperties ();
void checkProperties (size_t &is, size_t &ie);

/// Stores base name shared by all runs
static std::string g_filenameBase;
Expand Down
Expand Up @@ -182,7 +182,8 @@ void PlotAsymmetryByLogValue::exec() {

// Check input properties to decide whether or not we can reuse previous
// results, if any
checkProperties();
size_t is, ie;
checkProperties(is,ie);

Progress progress(this, 0, 1, ie - is + 2);

Expand Down Expand Up @@ -221,7 +222,7 @@ void PlotAsymmetryByLogValue::exec() {

/** Checks input properties and compares them to previous values
*/
void PlotAsymmetryByLogValue::checkProperties () {
void PlotAsymmetryByLogValue::checkProperties (size_t &is, size_t &ie) {

// If any of the following properties has a different value from the
// previous call, we need to re-do all the computations, which means
Expand Down Expand Up @@ -250,8 +251,8 @@ void PlotAsymmetryByLogValue::checkProperties () {
std::string filenameBase, filenameExt;
int filenameZeros;
parseRunNames( firstFN, lastFN, filenameBase, filenameExt, filenameZeros);
size_t is = atoi(firstFN.c_str()); // starting run number
size_t ie = atoi(lastFN.c_str()); // last run number
is = atoi(firstFN.c_str()); // starting run number
ie = atoi(lastFN.c_str()); // last run number

// Check if any property has changed
if ( g_logName != logName ||
Expand Down

0 comments on commit fde0fd0

Please sign in to comment.