diff --git a/slsDetectorGui/slsDetectorGui.pro b/slsDetectorGui/slsDetectorGui.pro index 624eec047..72f89a506 100644 --- a/slsDetectorGui/slsDetectorGui.pro +++ b/slsDetectorGui/slsDetectorGui.pro @@ -20,7 +20,7 @@ QMAKE_LIBS = -L$(QTDIR)/lib #LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib -Wl,-R$(QWTDIR)/lib -L /usr/local/epics/base/lib/$(EPICS_HOST_ARCH)/ -Wl,-R/usr/local/epics/base/lib/$(EPICS_HOST_ARCH) -lca -lCom #default -DEFINES += VERBOSE DACS_INT PRINT_LOG CHECKINFERROR THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE +DEFINES += VERBOSE DACS_INT PRINT_LOG THIS_PATH=\\\"$$PWD\\\" #VERYVERBOSE CHECKINFERROR LIBS = -L$(QWTDIR)/lib -lqwt -L$(QWT3D)/lib diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index 30537a769..2621bf3b6 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -633,6 +633,10 @@ void qDrawPlot::SetupMeasurement(){ LockLastImageArray(); +#ifdef VERBOSE + cout << "locklastimagearray" << endl; + +#endif // Defaults if(!running) stop_signal = 0; @@ -649,6 +653,10 @@ void qDrawPlot::SetupMeasurement(){ //1d with no scan if ((!originally2D) && (scanArgument==qDefs::None)){ +#ifdef VERBOSE + cout << "1D" << endl; + +#endif if(!running){ maxPixelsY = 100; minPixelsY = 0; @@ -657,6 +665,10 @@ void qDrawPlot::SetupMeasurement(){ } } else { +#ifdef VERBOSE + cout << "2D" << endl; + +#endif //2d with no scan if ((originally2D) && (scanArgument==qDefs::None)){ maxPixelsY = nPixelsY; @@ -704,6 +716,12 @@ void qDrawPlot::SetupMeasurement(){ cout<<"endPixel:"<GetData(data,fIndex); + cout << "data ready callback worked ok" << endl; return 0; } @@ -729,7 +748,7 @@ int qDrawPlot::GetDataCallBack(detectorData *data, int fIndex, void *this_pointe int qDrawPlot::GetData(detectorData *data,int fIndex){ -#ifdef VERYVERBOSE + //#ifdef VERYVERBOSE cout << "******Entering GetDatafunction********" << endl; cout << "fIndex " << fIndex << endl; cout << "fname " << data->fileName << endl; @@ -739,7 +758,7 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){ cout << "values " << data->values << endl; cout << "errors " << data->errors << endl; cout << "angle " << data->angles << endl; -#endif + //#endif if(!stop_signal){ //set progress @@ -805,16 +824,18 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){ data->values[i] = -1; } } - cout << "*** ERROR: value at " << k << " places have infinity values!" << endl; - double m1,m2,s1; - GetStatistics(m1,m2,s1,data->angles,nAnglePixelsX); - cout << "angle min:" << m1 << endl; - cout << "angle max:" << m2 << endl; - cout << "angle sum:" << s1 << endl; - GetStatistics(m1,m2,s1,data->values,nAnglePixelsX); - cout << "value min:" << m1 << endl; - cout << "value max:" << m2 << endl; - cout << "value sum:" << s1 << endl; + if (k>0) { + cout << "*** ERROR: value at " << k << " places have infinity values!" << endl; + double m1,m2,s1; + GetStatistics(m1,m2,s1,data->angles,nAnglePixelsX); + cout << "angle min:" << m1 << endl; + cout << "angle max:" << m2 << endl; + cout << "angle sum:" << s1 << endl; + GetStatistics(m1,m2,s1,data->values,nAnglePixelsX); + cout << "value min:" << m1 << endl; + cout << "value max:" << m2 << endl; + cout << "value sum:" << s1 << endl; + } #endif memcpy(histXAngleAxis,data->angles,nAnglePixelsX*sizeof(double)); memcpy(histYAngleAxis,data->values,nAnglePixelsX*sizeof(double)); @@ -1100,6 +1121,7 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){ int qDrawPlot::GetAcquisitionFinishedCallBack(double currentProgress,int detectorStatus, void *this_pointer){ ((qDrawPlot*)this_pointer)->AcquisitionFinished(currentProgress,detectorStatus); + cout << "acquisition finished callback worked ok" << endl; return 0; } @@ -1144,6 +1166,7 @@ int qDrawPlot::AcquisitionFinished(double currentProgress, int detectorStatus){ int qDrawPlot::GetProgressCallBack(double currentProgress, void *this_pointer){ ((qDrawPlot*)this_pointer)->progress= currentProgress; + cout << "progress callback " << endl; return 0; } @@ -1165,7 +1188,9 @@ void qDrawPlot::ShowAcquisitionErrorMessage(QString status){ int qDrawPlot::GetMeasurementFinishedCallBack(int currentMeasurementIndex, int fileIndex, void *this_pointer){ + cout << "measurement finished callback?" << endl; ((qDrawPlot*)this_pointer)->MeasurementFinished(currentMeasurementIndex, fileIndex); + cout << "measurement finished callback worked ok" << endl; return 0; } diff --git a/slsDetectorGui/src/qTabAdvanced.cpp b/slsDetectorGui/src/qTabAdvanced.cpp index 16231733d..08be2056b 100644 --- a/slsDetectorGui/src/qTabAdvanced.cpp +++ b/slsDetectorGui/src/qTabAdvanced.cpp @@ -123,15 +123,17 @@ void qTabAdvanced::SetupWidgetWindow(){ comboDetector->addItem(QString(myDet->getHostname(i).c_str())); comboDetector->setCurrentIndex(0); + det = myDet->getSlsDetector(comboDetector->currentIndex()); qDefs::checkErrorMessage(myDet,"qTabAdvanced::SetupWidgetWindow"); - + cout << "ports" << endl; spinControlPort->setValue(det->getControlPort()); spinStopPort->setValue(det->getStopPort()); spinTCPPort->setValue(det->getReceiverPort()); spinUDPPort->setValue(atoi(det->getReceiverUDPPort())); + cout << "net" << endl; dispIP->setText(det->getDetectorIP()); dispMAC->setText(det->getDetectorMAC()); dispRxrHostname->setText(det->getReceiver()); @@ -140,6 +142,8 @@ void qTabAdvanced::SetupWidgetWindow(){ //check if its online and set it to red if offline + + cout << "online" << endl; if(det->setOnline()==slsDetectorDefs::ONLINE_FLAG) det->checkOnline(); if(det->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG) @@ -160,12 +164,17 @@ void qTabAdvanced::SetupWidgetWindow(){ } + cout << "ROI" << endl; //updates roi updateROIList(); + cout << "Init" << endl; + Initialization(); + cout << "done" << endl; + qDefs::checkErrorMessage(det,"qTabAdvanced::SetupWidgetWindow"); } diff --git a/slsDetectorGui/src/qTabDataOutput.cpp b/slsDetectorGui/src/qTabDataOutput.cpp index 213383d21..eb3e997a7 100644 --- a/slsDetectorGui/src/qTabDataOutput.cpp +++ b/slsDetectorGui/src/qTabDataOutput.cpp @@ -283,7 +283,7 @@ void qTabDataOutput::BrowseFlatFieldPath(){ if(dir.isEmpty()) dir = QString(myDet->getFlatFieldCorrectionDir().c_str());/*"/home/";*/ fName = QFileDialog::getOpenFileName(this, tr("Load Flat Field Correction File"),dir, - tr("Flat Field Correction Files(*.dat)"),0,QFileDialog::ShowDirsOnly); + tr("Data Files(*.raw *.dat);; All Files (*.*)"),0,QFileDialog::ShowDirsOnly); if (!fName.isEmpty()){ dispFlatField->setText(fName); SetFlatField(); @@ -293,7 +293,6 @@ void qTabDataOutput::BrowseFlatFieldPath(){ } - //-------------------------------------------------------------------------------------------------------------------------------------------------