From c2639854fac99b66412a0abb31086aacc455674a Mon Sep 17 00:00:00 2001 From: Anna Bergamaschi Date: Thu, 5 Mar 2020 14:53:24 +0100 Subject: [PATCH] ctb gui works with moench detector --- ctbGui/ctbAcquisition.cpp | 5 +- ctbGui/ctbDacs.cpp | 27 +- ctbGui/ctbDacs.h | 4 +- ctbGui/ctbDefs.h | 6 +- ctbGui/ctbMain.cpp | 6 +- ctbGui/ctbPattern.cpp | 77 +-- examples/jctb_moench03_T1.config | 501 ++++++++++++++++++ examples/moench03_T1.config | 24 +- .../moenchExecutables/moenchZmqProcess.cpp | 1 + 9 files changed, 596 insertions(+), 55 deletions(-) create mode 100644 examples/jctb_moench03_T1.config diff --git a/ctbGui/ctbAcquisition.cpp b/ctbGui/ctbAcquisition.cpp index b104d4544..fa5bbb9a0 100755 --- a/ctbGui/ctbAcquisition.cpp +++ b/ctbGui/ctbAcquisition.cpp @@ -888,7 +888,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") { // cout <<"global plot is " << globalPlot << endl; // cout << "*******************************************" <progressIndex << " npoints:" << data->npoints << " npy: " << data->npy << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl; + cout <<"------Plot: "<< index << " prog:" << data->progressIndex << " nx:" << data->nx << " ny: " << data->ny << " " << data->fileName << " bytes: " << data->databytes << " dr:"<< data->dynamicRange << " fi: " << data ->fileIndex << endl; if (globalPlot || cbGetPedestal->IsOn()) { //#ifdef TESTADC // cout <<"------"<< index << " " << ip << " " << data->npoints << endl; @@ -984,7 +984,8 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") { for (int y=0; ygetValue(data->data,x,y); - // cout << x << " " <getChannel(data->data,x,y); + cout << x << " " <IsOn()) { if (photonFinder) { photonFinder->addToPedestal(aval,x,y); diff --git a/ctbGui/ctbDacs.cpp b/ctbGui/ctbDacs.cpp index 5a8c5a600..b033401f3 100755 --- a/ctbGui/ctbDacs.cpp +++ b/ctbGui/ctbDacs.cpp @@ -108,15 +108,26 @@ string ctbDac::getLabel() { } +int ctbDac::getMoenchDacId() { + slsDetectorDefs::dacIndex moenchDacIndices[8] = {slsDetectorDefs::VBP_COLBUF, slsDetectorDefs::VIPRE, slsDetectorDefs::VIN_CM, slsDetectorDefs::VB_SDA, slsDetectorDefs::VCASC_SFP, slsDetectorDefs::VOUT_CM, slsDetectorDefs::VIPRE_CDS, slsDetectorDefs::IBIAS_SFP}; + + if (id >= 8) { + return id; + } + return static_cast(moenchDacIndices[id]); +} void ctbDac::setValue(Long_t a) {setValue();} void ctbDac::setValue() { - cout << "setting dac! "<< id << " value " << dacsEntry->GetIntNumber() << " units " << dacsUnit->IsOn() << endl; try { - myDet->setDAC(static_cast(id), dacsEntry->GetIntNumber(), dacsUnit->IsOn()); + int sid = id; + if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { + sid = getMoenchDacId(); + } + myDet->setDAC(static_cast(sid), dacsEntry->GetIntNumber(), dacsUnit->IsOn()); } CATCH_DISPLAY ("Could not set dac " + to_string(id) + ".", "ctbDac::setValue") getValue(); @@ -128,7 +139,11 @@ void ctbDac::setOn(Bool_t b) { setValue(); } else { try { - myDet->setDAC(static_cast(id), -100, false); + int sid = id; + if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { + sid = getMoenchDacId(); + } + myDet->setDAC(static_cast(sid), -100, false); } CATCH_DISPLAY ("Could not power off dac " + to_string(id) + ".", "ctbDac::setOn") } getValue(); @@ -136,7 +151,11 @@ void ctbDac::setOn(Bool_t b) { int ctbDac::getValue() { try { - int val = myDet->getDAC(static_cast(id), dacsUnit->IsOn()).tsquash("Different values"); + int sid = id; + if (myDet->getDetectorType().squash() == slsDetectorDefs::MOENCH) { + sid = getMoenchDacId(); + } + int val = myDet->getDAC(static_cast(sid), dacsUnit->IsOn()).tsquash("Different values"); cout << "dac " << id << " " << val << endl; dacsValue->SetText(to_string(val).c_str()); if (val >= 0) { diff --git a/ctbGui/ctbDacs.h b/ctbGui/ctbDacs.h index 620135848..aa19720f3 100755 --- a/ctbGui/ctbDacs.h +++ b/ctbGui/ctbDacs.h @@ -45,7 +45,7 @@ class ctbDac : public TGHorizontalFrame { int setLabel(char *tit, int mv); string getLabel(); - +int getMoenchDacId(); ClassDef(ctbDac,0) @@ -54,8 +54,6 @@ class ctbDac : public TGHorizontalFrame { class ctbDacs : public TGGroupFrame { private: - - ctbDac *dacs[NDACS+2]; sls::Detector* myDet; diff --git a/ctbGui/ctbDefs.h b/ctbGui/ctbDefs.h index 37a5b7efc..83e06f2ac 100755 --- a/ctbGui/ctbDefs.h +++ b/ctbGui/ctbDefs.h @@ -71,14 +71,14 @@ class ctbDefs { std::string exceptionMessage, std::string source) { // because sls_detector_exceptions cannot be included - if (exceptionMessage.find("hared memory")) { + if (exceptionMessage.find("hared memory") != std::string::npos) { throw; } - if (exceptionMessage.find("annot connect")) { + if (exceptionMessage.find("annot connect") != std::string::npos) { throw; } cprintf(RED, "Warning (%s): %s [Caught Exception: %s]\n", source.c_str(), message.c_str(), exceptionMessage.c_str()); //return Message(qDefs::WARNING, message + std::string("\nCaught exception:\n") + exceptionMessage, source); }; -}; \ No newline at end of file +}; diff --git a/ctbGui/ctbMain.cpp b/ctbGui/ctbMain.cpp index 162a41638..393377b77 100755 --- a/ctbGui/ctbMain.cpp +++ b/ctbGui/ctbMain.cpp @@ -259,8 +259,10 @@ ctbMain::ctbMain(const TGWindow *p, sls::Detector *det) cout << "connect mtab" << endl; - - setReadoutMode(pat->getReadoutMode()); + try{ + setReadoutMode(pat->getReadoutMode()); + } CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode") + setADCEnable(adcs->setEnable()); setAnalogSamples(pat->getAnalogSamples()); setDigitalSamples(pat->getDigitalSamples()); diff --git a/ctbGui/ctbPattern.cpp b/ctbGui/ctbPattern.cpp index dca01c6b8..e8c4d6b60 100755 --- a/ctbGui/ctbPattern.cpp +++ b/ctbGui/ctbPattern.cpp @@ -1035,33 +1035,42 @@ void ctbPattern::readoutModeChanged(int flags) { } -int ctbPattern::getReadoutMode() { - try{ - auto retval = myDet->getReadoutMode().tsquash("Different values"); - switch(retval) { - case slsDetectorDefs::ANALOG_AND_DIGITAL: - cout << "analog and digital" << endl; - cbAnalog->SetOn(kTRUE); - cbDigital->SetOn(kTRUE); - break; - case slsDetectorDefs::DIGITAL_ONLY: - cout << "digital only" << endl; - cbAnalog->SetOn(kFALSE); - cbDigital->SetOn(kTRUE); - break; - case slsDetectorDefs::ANALOG_ONLY: - cout << "analog only" << endl; - cbAnalog->SetOn(kTRUE); - cbDigital->SetOn(kFALSE); - break; - default: - throw("unknown readout flag"); - } +int ctbPattern::getReadoutMode() { + int retval=slsDetectorDefs::ANALOG_ONLY; + + if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) { + try{ + retval = myDet->getReadoutMode().tsquash("Different values"); + } CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode") + + switch(retval) { + case slsDetectorDefs::ANALOG_AND_DIGITAL: + cout << "analog and digital" << endl; + cbAnalog->SetOn(kTRUE); + cbDigital->SetOn(kTRUE); + break; + case slsDetectorDefs::DIGITAL_ONLY: + cout << "digital only" << endl; + cbAnalog->SetOn(kFALSE); + cbDigital->SetOn(kTRUE); + break; + case slsDetectorDefs::ANALOG_ONLY: + cout << "analog only" << endl; + cbAnalog->SetOn(kTRUE); + cbDigital->SetOn(kFALSE); + break; + default: + throw("unknown readout flag"); + } + } else { + cbAnalog->SetOn(kTRUE); + cbDigital->SetOn(kFALSE); + } + Emit("readoutModeChanged(int)",static_cast(retval)); return retval; - } CATCH_DISPLAY ("Could not get readout flags", "ctbPattern::getReadoutMode") - - return -1; + + } int ctbPattern::getAnalogSamples() { @@ -1075,13 +1084,17 @@ int ctbPattern::getAnalogSamples() { return -1; } -int ctbPattern::getDigitalSamples() { - try{ - auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values"); - eDigitalSamples->SetNumber((Double_t)retval); - Emit("digitalSamplesChanged(const int)", eDigitalSamples->GetNumber()); - return eDigitalSamples->GetNumber(); - } CATCH_DISPLAY ("Could not get number of triggers.", "ctbPattern::update") +int ctbPattern::getDigitalSamples() { + int retval=0; + if (myDet->getDetectorType().squash() == slsDetectorDefs::CHIPTESTBOARD) { + try{ + auto retval = myDet->getNumberOfDigitalSamples().tsquash("Different values"); + } CATCH_DISPLAY ("Could not get number of digital samples.", "ctbPattern::getDigitalSamples") + } + eDigitalSamples->SetNumber((Double_t)retval); + Emit("digitalSamplesChanged(const int)", eDigitalSamples->GetNumber()); + return eDigitalSamples->GetNumber(); + return -1; } diff --git a/examples/jctb_moench03_T1.config b/examples/jctb_moench03_T1.config new file mode 100644 index 000000000..238de7d02 --- /dev/null +++ b/examples/jctb_moench03_T1.config @@ -0,0 +1,501 @@ +initialchecks 0 +############################################# +### edit with hostname or IP address of your detector +############################################ +hostname bchip181+ +runclk 40 +adcclk 20 +dbitclk 40 + + + + +patword 0000 0000000000000000 +patword 0001 0000000000000000 +patword 0002 0008000900080000 +patword 0003 0008000900080000 +patword 0004 0008000900080000 +patword 0005 0008000900080000 +patword 0006 0008000900080000 +patword 0007 0008000900080000 +patword 0008 0008000900080000 +patword 0009 0008000900080000 +patword 000a 0008000900080000 +patword 000b 0008000900080000 +patword 000c 0008000900080000 +patword 000d 0008000900080000 +patword 000e 0008000900080000 +patword 000f 0008000900080000 +patword 0010 0008000900080000 +patword 0011 0008000900080000 +patword 0012 0008000900080000 +patword 0013 0008000900080000 +patword 0014 0008000900080000 +patword 0015 0008000900080000 +patword 0016 0008400900080020 +patword 0017 0008400900080020 +patword 0018 0008599f0418503a +patword 0019 0008599f0418503a +patword 001a 0108599f0418503a +patword 001b 0108599f0418503a +patword 001c 0108599f0418503a +patword 001d 0108599f0418503a +patword 001e 0108599f0418503a +patword 001f 0108599f0418503a +patword 0020 0108599f0418503a +patword 0021 0108599f0418503a +patword 0022 0108599f0418503a +patword 0023 0108599f0418503a +patword 0024 0108599f0418503a +patword 0025 0108599f0418503a +patword 0026 0108599f0418503a +patword 0027 0108599f0418503a +patword 0028 0108599f0418503a +patword 0029 0108599f0418503a +patword 002a 0108599f0418503a +patword 002b 0108599f0418503a +patword 002c 0108599f0418503a +patword 002d 0108599f0418503a +patword 002e 0108599f0418503a +patword 002f 0108599f0418503a +patword 0030 0108599f0418503a +patword 0031 0108599f0418503a +patword 0032 0108599f0418503a +patword 0033 0108599f0418503a +patword 0034 0108599f0418503a +patword 0035 0108599f0418503a +patword 0036 0108599f0418503a +patword 0037 0108599f0418503a +patword 0038 0108599f0418503a +patword 0039 0108599f0418503a +patword 003a 0108599f0418503a +patword 003b 0108599f0418503a +patword 003c 0108599f0418503a +patword 003d 0108599f0418503a +patword 003e 0108599f0418503a +patword 003f 0108599f0418503a +patword 0040 0108599f0418503a +patword 0041 0108599f0418503a +patword 0042 0108599f0418503a +patword 0043 0108599f0418503a +patword 0044 0108599f0418503a +patword 0045 0108599f0418503a +patword 0046 0108599f0418503a +patword 0047 0108599f0418503a +patword 0048 0108599f0418503a +patword 0049 0108599f0418503a +patword 004a 0108599f0418503a +patword 004b 0108599f0418503a +patword 004c 0108599f0418503a +patword 004d 0108599f0418503a +patword 004e 0108599f0418503a +patword 004f 0108599f0418503a +patword 0050 0108599f0418503a +patword 0051 0108599f0418503a +patword 0052 0108599f0418503a +patword 0053 0108599f0418503a +patword 0054 0108599f0418503a +patword 0055 0108599f0418503a +patword 0056 0108599f0418503a +patword 0057 0108599f0418503a +patword 0058 0108599f0418503a +patword 0059 0108599f0418503a +patword 005a 0108599f0418503a +patword 005b 0108599f0418503a +patword 005c 0108599f0418503a +patword 005d 0108599f0418503a +patword 005e 0108599f0418503a +patword 005f 0108599f0418503a +patword 0060 0108599f0418503a +patword 0061 0108599f0418503a +patword 0062 0108599f0418503a +patword 0063 0108599f0418503a +patword 0064 0108599f0418503a +patword 0065 0108599f0418503a +patword 0066 0108599f0418503a +patword 0067 0108599f0418503a +patword 0068 0108599f0418503a +patword 0069 0108599f0418503a +patword 006a 0108599f0418503a +patword 006b 0108599f0418503a +patword 006c 0108599f0418503a +patword 006d 0108599f0418503a +patword 006e 0108599f0418503a +patword 006f 0108599f0418503a +patword 0070 0108599f0418503a +patword 0071 0108599f0418503a +patword 0072 0108599f0418503a +patword 0073 0108599f0418503a +patword 0074 0108599f0418503a +patword 0075 0108599f0418503a +patword 0076 0108599f0418503a +patword 0077 0108599f0418503a +patword 0078 0108599f0418503a +patword 0079 0108599f0418503a +patword 007a 0108599f0418503a +patword 007b 0108599f0418503a +patword 007c 0108599f0418503a +patword 007d 0108599f0418503a +patword 007e 010859960418503a +patword 007f 010859960418503a +patword 0080 010859960418503a +patword 0081 010859960418503a +patword 0082 010859960418503a +patword 0083 010859960418503a +patword 0084 010859960418503a +patword 0085 010859960418503a +patword 0086 010859960418503a +patword 0087 010859960418503a +patword 0088 010859960418503a +patword 0089 010859960418503a +patword 008a 010859960418503a +patword 008b 010859960418503a +patword 008c 010859960418503a +patword 008d 010859960418503a +patword 008e 010859960418503a +patword 008f 010859960418503a +patword 0090 010859960418503a +patword 0091 010859960418503a +patword 0092 010819960418501a +patword 0093 010819960418501a +patword 0094 010819960418501a +patword 0095 010819960418501a +patword 0096 030819960418501a +patword 0097 030819960418501a +patword 0098 030819960418501a +patword 0099 030819960418501a +patword 009a 030819960418501a +patword 009b 030819960418501a +patword 009c 030819960418501a +patword 009d 030819960418501a +patword 009e 030819960418501a +patword 009f 030819960418501a +patword 00a0 030819960418501a +patword 00a1 030819960418501a +patword 00a2 030819960418501a +patword 00a3 030819960418501a +patword 00a4 030819960418501a +patword 00a5 030819960418501a +patword 00a6 030819960418501a +patword 00a7 030819960418501a +patword 00a8 030819960418501a +patword 00a9 030819960418501a +patword 00aa 030819960418501a +patword 00ab 030819960418501a +patword 00ac 030819960008501a +patword 00ad 030819960008501a +patword 00ae 030819960008501a +patword 00af 030819960008501a +patword 00b0 030819960008501a +patword 00b1 030819960008501a +patword 00b2 030819960008501a +patword 00b3 030819960008501a +patword 00b4 030819960008501a +patword 00b5 030819960008501a +patword 00b6 030819960008501a +patword 00b7 030819960008501a +patword 00b8 030819960008501a +patword 00b9 030819960008501a +patword 00ba 030819960008501a +patword 00bb 030819960008501a +patword 00bc 030819960008501a +patword 00bd 030819960008501a +patword 00be 030819960008501a +patword 00bf 030819960008501a +patword 00c0 0308199f0008501a +patword 00c1 0308199f0008501a +patword 00c2 0308199f0008501a +patword 00c3 0308199f0008501a +patword 00c4 0308199f0008501a +patword 00c5 0308199f0008501a +patword 00c6 0308199f0008501a +patword 00c7 0308199f0008501a +patword 00c8 0308199f0008501a +patword 00c9 0308199f0008501a +patword 00ca 0308199f0008501a +patword 00cb 0308199f0008501a +patword 00cc 0308199f0008501a +patword 00cd 0308199f0008501a +patword 00ce 0308199f0008501a +patword 00cf 0308199f0008501a +patword 00d0 0308199f0008501a +patword 00d1 0308199f0008501a +patword 00d2 0308199f0008501a +patword 00d3 0308199f0008501a +patword 00d4 0308599f0008503a +patword 00d5 0308599f0008503a +patword 00d6 030c599f000850ba +patword 00d7 030c599f000850ba +patword 00d8 030c599f000850ba +patword 00d9 030c599f000850ba +patword 00da 030c599f000850ba +patword 00db 030c599f000850ba +patword 00dc 030c599f000850ba +patword 00dd 030c599f000850ba +patword 00de 030c599f000850ba +patword 00df 030c599f000850ba +patword 00e0 030c599f000850ba +patword 00e1 030c599f000850ba +patword 00e2 030c599f000850ba +patword 00e3 030c599f000850ba +patword 00e4 030c599f000850ba +patword 00e5 030c599f000850ba +patword 00e6 030c599f000850ba +patword 00e7 030c599f000850ba +patword 00e8 030c599f000850ba +patword 00e9 030c599f000850ba +patword 00ea 030c799f010858ba +patword 00eb 030c799f010858ba +patword 00ec 030c599f000850ba +patword 00ed 030c599f000850ba +patword 00ee 030c599f000850ba +patword 00ef 030c599f000850ba +patword 00f0 030c599f000850ba +patword 00f1 030c599f000850ba +patword 00f2 030c599f000850ba +patword 00f3 030c599f000850ba +patword 00f4 030c599f000850ba +patword 00f5 030c599f000850ba +patword 00f6 030c599f000850ba +patword 00f7 030c599f000850ba +patword 00f8 030c599f000850ba +patword 00f9 030c599f000850ba +patword 00fa 030c599f000850ba +patword 00fb 030c599f000850ba +patword 00fc 030c599f000850ba +patword 00fd 030c599f000850ba +patword 00fe 030c599f000850ba +patword 00ff 030c599f000850ba +patword 0100 030c599f000850ba +patword 0101 030c599f000850ba +patword 0102 030c599f400850ba +patword 0103 030c599f400850ba +patword 0104 030c599f600850ba +patword 0105 030c599f400850ba +patword 0106 030c599f400850ba +patword 0107 030c599f400850ba +patword 0108 870c599f682e50ba +patword 0109 870c599f482850ba +patword 010a 870c599f000e50ba +patword 010b 870c599f000850ba +patword 010c 870c599f000e50ba +patword 010d 870c599f000850ba +patword 010e 870c599f000e50ba +patword 010f 870c599f000850ba +patword 0110 870c599f000e50ba +patword 0111 870c599f000850ba +patword 0112 870c599f000e50ba +patword 0113 870c599f000850ba +patword 0114 870c599f000e50ba +patword 0115 870c599f000850ba +patword 0116 870c599f000e50ba +patword 0117 870c599f000850ba +patword 0118 870c599f000e50ba +patword 0119 870c599f000850ba +patword 011a 870c599f000e50ba +patword 011b 870c599f000850ba +patword 011c 870c599f000e50ba +patword 011d 870c599f000850ba +patword 011e 870c599f000e50ba +patword 011f 870c599f000850ba +patword 0120 870c599f000e50ba +patword 0121 870c599f000850ba +patword 0122 870c599f200e50ba +patword 0123 870c599f000850ba +patword 0124 870c599f000e50ba +patword 0125 870c599f000850ba +patword 0126 870c599f000e50ba +patword 0127 870c599f000850ba +patword 0128 870c599f000e50ba +patword 0129 870c599f000850ba +patword 012a 870c599f000e50ba +patword 012b 870c599f000850ba +patword 012c 870c599f000e50ba +patword 012d 870c599f000850ba +patword 012e 870c599f000e50ba +patword 012f 870c599f000850ba +patword 0130 870c599f000e50ba +patword 0131 870c599f000850ba +patword 0132 870c599f000e50ba +patword 0133 870c599f000850ba +patword 0134 870c599f000e50ba +patword 0135 870c599f000850ba +patword 0136 870c599f000e50ba +patword 0137 870c599f000850ba +patword 0138 870c599f000e50ba +patword 0139 870c599f000850ba +patword 013a 870c599f282e50ba +patword 013b 870c599f082850ba +patword 013c 870c599f000e50ba +patword 013d 870c599f000850ba +patword 013e 870c599f000e50ba +patword 013f 870c599f000850ba +patword 0140 870c599f000e50ba +patword 0141 870c599f000850ba +patword 0142 870c599f000e50ba +patword 0143 870c599f000850ba +patword 0144 870c599f000e50ba +patword 0145 870c599f000850ba +patword 0146 870c599f000e50ba +patword 0147 870c599f000850ba +patword 0148 870c599f000e50ba +patword 0149 870c599f000850ba +patword 014a 870c599f000e50ba +patword 014b 870c599f000850ba +patword 014c 870c599f000e50ba +patword 014d 870c599f000850ba +patword 014e 870c599f000e50ba +patword 014f 870c599f000850ba +patword 0150 870c599f000e50ba +patword 0151 870c599f000850ba +patword 0152 870c599f000e50ba +patword 0153 870c599f000850ba +patword 0154 870c599f200e50ba +patword 0155 870c599f000850ba +patword 0156 870c599f000e50ba +patword 0157 870c599f000850ba +patword 0158 870c599f000e50ba +patword 0159 870c599f000850ba +patword 015a 870c599f000e50ba +patword 015b 870c599f000850ba +patword 015c 870c599f000e50ba +patword 015d 870c599f000850ba +patword 015e 870c599f000e50ba +patword 015f 870c599f000850ba +patword 0160 870c599f000e50ba +patword 0161 870c599f000850ba +patword 0162 870c599f000e50ba +patword 0163 870c599f000850ba +patword 0164 870c599f000e50ba +patword 0165 870c599f000850ba +patword 0166 870c599f000e50ba +patword 0167 870c599f000850ba +patword 0168 870c599f000e50ba +patword 0169 870c599f000850ba +patword 016a 870c599f000e50ba +patword 016b 870c599f000850ba +patword 016c 070c599f000850ba +patword 016d 070c599f000850ba +patword 016e 000c599f000850ba +patword 016f 000c599f000850ba +patword 0170 0008599f200e503a +patword 0171 0008599f0008503a +patword 0172 0008599f200e503a +patword 0173 0008599f0008503a +patword 0174 0008599f0008503a +patword 0175 0008599f0008503a +patword 0176 0008599f0008503a +patword 0177 0008599f0008503a +patword 0178 0008599f0008503a +patword 0179 0008599f0008503a +patword 017a 0008599f0008503a +patword 017b 0008599f0008503a +patword 017c 0008599f0008503a +patword 017d 0008599f0008503a +patword 017e 0008599f0008503a +patword 017f 0008599f0008503a +patword 0180 0008599f0008503a +patword 0181 0008599f0008503a +patword 0182 0008599f0008503a +patword 0183 0008599f0008503a +patword 0184 0008599f0008503a +patword 0185 0008599f0008503a +patword 0186 0008599f0008503a +patword 0187 0008599f0008503a +patword 0188 0008599f0008503a +patword 0189 0008599f0008503a +patword 018a 0008599f0008503a +patword 018b 0008599f0008503a +patword 018c 0008599f0008503a +patword 018d 0008599f0008503a +patioctrl 8f0effff6dbffdbf +patclkctrl 0000000000000000 +patlimits 0000 018c +patloop0 013a 016b +patnloop0 199 +patloop1 0400 0400 +patnloop1 0 +patloop2 0400 0400 +patnloop2 0 +patwait0 00aa +patwaittime0 10000 +patwait1 0400 +patwaittime1 0 +patwait2 0400 +patwaittime2 0 + + +#0:rx_tcpport 1977 + +############################################# +### edit with 10 Gbs IP of your server +############################################ +#0:udp_dstip 10.1.1.102 +0:udp_dstip 129.129.202.136 +############################################# +### edit with any number in the subnet of your server (first 3 numbers as above) +############################################ +#0:udp_srcip 10.1.1.19 +0:udp_srcip 129.129.202.13 + +0:udp_dstport 33410 +############################################# +### edit with 10 Gbs IP of your server +############################################ +#zmqip 129.129.202.110 +#rx_zmqip 10.1.1.102 +#rx_zmqport 30001 +############################################# +### edit with 1 Gbs IP of PC where you will run the GUI +############################################ +#zmqip 129.129.202.110 +#zmqport 50001 + + +############################################# +### edit with hostname or 1Gbs IP address of your server +############################################ +rx_hostname mpc2011 + +tengiga 0 + +rx_datastream 1 +rx_readfreq 1 + + +dac 6 800 +dac 0 1300 +dac 4 1428 +dac 1 1000 +dac 7 900 +dac 3 680 +dac 2 1400 +dac 5 1200 +adcinvert 4a342593 +#0xb5cbda6c +asamples 5000 +dsamples 0 +adcphase 30 deg +adcpipeline 14 +adcreg 14 40 + + +frames 1000 +period 0.001 +############################################# +### edit with directory you want to write to +############################################ +fpath /tmp/ +fwrite 0 + +romode analog +#rx_jsonaddheader frameMode +rx_jsonpara frameMode newpedestal +#rx_jsonaddheader detectorMode +rx_jsonpara detectorMode analog +#flags newpedestal +#flags analog + +reg 0x5e 0x00010000 +#powerchip 1 +vhighvoltage 90 diff --git a/examples/moench03_T1.config b/examples/moench03_T1.config index 775f225c1..e6e17e431 100644 --- a/examples/moench03_T1.config +++ b/examples/moench03_T1.config @@ -1,3 +1,4 @@ +#initialchecks 0 ############################################# ### edit with hostname or IP address of your detector ############################################ @@ -8,23 +9,23 @@ hostname bchip181+ ############################################# ### edit with 10 Gbs IP of your server ############################################ -udp_dstip 10.1.2.102 +udp_dstip 10.1.1.102 ############################################# ### edit with any number in the subnet of your server (first 3 numbers as above) ############################################ -udp_srcip 10.1.2.19 - +udp_srcip 10.1.1.19 +udp_dstport 33410 ############################################# ### edit with 10 Gbs IP of your server ############################################ -rx_zmqip 10.1.1.102 -rx_zmqport 30001 +#rx_zmqip 10.1.1.102 +#rx_zmqport 30001 ############################################# ### edit with 1 Gbs IP of PC where you will run the GUI ############################################ #zmqip 129.129.202.136 -zmqport 40001 +#zmqport 40001 ############################################# @@ -38,18 +39,23 @@ rx_datastream 1 -frames 1000 +frames 1 period 0.001 ############################################# ### edit with directory you want to write to ############################################ -fpath /tmp/ +fpath /mnt/moench_data/scratch/ fwrite 0 - +rx_datastream 1 rx_jsonpara frameMode newpedestal rx_jsonpara detectorMode analog rx_discardpolicy discardpartial + +adcpipeline 15 + powerchip 1 vhighvoltage 90 + +adcreg 14 40 diff --git a/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp b/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp index 4310e2815..794ae4631 100644 --- a/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp +++ b/slsDetectorCalibration/moenchExecutables/moenchZmqProcess.cpp @@ -780,6 +780,7 @@ int main(int argc, char *argv[]) { mt->pushData(buff); mt->nextThread(); mt->popFree(buff); + cprintf(GREEN, "Frame\n"); } else { cprintf(RED, "Incomplete frame: received only %d packet\n", packetNumber); //length =