mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
tsquash
This commit is contained in:
@ -105,11 +105,19 @@ template <class T, class Allocator = std::allocator<T>> class Result {
|
||||
*/
|
||||
T squash() const { return Squash(vec); }
|
||||
|
||||
T tsquash(const std::string &error_msg) {
|
||||
if (equal())
|
||||
return vec.front();
|
||||
else
|
||||
throw RuntimeError(error_msg);
|
||||
}
|
||||
/**
|
||||
* If all elements are equal return the front value, otherwise
|
||||
* return the supplied default value
|
||||
*/
|
||||
T squash(T default_value) const { return Squash(vec, default_value); }
|
||||
T squash(const T &default_value) const {
|
||||
return Squash(vec, default_value);
|
||||
}
|
||||
|
||||
/** Test whether all elements of the result are equal */
|
||||
bool equal() const noexcept { return allEqual(vec); }
|
||||
|
@ -1487,7 +1487,9 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns external sampling source
|
||||
*/
|
||||
int getExternalSamplingSource(int detPos = -1);
|
||||
int getExternalSamplingSource(int detPos = -1); //
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Set external sampling enable (CTB only)
|
||||
@ -1592,6 +1594,8 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int enableGapPixels(int val = -1, int detPos = -1); //
|
||||
|
||||
|
||||
void setGapPixelsEnable(bool enable, sls::Positions pos = {});
|
||||
/**
|
||||
* Sets the number of trim energies and their value (Eiger)
|
||||
*
|
||||
|
Reference in New Issue
Block a user