explicitly setting rx zmq datastream int the ctb Gui

This commit is contained in:
bergamaschi 2020-02-28 12:25:48 +01:00
parent 8c8032dc69
commit c10e04c4eb
3 changed files with 23 additions and 7 deletions

View File

@ -664,7 +664,9 @@ hframe=new TGHorizontalFrame(this, 800,50);
try {
myDet->registerDataCallback(&dataCallback, (void*)this);
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition")
try {
myDet->setRxZmqDataStream(true);
} CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
cout <<"Done" << endl;
// mgAdcs=new TMultiGraph();
@ -1154,7 +1156,19 @@ void ctbAcquisition::changePlot(){
if (rbPlotOff->IsOn()) {
adcPlot=0;
dbitPlot=0;
try {
myDet->registerDataCallback(nullptr, this);
} CATCH_DISPLAY ("Could not get unregister call back.", "ctbAcquisition::ctbAcquisition")
try {
myDet->setRxZmqDataStream(false);
} CATCH_DISPLAY ("Could not get unset RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
} else {
try {
myDet->registerDataCallback(&dataCallback, (void*)this);
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition")
try {
myDet->setRxZmqDataStream(true);
} CATCH_DISPLAY ("Could not get set RxZmqDataStream.", "ctbAcquisition::ctbAcquisition")
adcPlot=0;
dbitPlot=0;
for (int ii=0; ii<NADCS; ii++)

View File

@ -440,8 +440,8 @@ patwaittime2 0
### edit with 10 Gbs IP of your server
############################################
#zmqip 129.129.202.110
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
############################################
@ -456,8 +456,8 @@ rx_zmqport 30001
tengiga 1
#rx_datastream 1
#rx_readfreq 1
rx_datastream 1
rx_readfreq 1
dac 6 800

View File

@ -149,6 +149,7 @@ int main(int argc, char *argv[]) {
if (argc>=9) {
nframes=atoi(argv[8]);
}
int xmin=0, xmax=nx, ymin=0, ymax=ny;
if (argc>=13) {
xmin=atoi(argv[9]);
@ -185,6 +186,7 @@ int main(int argc, char *argv[]) {
cout << "pedestal file is " << pedfile << endl;
if (thr>0)
cout << "threshold is " << thr << endl;
cout << "Nframes is " << nframes << endl;
uint32 nnx, nny;
double *gmap;