Skip to content

Commit

Permalink
Re #11165 Check and handle duplicate spec numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
raquelalvarezbanos committed Feb 26, 2015
1 parent 8392233 commit f7b8373
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Code/Mantid/Framework/DataHandling/src/LoadMuonNexus1.cpp
Expand Up @@ -165,6 +165,14 @@ void LoadMuonNexus1::exec() {
// read
int64_t total_specs;
if (m_interval || m_list) {
// Remove from list possible duplicate specs
for (auto it=m_spec_list.begin(); it!=m_spec_list.end(); ) {
if ( (*it>=m_spec_min) && (*it<=m_spec_max) ) {
it = m_spec_list.erase(it);
} else {
++it;
}
}
total_specs = m_spec_list.size();
if (m_interval) {
total_specs += (m_spec_max - m_spec_min + 1);
Expand Down Expand Up @@ -240,7 +248,7 @@ void LoadMuonNexus1::exec() {
specid_t histToRead = static_cast<specid_t>(m_spec_list[i]-1 + period * nxload.t_nsp1);
specid_t specNo = static_cast<specid_t>(m_spec_list[i]);
loadData(counter, histToRead, specNo, nxload, lengthIn - 1,
localWorkspace);
localWorkspace);
counter++;
progress.report();
}
Expand Down

0 comments on commit f7b8373

Please sign in to comment.