Commit 60c36bb2 authored by Alejandro Homs Puron's avatar Alejandro Homs Puron Committed by operator for beamline
Browse files

Check for not Running status at the end of acquisition:

* Jungfrau switches to Stopped instead of Idle if stopped
parent 1af420e6
......@@ -80,6 +80,7 @@ class Model
virtual void processBadItemFrame(FrameType frame, int item,
char *bptr) = 0;
virtual bool isAcqActive();
virtual bool isXferActive() = 0;
virtual void setThreadCPUAffinity(const CPUAffinityList& aff_list) = 0;
......
Subproject commit c985961ef61c7a0713094c2a72139a26feda96fe
Subproject commit 62dae8adb6408680d11e9f3ec2bb56bac2437dd5
......@@ -299,7 +299,7 @@ void Camera::AcqThread::stopAcq()
DEB_TRACE() << "calling stopDetector";
det->stopDetector();
Timestamp t0 = Timestamp::now();
while (m_cam->getDetStatus() != Defs::Idle)
while (m_cam->m_model->isAcqActive())
Sleep(m_cam->m_abort_sleep_time);
double milli_sec = (Timestamp::now() - t0) * 1e3;
DEB_TRACE() << "Abort -> Idle: " << DEB_VAR1(milli_sec);
......
......@@ -115,3 +115,11 @@ void Model::processFinishInfo(const FinishInfo& finfo)
m_cam->reportException(e, "Model::processFinishInfo");
}
}
bool Model::isAcqActive()
{
DEB_MEMBER_FUNCT();
bool acq_active = (m_cam->getDetStatus() == Defs::Running);
DEB_RETURN() << DEB_VAR1(acq_active);
return acq_active;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment