void VESPERSEXAFSScanConfigurationView::updateRoiText() { switch((int)config_->fluorescenceDetector()){ case VESPERS::NoXRF: config_->setRoiInfoList(AMROIInfoList()); break; case VESPERS::SingleElement: config_->setRoiInfoList(*VESPERSBeamline::vespers()->vortexXRF1E()->roiInfoList()); break; case VESPERS::FourElement: config_->setRoiInfoList(*VESPERSBeamline::vespers()->vortexXRF4E()->roiInfoList()); break; case VESPERS::SingleElement | VESPERS::FourElement:{ AMROIInfoList list; AMROIInfoList singleElList = *VESPERSBeamline::vespers()->vortexXRF1E()->roiInfoList(); AMROIInfoList fourElList = *VESPERSBeamline::vespers()->vortexXRF4E()->roiInfoList(); for (int i = 0, count = singleElList.count(); i < count; i++) list.append(singleElList.at(i)); for (int i = 0, count = fourElList.count(); i < count; i++) list.append(fourElList.at(i)); config_->setRoiInfoList(list); break; } } updateAndSetRoiTextBox(int(config_->fluorescenceDetector())); }
void VESPERSScanController::addFourElementRegionsOfInterestMeasurements(AMScan *scan, AMROIInfoList list, bool addSuffix) { for (int i = 0, roiCount = list.count(); i < roiCount; i++){ if (addSuffix) scan->rawData()->addMeasurement(AMMeasurementInfo(list.at(i).name().remove(" ") % "-4el", list.at(i).name())); else scan->rawData()->addMeasurement(AMMeasurementInfo(list.at(i).name().remove(" "), list.at(i).name())); scan->addRawDataSource(new AMRawDataSource(scan->rawData(), scan->rawData()->measurementCount() - 1), false, true); } }