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

@ -663,8 +663,10 @@ hframe=new TGHorizontalFrame(this, 800,50);
cout <<"Registering data callback" << endl; cout <<"Registering data callback" << endl;
try { try {
myDet->registerDataCallback(&dataCallback, (void*)this); myDet->registerDataCallback(&dataCallback, (void*)this);
} CATCH_DISPLAY ("Could not get register call back.", "ctbAcquisition::ctbAcquisition") } 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; cout <<"Done" << endl;
// mgAdcs=new TMultiGraph(); // mgAdcs=new TMultiGraph();
@ -1153,8 +1155,20 @@ void ctbAcquisition::Draw(){
void ctbAcquisition::changePlot(){ void ctbAcquisition::changePlot(){
if (rbPlotOff->IsOn()) { if (rbPlotOff->IsOn()) {
adcPlot=0; adcPlot=0;
dbitPlot=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 { } 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; adcPlot=0;
dbitPlot=0; dbitPlot=0;
for (int ii=0; ii<NADCS; ii++) for (int ii=0; ii<NADCS; ii++)

View File

@ -440,8 +440,8 @@ patwaittime2 0
### edit with 10 Gbs IP of your server ### edit with 10 Gbs IP of your server
############################################ ############################################
#zmqip 129.129.202.110 #zmqip 129.129.202.110
rx_zmqip 10.1.1.102 #rx_zmqip 10.1.1.102
rx_zmqport 30001 #rx_zmqport 30001
############################################# #############################################
### edit with 1 Gbs IP of PC where you will run the GUI ### edit with 1 Gbs IP of PC where you will run the GUI
############################################ ############################################
@ -456,8 +456,8 @@ rx_zmqport 30001
tengiga 1 tengiga 1
#rx_datastream 1 rx_datastream 1
#rx_readfreq 1 rx_readfreq 1
dac 6 800 dac 6 800

View File

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