If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. If you are using the VPN, then SSH will work normally.

Commit d2d17683 authored by acq's avatar acq

V1740 QDC

parent 167436ed
...@@ -194,11 +194,11 @@ void RealMpdaDPPDriver::start() { ...@@ -194,11 +194,11 @@ void RealMpdaDPPDriver::start() {
// HACK Emilio GG_PICKUP + V1724 FIGARO // HACK Emilio GG_PICKUP + V1724 FIGARO
value = 0x42101020; // PARAM READY GG_PICK UP //value = 0x42101020; // PARAM READY GG_PICK UP
owner()->write(0x10C8, Vme::LONGWORD_WIDTH, 1, (void*) &value); //owner()->write(0x10C8, Vme::LONGWORD_WIDTH, 1, (void*) &value);
value = 1; //value = 1;
owner()->write(0x100C, Vme::LONGWORD_WIDTH, 1, (void*) &value); //owner()->write(0x100C, Vme::LONGWORD_WIDTH, 1, (void*) &value);
//-------------------------------------------------------------- //--------------------------------------------------------------
...@@ -241,7 +241,7 @@ void RealMpdaDPPDriver::readInfos() { ...@@ -241,7 +241,7 @@ void RealMpdaDPPDriver::readInfos() {
*/ */
void RealMpdaDPPDriver::synchroniseRead() { void RealMpdaDPPDriver::synchroniseRead() {
if (m_DoOneSynchroRead == true) { if (m_DoOneSynchroRead == true) { // NOT USED WITH V1740 01/08/2018
// Do one time synchro read (do by detector and gate) // Do one time synchro read (do by detector and gate)
int32 value = 1; int32 value = 1;
owner()->write(FLUSH_DATA_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value); owner()->write(FLUSH_DATA_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
...@@ -253,8 +253,9 @@ void RealMpdaDPPDriver::synchroniseRead() { ...@@ -253,8 +253,9 @@ void RealMpdaDPPDriver::synchroniseRead() {
} while (((status & SYNCHRO_READ_READY_STATUS) == 0) && (++i < 2000)); } while (((status & SYNCHRO_READ_READY_STATUS) == 0) && (++i < 2000));
if (i >= 2000) { if (i >= 2000) {
cerr << "MPDA: Flush data timed out !!!" << endl; cerr << "MPDA: Flush data timed out !!!" << endl;
owner()->write(SOFT_RESET_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value); //owner()->write(SOFT_RESET_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
} }
//owner()->write(SOFT_RESET_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
read(); read();
if (owner()->useListMode() == true) { if (owner()->useListMode() == true) {
readListModeLast(m_BufferNumber); readListModeLast(m_BufferNumber);
...@@ -265,6 +266,7 @@ void RealMpdaDPPDriver::synchroniseRead() { ...@@ -265,6 +266,7 @@ void RealMpdaDPPDriver::synchroniseRead() {
} }
// HACK EMilio // HACK EMilio
owner()->m_SynchroniseReadTerminated = true; owner()->m_SynchroniseReadTerminated = true;
} }
/* /*
...@@ -610,7 +612,60 @@ void RealMpdaDPPDriver::readCurves(int32 localStatus) { ...@@ -610,7 +612,60 @@ void RealMpdaDPPDriver::readCurves(int32 localStatus) {
//} else if (modelname == "CFD") { //} else if (modelname == "CFD") {
//} else if (modelname == "CFD") { //} else if (modelname == "CFD") {
} else { } else if (modelname == "V1740D") {
int32 size = (((localStatus >> 1) & 0xFFFF) * 2) - 2;
if (size > 0) {
owner()->setCurve1size(size);
owner()->setCurve2size(size);
owner()->setCurve3size(size);
owner()->setCurve4size(size);
int32 buf[size];
int32* buf1 = owner()->curve1();
int32* buf2 = owner()->curve2();
int32* buf3 = owner()->curve3();
int32* buf4 = owner()->curve4();
Counter c1;
owner()->read(m_AddressA32, Vme::A32_ACCESS, SCOPE_DATA, Vme::LONGWORD_WIDTH, size / 2, (void*) buf);
//cout << "Read Curves size : " << size << " 32bits in " << c1.getTime() << " s" << endl;
for (int i = 0; i < size / 2; ++i) {
buf1[i * 2] = buf[i] & 0xFFF;
buf1[i * 2 + 1] = (buf[i] >> 16) & 0XFFF;;//buf[i] & 0xFFF;
buf2[i * 2] = 0;// (buf[i] >> 16) & 0XFFF;
buf2[i * 2 + 1] = 0;// (buf[i] >> 16) & 0XFFF;
/*if (((buf[i] >> 29) & 0X1) == 1) {
buf2[i * 2] = buf2[i * 2] | ~((1 << 14) - 1);
buf2[i * 2 + 1] = buf2[i * 2 + 1] | ~((1 << 14) - 1);
}*/
buf3[i * 2] = ((buf[i] >> 12) & 0X1) * 1000;
buf3[i * 2 + 1] = ((buf[i] >> 28) & 0X1) * 1000;
buf4[i * 2] = ((buf[i] >> 13) & 0X1) * 1000;
buf4[i * 2 + 1] = ((buf[i] >> 29) & 0X1) * 1000;
}
}
int32 value = 0;
owner()->write(SCOPE_READ_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
value = 1;
owner()->write(SCOPE_READ_REG, Vme::LONGWORD_WIDTH, 1, (void*) &value);
owner()->curve1.sendEvent();
owner()->curve2.sendEvent();
owner()->curve3.sendEvent();
owner()->curve4.sendEvent();
} else {
int32 size = ((localStatus >> 1) & 0xFFFF); int32 size = ((localStatus >> 1) & 0xFFFF);
if (size > 0) { if (size > 0) {
......
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