This commit is contained in:
Erik Frojdh 2019-08-08 17:34:25 +02:00
parent dc24cfb9c3
commit cc0f1d9fcd
3 changed files with 55 additions and 18 deletions

View File

@ -411,7 +411,8 @@ class Detector {
* @param tb 1 to include trimbits, 0 to exclude
* @param pos detector position
*/
void setThresholdEnergy(int value, defs::detectorSettings sett = defs::GET_SETTINGS,
void setThresholdEnergy(int value,
defs::detectorSettings sett = defs::GET_SETTINGS,
int tb = 1, Positions pos = {});
/**
@ -733,10 +734,22 @@ class Detector {
/**
* [Eiger] not 4 bit mode
* Fills in gap pixels in data
*/
*/
void setGapPixelsEnable(bool enable, Positions pos = {});
Result<bool> getGapPixelEnable(Positions pos = {}) const;
/**[Eiger] */
void setAllTrimbits(int value, Positions pos = {});
/** [Eiger] TODO! only Eiger? */
void setFlippedData(defs::dimension d, bool flipped, Positions pos = {});
Result<bool> getFlippedData(defs::dimension d, Positions pos = {}) const;
void setRxPadDeactivatedMod(bool pad, Positions pos = {});
Result<bool> getRxPadDeactivatedMod(Positions pos = {}) const;
};
} // namespace sls

View File

@ -1564,7 +1564,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position
* @returns 1 for flipped, else 0
*/
int getFlippedData(dimension d = X, int detPos = -1);
int getFlippedData(dimension d = X, int detPos = -1); //
/**
* Sets the enable which determines if
@ -1574,7 +1574,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position
* @returns enable flipped data across x or y axis
*/
int setFlippedData(dimension d = X, int value = -1, int detPos = -1);
int setFlippedData(dimension d = X, int value = -1, int detPos = -1); //
/**
* Sets all the trimbits to a particular value (Eiger)
@ -1582,7 +1582,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param detPos -1 for all detectors in list or specific detector position
* @returns OK or FAIL
*/
int setAllTrimbits(int val, int detPos = -1);
int setAllTrimbits(int val, int detPos = -1); //
/**
* Enable gap pixels, only for Eiger and for 8,16 and 32 bit mode. (Eiger)
@ -1590,7 +1590,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
* @param val 1 sets, 0 unsets, -1 gets
* @returns gap pixel enable or -1 for error
*/
int enableGapPixels(int val = -1, int detPos = -1);
int enableGapPixels(int val = -1, int detPos = -1); //
/**
* Sets the number of trim energies and their value (Eiger)

View File

@ -290,7 +290,8 @@ Result<int> Detector::getThresholdEnergy(Positions pos) const {
return pimpl->Parallel(&slsDetector::getThresholdEnergy, pos);
}
void Detector::setThresholdEnergy(int value, defs::detectorSettings sett, int tb, Positions pos) {
void Detector::setThresholdEnergy(int value, defs::detectorSettings sett,
int tb, Positions pos) {
pimpl->Parallel(&slsDetector::setThresholdEnergy, pos, value, sett, tb);
}
@ -589,32 +590,55 @@ Result<int> Detector::getThresholdTemperature(Positions pos) const {
return pimpl->Parallel(&slsDetector::setThresholdTemperature, pos, -1);
}
void Detector::pulseChip(int n, Positions pos){
void Detector::pulseChip(int n, Positions pos) {
pimpl->Parallel(&slsDetector::pulseChip, pos, n);
}
void Detector::pulsePixelNMove(int n, int x, int y, Positions pos){
void Detector::pulsePixelNMove(int n, int x, int y, Positions pos) {
pimpl->Parallel(&slsDetector::pulsePixelNMove, pos, n, x, y);
}
void Detector::pulsePixel(int n, int x, int y, Positions pos){
void Detector::pulsePixel(int n, int x, int y, Positions pos) {
pimpl->Parallel(&slsDetector::pulsePixel, pos, n, x, y);
}
Result<std::vector<int>> Detector::getTrimEn(Positions pos) const{
Result<std::vector<int>> Detector::getTrimEn(Positions pos) const {
return pimpl->Parallel(&slsDetector::getTrimEn, pos);
}
void Detector::setTrimEn(std::vector<int> energies, Positions pos){
void Detector::setTrimEn(std::vector<int> energies, Positions pos) {
pimpl->Parallel(&slsDetector::setTrimEn, pos, energies);
}
void Detector::setGapPixelsEnable(bool enable, Positions pos){
pimpl->Parallel(&slsDetector::enableGapPixels, pos, static_cast<int>(enable));
void Detector::setGapPixelsEnable(bool enable, Positions pos) {
pimpl->Parallel(&slsDetector::enableGapPixels, pos,
static_cast<int>(enable));
}
Result<bool> Detector::getGapPixelEnable(Positions pos) const{
Result<bool> Detector::getGapPixelEnable(Positions pos) const {
return pimpl->Parallel(&slsDetector::enableGapPixels, pos, -1);
}
void Detector::setAllTrimbits(int value, Positions pos) {
pimpl->Parallel(&slsDetector::setAllTrimbits, pos, value);
}
void Detector::setFlippedData(defs::dimension d, bool flipped, Positions pos) {
pimpl->Parallel(&slsDetector::setFlippedData, pos, d,
static_cast<int>(flipped));
}
Result<bool> Detector::getFlippedData(defs::dimension d, Positions pos) const {
return pimpl->Parallel(&slsDetector::getFlippedData, pos, d);
}
void Detector::setRxPadDeactivatedMod(bool pad, Positions pos) {
pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos,
static_cast<int>(pad));
}
Result<bool> Detector::getRxPadDeactivatedMod(Positions pos) const {
return pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos, -1);
}
} // namespace sls