Skip to content

Commit

Permalink
Fix indexing error in GenerateEventsFilter.
Browse files Browse the repository at this point in the history
Refs #10002
  • Loading branch information
martyngigg committed Aug 7, 2014
1 parent 6a2ca59 commit 04cf2ac
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Code/Mantid/Framework/Algorithms/src/GenerateEventsFilter.cpp
Expand Up @@ -1267,14 +1267,19 @@ namespace Algorithms
// Check this value whether it falls into any range
size_t index = searchValue(logvalueranges, currValue);

// if (currValue == 1940)
if (g_log.is(Logger::Priority::PRIO_DEBUG))
{
stringstream dbss;
dbss << "[DBx257] Examine Log Index " << i << ", Value = " << currValue
<< ", Data Range Index = " << index << "; "
<< "Group Index = " << indexwsindexmap[index/2]
<< " (log value range vector size = " << logvalueranges.size() << "): "
<< logvalueranges[index-1] << ", " << logvalueranges[index] << ", " << logvalueranges[index+1];
<< " (log value range vector size = " << logvalueranges.size() << "): ";
if( index == 0 )
dbss << logvalueranges[index] << ", " << logvalueranges[index+1];
else if( index == logvalueranges.size() )
dbss << logvalueranges[index-1] << ", " << logvalueranges[index];
else
dbss << logvalueranges[index-1] << ", " << logvalueranges[index] << ", " << logvalueranges[index+1];
g_log.debug(dbss.str());
}

Expand Down

0 comments on commit 04cf2ac

Please sign in to comment.