diff --git a/slsDetectorGui/client/qClient.cpp b/slsDetectorGui/client/qClient.cpp index 5ad21e679..08bf87ff2 100644 --- a/slsDetectorGui/client/qClient.cpp +++ b/slsDetectorGui/client/qClient.cpp @@ -9,6 +9,7 @@ // Project Class Headers #include "MySocketTCP.h" #include "slsDetectorBase.h" + // C++ Include Headers #include #include @@ -16,14 +17,15 @@ using namespace std; +//------------------------------------------------------------------------------------------------------------------------------------------------- -int main(int argc, char *argv[]) -{ +int main(int argc, char *argv[]){ + qClient *cl =new qClient(argv[1]); cl->executeLine(argc-2, argv+2); - delete cl; + delete cl; } @@ -43,6 +45,14 @@ qClient::qClient(char* hostname){ //------------------------------------------------------------------------------------------------------------------------------------------------- +qClient::~qClient() { + if(mySocket) delete mySocket; +} + + +//------------------------------------------------------------------------------------------------------------------------------------------------- + + int qClient::executeLine(int narg, char *args[]){ char arg[MAX_STR_LENGTH] = ""; diff --git a/slsDetectorGui/client/qClient.h b/slsDetectorGui/client/qClient.h index f68dddfde..05413cbc1 100644 --- a/slsDetectorGui/client/qClient.h +++ b/slsDetectorGui/client/qClient.h @@ -27,7 +27,7 @@ public: /** \short The constructor*/ qClient(char* hostname); /** Destructor */ - virtual ~qClient(){}; + virtual ~qClient(); /**Execute command*/ int executeLine(int narg, char *args[]); @@ -44,6 +44,7 @@ private: /** client socket */ MySocketTCP *mySocket; + }; diff --git a/slsDetectorGui/include/qTabDeveloper.h b/slsDetectorGui/include/qTabDeveloper.h index 8acf84a78..def0a0670 100644 --- a/slsDetectorGui/include/qTabDeveloper.h +++ b/slsDetectorGui/include/qTabDeveloper.h @@ -72,6 +72,10 @@ public: */ void Refresh(); + /** To stop ADC Timer when starting acquisition + */ + void StopADCTimer(){adcTimer->stop();}; + private: /** The sls detector object */ multiSlsDetector *myDet; diff --git a/slsDetectorGui/include/svnInfoGui.h b/slsDetectorGui/include/svnInfoGui.h index 8652c3c70..7e9721f55 100644 --- a/slsDetectorGui/include/svnInfoGui.h +++ b/slsDetectorGui/include/svnInfoGui.h @@ -2,10 +2,10 @@ #define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui" //#define SVNREPPATH "" #define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061" -//#define SVNREV 0x152 +//#define SVNREV 0x167 //#define SVNKIND "" //#define SVNSCHED "" #define SVNAUTH "l_maliakal_d" -#define SVNREV 0x152 -#define SVNDATE 0x20130306 +#define SVNREV 0x167 +#define SVNDATE 0x20130315 // diff --git a/slsDetectorGui/src/qDetectorMain.cpp b/slsDetectorGui/src/qDetectorMain.cpp index 106ff3e81..7ab0af43f 100644 --- a/slsDetectorGui/src/qDetectorMain.cpp +++ b/slsDetectorGui/src/qDetectorMain.cpp @@ -721,14 +721,20 @@ void qDetectorMain::EnableTabs(){ //moved to here, so that its all in order, instead of signals and different threads if(!enable) { + //stop the adc timer in gotthard + if(tab_developer->isEnabled()) + tab_developer->StopADCTimer(); //set the plot type first(acccss shared memory) tab_plot->SetScanArgument(); //sets running to true myPlot->StartStopDaqToggle(); } - else//to enable scan box + else{//to enable scan box tab_plot->Refresh(); - + //to start adc timer + if(tab_developer->isEnabled()) + tab_developer->Refresh(); + } } diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index a81f54d0d..b872d9112 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -46,10 +46,10 @@ qDrawPlot::~qDrawPlot(){ Clear1DPlot(); for(QVector::iterator h = plot1D_hists.begin();h!=plot1D_hists.end();h++) delete *h; plot1D_hists.clear(); - delete[] lastImageArray; lastImageArray=0; + if(lastImageArray) delete[] lastImageArray; lastImageArray=0; StartOrStopThread(0); delete myDet; - for(int i=0;isetNumberOfModules(); #ifdef VERBOSE - cout << "Getting number of modules" << endl; + cout << "Getting number of modules:" << numMod << endl; #endif - spinNumModules->setValue(myDet->setNumberOfModules()); + spinNumModules->setValue(numMod); // Dynamic Range #ifdef VERBOSE