mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
moench: set threshold energy and set roi sets jsonheader
This commit is contained in:
@ -1313,6 +1313,14 @@ int slsDetector::setThresholdEnergy(int e_eV, detectorSettings isettings, int tb
|
|||||||
return thisDetector->currentThresholdEV;
|
return thisDetector->currentThresholdEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// moench - send threshold energy to processor
|
||||||
|
else if (thisDetector->myDetectorType == MOENCH) {
|
||||||
|
std::string result = setAdditionalJsonParameter("threshold", std::to_string(e_eV));
|
||||||
|
if (result == std::to_string(e_eV))
|
||||||
|
return e_eV;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
FILE_LOG(logERROR) << "Set threshold energy not implemented for this detector";
|
FILE_LOG(logERROR) << "Set threshold energy not implemented for this detector";
|
||||||
setErrorMask((getErrorMask()) | (OTHER_ERROR_CODE));
|
setErrorMask((getErrorMask()) | (OTHER_ERROR_CODE));
|
||||||
return -1;
|
return -1;
|
||||||
@ -3039,6 +3047,18 @@ int slsDetector::setROI(int n, ROI roiLimits[]) {
|
|||||||
setErrorMask((getErrorMask())|(COULDNOT_SET_ROI));
|
setErrorMask((getErrorMask())|(COULDNOT_SET_ROI));
|
||||||
if (thisDetector->myDetectorType == CHIPTESTBOARD || thisDetector->myDetectorType == MOENCH) {
|
if (thisDetector->myDetectorType == CHIPTESTBOARD || thisDetector->myDetectorType == MOENCH) {
|
||||||
getTotalNumberOfChannels();
|
getTotalNumberOfChannels();
|
||||||
|
|
||||||
|
// moench (send to processor)
|
||||||
|
if (thisDetector->myDetectorType == MOENCH) {
|
||||||
|
std::ostringstream os;
|
||||||
|
os << "[" << roiLimits[0].xmin << ", " << roiLimits[0].xmax << ", " <<
|
||||||
|
roiLimits[0].ymin << ", " << roiLimits[0].ymax << "]";
|
||||||
|
std::string sroi = os.str();
|
||||||
|
std::string result = setAdditionalJsonParameter("roi", sroi);
|
||||||
|
if (result == sroi)
|
||||||
|
return OK;
|
||||||
|
return FAIL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user