From 8973ef1aaae16a52c770cc65c21324c1287f0240 Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 20 May 2020 10:18:51 +0200 Subject: [PATCH] from timetest merge --- slsDetectorSoftware/src/Detector.cpp | 9 +-------- slsDetectorSoftware/src/Module.cpp | 8 +++----- slsDetectorSoftware/src/Module.h | 2 +- 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/slsDetectorSoftware/src/Detector.cpp b/slsDetectorSoftware/src/Detector.cpp index bb627f285..8af4d6ac7 100644 --- a/slsDetectorSoftware/src/Detector.cpp +++ b/slsDetectorSoftware/src/Detector.cpp @@ -1288,14 +1288,7 @@ void Detector::setGateDelay(int gateIndex, ns t, Positions pos) { Result> Detector::getGateDelayForAllGates(Positions pos) const { - auto t = pimpl->Parallel(&Module::getGateDelayForAllGates, pos); - Result> res(t.size()); - for (unsigned int i = 0; i < t.size(); ++i) { - for (unsigned int j = 0; j != 3; ++j) { - res[i][j] = static_cast(t[i][j]); - } - } - return res; + return pimpl->Parallel(&Module::getGateDelayForAllGates, pos); } // CTB/ Moench Specific diff --git a/slsDetectorSoftware/src/Module.cpp b/slsDetectorSoftware/src/Module.cpp index 49b865097..4953762ad 100644 --- a/slsDetectorSoftware/src/Module.cpp +++ b/slsDetectorSoftware/src/Module.cpp @@ -1063,7 +1063,6 @@ void Module::setExptime(int gateIndex, int64_t value) { std::array Module::getExptimeForAllGates() { static_assert(sizeof(time::ns) == 8, "ns needs to be 64bit"); return sendToDetector>(F_GET_EXPTIME_ALL_GATES); - } int64_t Module::getGateDelay(int gateIndex) { @@ -1081,10 +1080,9 @@ void Module::setGateDelay(int gateIndex, int64_t value) { } } -std::array Module::getGateDelayForAllGates() { - std::array retval; - sendToDetector(F_GET_GATE_DELAY_ALL_GATES, nullptr, retval); - return retval; +std::array Module::getGateDelayForAllGates() { + static_assert(sizeof(time::ns) == 8, "ns needs to be 64bit"); + return sendToDetector>(F_GET_GATE_DELAY_ALL_GATES); } int64_t Module::getPeriod() { return sendToDetector(F_GET_PERIOD); } diff --git a/slsDetectorSoftware/src/Module.h b/slsDetectorSoftware/src/Module.h index 81ced7b4a..923feee78 100644 --- a/slsDetectorSoftware/src/Module.h +++ b/slsDetectorSoftware/src/Module.h @@ -441,7 +441,7 @@ class Module : public virtual slsDetectorDefs { void setGateDelay(int gateIndex, int64_t value); /** [Mythen3] for all gates */ - std::array getGateDelayForAllGates(); + std::array getGateDelayForAllGates(); int64_t getPeriod();