Commit a18e5996 authored by Locatelli's avatar Locatelli
Browse files

Revue of MPDA acquisition

parent 4d921b85
......@@ -40,22 +40,21 @@ DualCount::DualCount(const std::string& name) :
*/
void DualCount::postConfiguration() {
Count::postConfiguration();
m_KineticGate.copy(gate);
m_KineticAcquisitionControllers.resize(nDetectors());
// for (int32 i = 0; i < nDetectors(); ++i) {
m_KineticAcquisitionControllers[0].copy(acquisitionControllers[0]);
// }
registerUpdater(m_KineticGate->time, &DualCount::updateActualTime, this);
registerUpdater(m_KineticGate->timeSetPoint, &DualCount::updateTimeSetPoint, this);
registerUpdater(m_KineticGate->nbRepaint, &DualCount::updateNbRepaint, this);
for (int32 i = 0; i < nDetectors(); ++i) {
m_KineticAcquisitionControllers[0].copy(acquisitionControllers[0]);
}
registerUpdater(m_KineticAcquisitionControllers[0]->time, &DualCount::updateActualTime, this);
registerUpdater(m_KineticAcquisitionControllers[0]->timeSetPoint, &DualCount::updateTimeSetPoint, this);
registerUpdater(m_KineticAcquisitionControllers[0]->nbRepaint, &DualCount::updateNbRepaint, this);
}
/*
* preStart
*/
void DualCount::preStart() {
m_KineticGate->slicesFile = slicesFile();
m_KineticAcquisitionControllers[0]->slicesFile = slicesFile();
m_KineticAcquisitionControllers[0]->nbRepaint.setpoint = localReps();
}
......@@ -71,9 +70,9 @@ void DualCount::gateStart() {
time100.setpoint = m_TimeSetPointSecond * 100;
time1000.setpoint = m_TimeSetPointSecond * 1000;
preset = m_TimeSetPointSecond * 1000.;
m_KineticGate->startCountingParallel(false);
m_KineticAcquisitionControllers[0]->startCountingParallel(false);
// wait kinetic ready
while(m_KineticGate->gateStatus() != acquisition::GateCommon::WAITFORSTART_STATUS) {
while(m_KineticAcquisitionControllers[0]->gateStatus() != acquisition::GateCommon::WAITFORSTART_STATUS) {
boost::this_thread::yield();
}
m_DPPTimeGate->startCountingCommand();
......@@ -93,7 +92,7 @@ void DualCount::gateSynchro() {
*/
void DualCount::pause() {
log(Level::s_Info) << "pause" << endlog;
m_KineticGate->pauseParallel(false);
m_KineticAcquisitionControllers[0]->pauseParallel(false);
m_DPPTimeGate->pauseParallel(false);
}
......@@ -101,7 +100,7 @@ void DualCount::pause() {
* resume
*/
void DualCount::resume() {
m_KineticGate->resumeParallel(false);
m_KineticAcquisitionControllers[0]->resumeParallel(false);
m_DPPTimeGate->resumeParallel(false);
log(Level::s_Info) << "continu" << endlog;
}
......@@ -112,7 +111,7 @@ void DualCount::resume() {
void DualCount::stop() {
m_DPPTimeGate->stopParallel(false);
m_KineticGate->stopParallel(false);
m_KineticAcquisitionControllers[0]->stopParallel(false);
log(Level::s_Info) << "stopped" << endlog;
......
Markdown is supported
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