Commit ed83c290 authored by Matthew D Jones's avatar Matthew D Jones
Browse files

Re #15287 Remove explicit use of std::set by using auto

parent e24e9368
...@@ -761,7 +761,7 @@ MatrixWorkspace::getDetector(const size_t workspaceIndex) const { ...@@ -761,7 +761,7 @@ MatrixWorkspace::getDetector(const size_t workspaceIndex) const {
"workspace index.", "workspace index.",
""); "");
const std::set<detid_t> &dets = spec->getDetectorIDs(); const auto &dets = spec->getDetectorIDs();
Instrument_const_sptr localInstrument = getInstrument(); Instrument_const_sptr localInstrument = getInstrument();
if (!localInstrument) { if (!localInstrument) {
g_log.debug() << "No instrument defined.\n"; g_log.debug() << "No instrument defined.\n";
...@@ -1012,7 +1012,7 @@ void MatrixWorkspace::maskWorkspaceIndex(const std::size_t index) { ...@@ -1012,7 +1012,7 @@ void MatrixWorkspace::maskWorkspaceIndex(const std::size_t index) {
// Virtual method clears the spectrum as appropriate // Virtual method clears the spectrum as appropriate
spec->clearData(); spec->clearData();
const std::set<detid_t> dets = spec->getDetectorIDs(); const auto dets = spec->getDetectorIDs();
for (auto detId : dets) { for (auto detId : dets) {
try { try {
if (const Geometry::Detector *det = if (const Geometry::Detector *det =
...@@ -1661,7 +1661,7 @@ void MatrixWorkspace::saveSpectraMapNexus( ...@@ -1661,7 +1661,7 @@ void MatrixWorkspace::saveSpectraMapNexus(
spectra[i] = int32_t(spectrum->getSpectrumNo()); spectra[i] = int32_t(spectrum->getSpectrumNo());
// The detectors in this spectrum // The detectors in this spectrum
const std::set<detid_t> &detectorgroup = spectrum->getDetectorIDs(); const auto &detectorgroup = spectrum->getDetectorIDs();
const int ndet1 = static_cast<int>(detectorgroup.size()); const int ndet1 = static_cast<int>(detectorgroup.size());
detector_index[i + 1] = int32_t( detector_index[i + 1] = int32_t(
......
...@@ -104,7 +104,7 @@ std::set<specid_t> SpectrumDetectorMapping::getSpectrumNumbers() const { ...@@ -104,7 +104,7 @@ std::set<specid_t> SpectrumDetectorMapping::getSpectrumNumbers() const {
const std::set<detid_t> &SpectrumDetectorMapping::getDetectorIDsForSpectrumNo( const std::set<detid_t> &SpectrumDetectorMapping::getDetectorIDsForSpectrumNo(
const specid_t spectrumNo) const { const specid_t spectrumNo) const {
if (!m_indexIsSpecNo) if (!m_indexIsSpecNo)
throw std::runtime_error("Indicies are in spectrum index, not number."); throw std::runtime_error("Indices are in spectrum index, not number.");
return m_mapping.at(spectrumNo); return m_mapping.at(spectrumNo);
} }
...@@ -112,7 +112,7 @@ const std::set<detid_t> & ...@@ -112,7 +112,7 @@ const std::set<detid_t> &
SpectrumDetectorMapping::getDetectorIDsForSpectrumIndex( SpectrumDetectorMapping::getDetectorIDsForSpectrumIndex(
const size_t spectrumIndex) const { const size_t spectrumIndex) const {
if (m_indexIsSpecNo) if (m_indexIsSpecNo)
throw std::runtime_error("Indicies are in spectrum number, not index."); throw std::runtime_error("Indices are in spectrum number, not index.");
return m_mapping.at(static_cast<int>(spectrumIndex)); return m_mapping.at(static_cast<int>(spectrumIndex));
} }
......
...@@ -123,10 +123,9 @@ void ConjoinWorkspaces::checkForOverlap(API::MatrixWorkspace_const_sptr ws1, ...@@ -123,10 +123,9 @@ void ConjoinWorkspaces::checkForOverlap(API::MatrixWorkspace_const_sptr ws1,
const ISpectrum *spec = ws1->getSpectrum(i); const ISpectrum *spec = ws1->getSpectrum(i);
const specid_t spectrum = spec->getSpectrumNo(); const specid_t spectrum = spec->getSpectrumNo();
spectra.insert(spectrum); spectra.insert(spectrum);
const std::set<detid_t> &dets = spec->getDetectorIDs(); const auto &dets = spec->getDetectorIDs();
std::set<detid_t>::const_iterator it; for (auto const &det : dets) {
for (it = dets.begin(); it != dets.end(); ++it) { detectors.insert(det);
detectors.insert(*it);
} }
} }
...@@ -145,11 +144,10 @@ void ConjoinWorkspaces::checkForOverlap(API::MatrixWorkspace_const_sptr ws1, ...@@ -145,11 +144,10 @@ void ConjoinWorkspaces::checkForOverlap(API::MatrixWorkspace_const_sptr ws1,
"The input workspaces have overlapping spectrum numbers"); "The input workspaces have overlapping spectrum numbers");
} }
} }
const std::set<detid_t> &dets = spec->getDetectorIDs(); const auto &dets = spec->getDetectorIDs();
std::set<detid_t>::const_iterator it; for (const auto &det : dets) {
for (it = dets.begin(); it != dets.end(); ++it) { if (detectors.find(det) != detectors.end()) {
if (detectors.find(*it) != detectors.end()) { g_log.error() << "The input workspaces have common detectors: " << (det)
g_log.error() << "The input workspaces have common detectors: " << (*it)
<< "\n"; << "\n";
throw std::invalid_argument( throw std::invalid_argument(
"The input workspaces have common detectors"); "The input workspaces have common detectors");
......
...@@ -776,8 +776,7 @@ void FilterEvents::setupCustomizedTOFCorrection() { ...@@ -776,8 +776,7 @@ void FilterEvents::setupCustomizedTOFCorrection() {
// If there are more than 1 spectrum, it is very likely to have problem // If there are more than 1 spectrum, it is very likely to have problem
// with correction factor // with correction factor
const DataObjects::EventList events = m_eventWS->getEventList(i); const DataObjects::EventList events = m_eventWS->getEventList(i);
std::set<detid_t> detids = events.getDetectorIDs(); auto detids = events.getDetectorIDs();
std::set<detid_t>::iterator detit;
if (detids.size() != 1) { if (detids.size() != 1) {
// Check whether there are more than 1 detector per spectra. // Check whether there are more than 1 detector per spectra.
stringstream errss; stringstream errss;
...@@ -788,7 +787,7 @@ void FilterEvents::setupCustomizedTOFCorrection() { ...@@ -788,7 +787,7 @@ void FilterEvents::setupCustomizedTOFCorrection() {
throw runtime_error(errss.str()); throw runtime_error(errss.str());
} }
detid_t detid = 0; detid_t detid = 0;
for (detit = detids.begin(); detit != detids.end(); ++detit) for (auto detit = detids.begin(); detit != detids.end(); ++detit)
detid = *detit; detid = *detit;
vecDetIDs[i] = detid; vecDetIDs[i] = detid;
} }
......
...@@ -101,14 +101,13 @@ void FindDeadDetectors::exec() { ...@@ -101,14 +101,13 @@ void FindDeadDetectors::exec() {
// Write the spectrum number to file // Write the spectrum number to file
file << i << " " << specNo; file << i << " " << specNo;
// Get the list of detectors for this spectrum and iterate over // Get the list of detectors for this spectrum and iterate over
const std::set<detid_t> &dets = spec->getDetectorIDs(); const auto &dets = spec->getDetectorIDs();
std::set<detid_t>::const_iterator it; for (const auto &det : dets) {
for (it = dets.begin(); it != dets.end(); ++it) {
// Write the detector ID to file, log & the FoundDead output property // Write the detector ID to file, log & the FoundDead output property
file << " " << *it; file << " " << det;
// we could write dead detectors to the log but if they are viewing the // we could write dead detectors to the log but if they are viewing the
// log in the MantidPlot viewer it will crash MantidPlot // log in the MantidPlot viewer it will crash MantidPlot
deadDets.push_back(*it); deadDets.push_back(det);
++countDets; ++countDets;
} }
file << std::endl; file << std::endl;
......
...@@ -131,16 +131,15 @@ void GetDetectorOffsets::exec() { ...@@ -131,16 +131,15 @@ void GetDetectorOffsets::exec() {
} }
// Get the list of detectors in this pixel // Get the list of detectors in this pixel
const std::set<detid_t> &dets = inputW->getSpectrum(wi)->getDetectorIDs(); const auto &dets = inputW->getSpectrum(wi)->getDetectorIDs();
// Most of the exec time is in FitSpectra, so this critical block should not // Most of the exec time is in FitSpectra, so this critical block should not
// be a problem. // be a problem.
PARALLEL_CRITICAL(GetDetectorOffsets_setValue) { PARALLEL_CRITICAL(GetDetectorOffsets_setValue) {
// Use the same offset for all detectors from this pixel // Use the same offset for all detectors from this pixel
std::set<detid_t>::iterator it; for (const auto &det : dets) {
for (it = dets.begin(); it != dets.end(); ++it) { outputW->setValue(det, offset);
outputW->setValue(*it, offset); const auto mapEntry = pixel_to_wi.find(det);
const auto mapEntry = pixel_to_wi.find(*it);
if (mapEntry == pixel_to_wi.end()) if (mapEntry == pixel_to_wi.end())
continue; continue;
const size_t workspaceIndex = mapEntry->second; const size_t workspaceIndex = mapEntry->second;
......
...@@ -165,7 +165,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specid_t mon0Spec, ...@@ -165,7 +165,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specid_t mon0Spec,
g_log.error() << "Error retrieving data for the first monitor" << std::endl; g_log.error() << "Error retrieving data for the first monitor" << std::endl;
throw std::bad_cast(); throw std::bad_cast();
} }
const std::set<detid_t> &dets = WS->getSpectrum(monWI)->getDetectorIDs(); const auto &dets = WS->getSpectrum(monWI)->getDetectorIDs();
if (dets.size() != 1) { if (dets.size() != 1) {
g_log.error() << "The detector for spectrum number " << mon0Spec g_log.error() << "The detector for spectrum number " << mon0Spec
...@@ -187,7 +187,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specid_t mon0Spec, ...@@ -187,7 +187,7 @@ void GetEi::getGeometry(API::MatrixWorkspace_const_sptr WS, specid_t mon0Spec,
g_log.error() << "Error retrieving data for the second monitor\n"; g_log.error() << "Error retrieving data for the second monitor\n";
throw std::bad_cast(); throw std::bad_cast();
} }
const std::set<detid_t> &dets2 = WS->getSpectrum(monWI)->getDetectorIDs(); const auto &dets2 = WS->getSpectrum(monWI)->getDetectorIDs();
if (dets2.size() != 1) { if (dets2.size() != 1) {
g_log.error() << "The detector for spectrum number " << mon1Spec g_log.error() << "The detector for spectrum number " << mon1Spec
<< " was either not found or is a group, grouped monitors " << " was either not found or is a group, grouped monitors "
......
...@@ -72,7 +72,7 @@ void MaskDetectorsIf::exec() { ...@@ -72,7 +72,7 @@ void MaskDetectorsIf::exec() {
for (size_t i = 0; i < nspec; ++i) { for (size_t i = 0; i < nspec; ++i) {
// Get the list of udets contributing to this spectra // Get the list of udets contributing to this spectra
const std::set<detid_t> &dets = inputW->getSpectrum(i)->getDetectorIDs(); const auto &dets = inputW->getSpectrum(i)->getDetectorIDs();
if (dets.empty()) if (dets.empty())
continue; continue;
......
...@@ -168,7 +168,7 @@ void MergeRuns::buildAdditionTables() { ...@@ -168,7 +168,7 @@ void MergeRuns::buildAdditionTables() {
table->reserve(nhist); table->reserve(nhist);
for (int inWI = 0; inWI < static_cast<int>(nhist); inWI++) { for (int inWI = 0; inWI < static_cast<int>(nhist); inWI++) {
// Get the set of detectors in the output // Get the set of detectors in the output
std::set<detid_t> &inDets = ews->getEventList(inWI).getDetectorIDs(); auto &inDets = ews->getEventList(inWI).getDetectorIDs();
bool done = false; bool done = false;
...@@ -177,7 +177,7 @@ void MergeRuns::buildAdditionTables() { ...@@ -177,7 +177,7 @@ void MergeRuns::buildAdditionTables() {
int outWI = inWI; int outWI = inWI;
if (outWI < lhs_nhist) // don't go out of bounds if (outWI < lhs_nhist) // don't go out of bounds
{ {
std::set<detid_t> &outDets = lhs->getEventList(outWI).getDetectorIDs(); auto &outDets = lhs->getEventList(outWI).getDetectorIDs();
// Checks that inDets is a subset of outDets // Checks that inDets is a subset of outDets
if (std::includes(outDets.begin(), outDets.end(), inDets.begin(), if (std::includes(outDets.begin(), outDets.end(), inDets.begin(),
......
...@@ -112,7 +112,7 @@ void ReadGroupsFromFile::exec() { ...@@ -112,7 +112,7 @@ void ReadGroupsFromFile::exec() {
for (int64_t i = 0; i < nHist; i++) { for (int64_t i = 0; i < nHist; i++) {
ISpectrum *spec = localWorkspace->getSpectrum(i); ISpectrum *spec = localWorkspace->getSpectrum(i);
const std::set<detid_t> &dets = spec->getDetectorIDs(); const auto &dets = spec->getDetectorIDs();
if (dets.empty()) // Nothing if (dets.empty()) // Nothing
{ {
spec->dataY()[0] = 0.0; spec->dataY()[0] = 0.0;
......
...@@ -355,7 +355,7 @@ void SmoothNeighbours::findNeighboursUbiqutious() { ...@@ -355,7 +355,7 @@ void SmoothNeighbours::findNeighboursUbiqutious() {
// We want to skip monitors // We want to skip monitors
try { try {
// Get the list of detectors in this pixel // Get the list of detectors in this pixel
const std::set<detid_t> &dets = inWS->getSpectrum(wi)->getDetectorIDs(); const auto &dets = inWS->getSpectrum(wi)->getDetectorIDs();
det = inst->getDetector(*dets.begin()); det = inst->getDetector(*dets.begin());
if (det->isMonitor()) if (det->isMonitor())
continue; // skip monitor continue; // skip monitor
...@@ -713,7 +713,7 @@ void SmoothNeighbours::setupNewInstrument(MatrixWorkspace_sptr outws) { ...@@ -713,7 +713,7 @@ void SmoothNeighbours::setupNewInstrument(MatrixWorkspace_sptr outws) {
const ISpectrum *inSpec = inWS->getSpectrum(inWI); const ISpectrum *inSpec = inWS->getSpectrum(inWI);
std::set<detid_t> thesedetids = inSpec->getDetectorIDs(); auto thesedetids = inSpec->getDetectorIDs();
outSpec->addDetectorIDs(thesedetids); outSpec->addDetectorIDs(thesedetids);
} //(each neighbour) } //(each neighbour)
...@@ -748,7 +748,7 @@ void SmoothNeighbours::spreadPixels(MatrixWorkspace_sptr outws) { ...@@ -748,7 +748,7 @@ void SmoothNeighbours::spreadPixels(MatrixWorkspace_sptr outws) {
ISpectrum *inSpec = inWS->getSpectrum(outWIi); ISpectrum *inSpec = inWS->getSpectrum(outWIi);
MantidVec &inX = inSpec->dataX(); MantidVec &inX = inSpec->dataX();
std::set<detid_t> thesedetids = inSpec->getDetectorIDs(); auto thesedetids = inSpec->getDetectorIDs();
ISpectrum *outSpec2 = outws2->getSpectrum(outWIi); ISpectrum *outSpec2 = outws2->getSpectrum(outWIi);
MantidVec &outX = outSpec2->dataX(); MantidVec &outX = outSpec2->dataX();
outX = inX; outX = inX;
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
TS_ASSERT_THROWS_NOTHING( TS_ASSERT_THROWS_NOTHING(
result = boost::dynamic_pointer_cast<MatrixWorkspace>( result = boost::dynamic_pointer_cast<MatrixWorkspace>(
AnalysisDataService::Instance().retrieve("to_remap"))); AnalysisDataService::Instance().retrieve("to_remap")));
std::set<detid_t> resultDetIDs = result->getSpectrum(0)->getDetectorIDs(); auto resultDetIDs = result->getSpectrum(0)->getDetectorIDs();
TS_ASSERT(detIDs == resultDetIDs); TS_ASSERT(detIDs == resultDetIDs);
// Clean up workspace // Clean up workspace
......
...@@ -203,7 +203,7 @@ public: ...@@ -203,7 +203,7 @@ public:
// Now let's test the grouping of detector UDETS to groups // Now let's test the grouping of detector UDETS to groups
for (size_t wi = 0; wi < output->getNumberHistograms(); wi++) { for (size_t wi = 0; wi < output->getNumberHistograms(); wi++) {
// This is the list of the detectors (grouped) // This is the list of the detectors (grouped)
std::set<detid_t> mylist = output->getSpectrum(wi)->getDetectorIDs(); auto mylist = output->getSpectrum(wi)->getDetectorIDs();
// 1024 pixels in a bank // 1024 pixels in a bank
TS_ASSERT_EQUALS(mylist.size(), bankWidthInPixels * bankWidthInPixels); TS_ASSERT_EQUALS(mylist.size(), bankWidthInPixels * bankWidthInPixels);
} }
......
...@@ -61,11 +61,10 @@ public: ...@@ -61,11 +61,10 @@ public:
API::ISpectrum *spectrum1 = workspace->getSpectrum(0); API::ISpectrum *spectrum1 = workspace->getSpectrum(0);
Geometry::Instrument_const_sptr instrument = workspace->getInstrument(); Geometry::Instrument_const_sptr instrument = workspace->getInstrument();
std::set<detid_t> detids = spectrum1->getDetectorIDs(); auto detids = spectrum1->getDetectorIDs();
TS_ASSERT_EQUALS(detids.size(), 1); TS_ASSERT_EQUALS(detids.size(), 1);
detid_t detid = 0; detid_t detid = 0;
std::set<detid_t>::iterator it; for (auto it = detids.begin(); it != detids.end(); ++it) {
for (it = detids.begin(); it != detids.end(); ++it) {
detid = *it; detid = *it;
} }
Geometry::IDetector_const_sptr detector = instrument->getDetector(detid); Geometry::IDetector_const_sptr detector = instrument->getDetector(detid);
...@@ -172,11 +171,10 @@ public: ...@@ -172,11 +171,10 @@ public:
API::ISpectrum *spectrum1 = workspace->getSpectrum(wsindex); API::ISpectrum *spectrum1 = workspace->getSpectrum(wsindex);
Geometry::Instrument_const_sptr instrument = workspace->getInstrument(); Geometry::Instrument_const_sptr instrument = workspace->getInstrument();
std::set<detid_t> detids = spectrum1->getDetectorIDs(); auto detids = spectrum1->getDetectorIDs();
TS_ASSERT_EQUALS(detids.size(), 1); TS_ASSERT_EQUALS(detids.size(), 1);
detid_t detid = 0; detid_t detid = 0;
std::set<detid_t>::iterator it; for (auto it = detids.begin(); it != detids.end(); ++it) {
for (it = detids.begin(); it != detids.end(); ++it) {
detid = *it; detid = *it;
} }
Geometry::IDetector_const_sptr detector = instrument->getDetector(detid); Geometry::IDetector_const_sptr detector = instrument->getDetector(detid);
...@@ -195,11 +193,10 @@ public: ...@@ -195,11 +193,10 @@ public:
API::ISpectrum *spectrum1 = workspace->getSpectrum(wsindex); API::ISpectrum *spectrum1 = workspace->getSpectrum(wsindex);
Geometry::Instrument_const_sptr instrument = workspace->getInstrument(); Geometry::Instrument_const_sptr instrument = workspace->getInstrument();
std::set<detid_t> detids = spectrum1->getDetectorIDs(); auto detids = spectrum1->getDetectorIDs();
TS_ASSERT_EQUALS(detids.size(), 1); TS_ASSERT_EQUALS(detids.size(), 1);
detid_t thisdetid = 0; detid_t thisdetid = 0;
std::set<detid_t>::iterator it; for (auto it = detids.begin(); it != detids.end(); ++it) {
for (it = detids.begin(); it != detids.end(); ++it) {
thisdetid = *it; thisdetid = *it;
} }
......
...@@ -113,7 +113,7 @@ private: ...@@ -113,7 +113,7 @@ private:
TS_ASSERT_THROWS_NOTHING(spectrum = outputWS->getSpectrum(0)); TS_ASSERT_THROWS_NOTHING(spectrum = outputWS->getSpectrum(0));
if (spectrum) { if (spectrum) {
TS_ASSERT_EQUALS(spectrum->getSpectrumNo(), specID); TS_ASSERT_EQUALS(spectrum->getSpectrumNo(), specID);
std::set<detid_t> detids = spectrum->getDetectorIDs(); auto detids = spectrum->getDetectorIDs();
TS_ASSERT_EQUALS(detids.size(), 1); TS_ASSERT_EQUALS(detids.size(), 1);
const detid_t id = *(detids.begin()); const detid_t id = *(detids.begin());
TS_ASSERT_EQUALS(id, detID); TS_ASSERT_EQUALS(id, detID);
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
// 4. Check output // 4. Check output
for (size_t ih = 0; ih < ws4->getNumberHistograms(); ih++) { for (size_t ih = 0; ih < ws4->getNumberHistograms(); ih++) {
std::set<detid_t> tempdetids = ws4->getDetectorIDs(ih); auto tempdetids = ws4->getDetectorIDs(ih);
detid_t tempdetid = *(tempdetids.begin()); detid_t tempdetid = *(tempdetids.begin());
TS_ASSERT_EQUALS(tempdetids.size(), 1); TS_ASSERT_EQUALS(tempdetids.size(), 1);
TS_ASSERT_DELTA(ws4->getValue(tempdetid), ws1->getValue(tempdetid), 1); TS_ASSERT_DELTA(ws4->getValue(tempdetid), ws1->getValue(tempdetid), 1);
......
...@@ -279,9 +279,8 @@ public: ...@@ -279,9 +279,8 @@ public:
<< ".\n"; << ".\n";
return; return;
} else { } else {
std::set<detid_t> detidset = spec->getDetectorIDs(); auto detidset = spec->getDetectorIDs();
set<detid_t>::iterator setiter; for (auto setiter = detidset.begin(); setiter != detidset.end(); ++setiter)
for (setiter = detidset.begin(); setiter != detidset.end(); ++setiter)
cout << "WorkspaceIndex = " << i << ": Detector ID = " << *setiter cout << "WorkspaceIndex = " << i << ": Detector ID = " << *setiter
<< ".\n"; << ".\n";
} }
......
...@@ -583,7 +583,7 @@ public: ...@@ -583,7 +583,7 @@ public:
//But two detector IDs in each one //But two detector IDs in each one
for (int i=0; i<3; i++) for (int i=0; i<3; i++)
{ {
std::set<detid_t>::const_iterator detIT = work_out->getSpectrum(i)->getDetectorIDs().begin(); auto detIT = work_out->getSpectrum(i)->getDetectorIDs().begin();
TS_ASSERT_EQUALS( *detIT, 0+i ); TS_ASSERT_EQUALS( *detIT, 0+i );
if (DO_PLUS) if (DO_PLUS)
{ {
......
...@@ -354,10 +354,9 @@ void AnvredCorrection::execEvent() { ...@@ -354,10 +354,9 @@ void AnvredCorrection::execEvent() {
} }
correctionFactors->getOrAddEventList(i) += events; correctionFactors->getOrAddEventList(i) += events;
std::set<detid_t> &dets = eventW->getEventList(i).getDetectorIDs(); auto &dets = eventW->getEventList(i).getDetectorIDs();
std::set<detid_t>::iterator j; for (auto const &det : dets)
for (j = dets.begin(); j != dets.end(); ++j) correctionFactors->getOrAddEventList(i).addDetectorID(det);
correctionFactors->getOrAddEventList(i).addDetectorID(*j);
// When focussing in place, you can clear out old memory from the input one! // When focussing in place, you can clear out old memory from the input one!
if (inPlace) { if (inPlace) {
eventW->getEventList(i).clear(); eventW->getEventList(i).clear();
......
...@@ -109,7 +109,7 @@ void SaveDetectorsGrouping::createGroupDetectorIDMap( ...@@ -109,7 +109,7 @@ void SaveDetectorsGrouping::createGroupDetectorIDMap(
<< " has no spectrum. Impossible!" << std::endl; << " has no spectrum. Impossible!" << std::endl;
throw; throw;
} }
std::set<detid_t> detids = mspec->getDetectorIDs(); auto detids = mspec->getDetectorIDs();
if (detids.size() != 1) { if (detids.size() != 1) {
g_log.error() << "Spectrum " << mspec->getSpectrumNo() << " has " g_log.error() << "Spectrum " << mspec->getSpectrumNo() << " has "
<< detids.size() << " detectors. Not allowed situation!" << detids.size() << " detectors. Not allowed situation!"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment