formatting

This commit is contained in:
2023-11-07 14:52:14 +01:00
parent 397e846509
commit 01e4bcb47e
12 changed files with 81 additions and 84 deletions

View File

@ -886,7 +886,8 @@ void Detector::stopDetector(Positions pos) {
// idle before stopping will return running (after async start script) when
// getting status after, which will then be stopped again.
while (!status.contains_only(defs::runStatus::IDLE, defs::runStatus::STOPPED)){
while (!status.contains_only(defs::runStatus::IDLE,
defs::runStatus::STOPPED)) {
if (status.any(defs::runStatus::ERROR)) {
throw RuntimeError("Could not stop detector. At least one module "
"returned error status.");

View File

@ -1229,17 +1229,17 @@ int DetectorImpl::acquire() {
// handle jf sync issue (master idle, slaves stopped)
if (statusList.contains_only(IDLE, STOPPED)) {
status = STOPPED;
}
else
} else
status = statusList.squash(RUNNING);
}
// progress
auto a = Parallel(&Module::getReceiverProgress, {});
double progress = (*std::max_element(a.begin(), a.end()));
// callback
acquisition_finished(progress, static_cast<int>(status), acqFinished_p);
acquisition_finished(progress, static_cast<int>(status),
acqFinished_p);
}
clock_gettime(CLOCK_REALTIME, &end);

View File

@ -84,9 +84,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
*/
virtual ~DetectorImpl();
template <class CT> struct NonDeduced {
using type = CT;
};
template <class CT> struct NonDeduced { using type = CT; };
template <typename RT, typename... CT>
Result<RT> Parallel(RT (Module::*somefunc)(CT...),
std::vector<int> positions,