added getPatternLoop

This commit is contained in:
Erik Frojdh
2019-04-18 09:33:14 +02:00
parent 849d3ba049
commit f591adccb8
8 changed files with 127 additions and 50 deletions

View File

@@ -109,6 +109,19 @@ minusOneIfDifferent(const std::vector<std::vector<T>> &container) {
return std::vector<T>{-1};
}
template <typename T, size_t size>
std::array<T, size>
minusOneIfDifferent(const std::vector<std::array<T,size>> &container) {
if (allEqual(container))
return container.front();
std::array<T,size> arr;
arr.fill(static_cast<T>(-1));
return arr;
}
} // namespace sls
#endif // CONTAINER_UTILS_H

View File

@@ -1040,7 +1040,6 @@ typedef struct {
int *chanregs; /**< is the pointer to the array of the channel registers */
#ifdef __cplusplus
sls_detector_module()
: serialnumber(0), nchan(0), nchip(0), ndac(0), reg(0), iodelay(0),
tau(0), eV(0), dacs(nullptr), chanregs(nullptr) {}
@@ -1049,8 +1048,6 @@ typedef struct {
detParameters parameters{type};
int nch = parameters.nChanX * parameters.nChanY;
int nc = parameters.nChipX * parameters.nChipY;
// int nd = parameters.nDacs;
ndac = parameters.nDacs;
nchip = nc;
nchan = nch * nc;