mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-22 03:40:04 +02:00
new argv set merged
This commit is contained in:
commit
a37eb65dbc
@ -1,9 +1,9 @@
|
|||||||
Path: slsDetectorsPackage/calibrationWizards
|
Path: slsDetectorsPackage/calibrationWizards
|
||||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git
|
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git
|
||||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git
|
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git
|
||||||
Repsitory UUID: a6b29560c2d5dc8de95db22956b6a9ab29a0a688
|
Repsitory UUID: 81c5629da13fd8658d00bcad89e5fcbb9d901ef7
|
||||||
Revision: 282
|
Revision: 288
|
||||||
Branch: master
|
Branch: master
|
||||||
Last Changed Author: Maliakal_Dhanya
|
Last Changed Author: Maliakal_Dhanya
|
||||||
Last Changed Rev: 282
|
Last Changed Rev: 288
|
||||||
Last Changed Date: 2014-09-10 14:39:02 +0200
|
Last Changed Date: 2014-12-01 10:54:31 +0100
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//#define SVNPATH ""
|
//#define SVNPATH ""
|
||||||
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git"
|
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_gui.git"
|
||||||
//#define SVNREPPATH ""
|
//#define SVNREPPATH ""
|
||||||
#define SVNREPUUID "a6b29560c2d5dc8de95db22956b6a9ab29a0a688"
|
#define SVNREPUUID "81c5629da13fd8658d00bcad89e5fcbb9d901ef7"
|
||||||
//#define SVNREV 0x282
|
//#define SVNREV 0x288
|
||||||
//#define SVNKIND ""
|
//#define SVNKIND ""
|
||||||
//#define SVNSCHED ""
|
//#define SVNSCHED ""
|
||||||
#define SVNAUTH "Maliakal_Dhanya"
|
#define SVNAUTH "Maliakal_Dhanya"
|
||||||
#define SVNREV 0x282
|
#define SVNREV 0x288
|
||||||
#define SVNDATE 0x20140910
|
#define SVNDATE 0x20141201
|
||||||
//
|
//
|
||||||
|
@ -481,7 +481,7 @@ double XYRangeValues[4];
|
|||||||
bool IsXYRange[4];
|
bool IsXYRange[4];
|
||||||
|
|
||||||
/** Default timer between plots*/
|
/** Default timer between plots*/
|
||||||
static const double PLOT_TIMER_MS = 250;
|
static const double PLOT_TIMER_MS = 200;
|
||||||
/** Specific timer value between plots */
|
/** Specific timer value between plots */
|
||||||
double timerValue;
|
double timerValue;
|
||||||
/** every nth frame when to plot */
|
/** every nth frame when to plot */
|
||||||
|
@ -47,21 +47,23 @@ int main (int argc, char **argv) {
|
|||||||
|
|
||||||
qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, QWidget *parent) :
|
qDetectorMain::qDetectorMain(int argc, char **argv, QApplication *app, QWidget *parent) :
|
||||||
QMainWindow(parent), theApp(app),myDet(0),detID(0),myPlot(0),tabs(0),isDeveloper(0){
|
QMainWindow(parent), theApp(app),myDet(0),detID(0),myPlot(0),tabs(0),isDeveloper(0){
|
||||||
|
bool found;
|
||||||
string configFName = "";
|
string configFName = "";
|
||||||
// Getting all the command line arguments
|
// Getting all the command line arguments
|
||||||
for(int iarg=1; iarg<argc; iarg++){
|
for(int iarg=1; iarg<argc; iarg++){
|
||||||
if(!strcasecmp(argv[iarg],"-developer")) {isDeveloper=1;}
|
found = false;
|
||||||
if(!strcasecmp(argv[iarg],"-id")) {detID=atoi(argv[iarg+1]);}
|
if(!strcasecmp(argv[iarg],"--developer")) {isDeveloper=1;found = true;}
|
||||||
if(!strcasecmp(argv[iarg],"-config")) {configFName=string(argv[iarg+1]);}
|
if((!strcasecmp(argv[iarg],"--id")) && (iarg+1 < argc)) {detID=atoi(argv[iarg+1]);iarg++;found = true;}
|
||||||
if(!strcasecmp(argv[iarg],"-f")) {configFName=string(argv[iarg+1]);}
|
if((!strcasecmp(argv[iarg],"--config")) && (iarg+1 < argc)) {configFName=string(argv[iarg+1]);iarg++;found = true;}
|
||||||
if(!strcasecmp(argv[iarg],"-help")){
|
if((!strcasecmp(argv[iarg],"--f")) && (iarg+1 < argc)) {configFName=string(argv[iarg+1]);iarg++;found = true;}
|
||||||
|
if(!found){
|
||||||
cout << "Possible Arguments are:" << endl;
|
cout << "Possible Arguments are:" << endl;
|
||||||
cout << "-help \t\t : \t This help" << endl;
|
cout << "--developer \t\t : \t Enables the developer tab" << endl;
|
||||||
cout << "-config fname \t : \t specifies the configuration flie name to be used" << endl;
|
cout << "--f [fname]\t\t : \t Loads config file fname" << endl;
|
||||||
cout << "-developer \t : \t Enables the developer tab" << endl;
|
cout << "--config [fname]\t : \t Loads config file fname" << endl;
|
||||||
cout << "-id i \t\t : \t Sets the multi detector id to i (the default is 0). "
|
cout << "--id [i] \t\t : \t Sets the multi detector id to i (the default is 0). "
|
||||||
"Required only when more than one multi detector object is needed." << endl;
|
"Required only when more than one multi detector object is needed." << endl;
|
||||||
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,6 +183,7 @@ void qDetectorMain::SetUpWidgetWindow(){
|
|||||||
// Default zoom Tool Tip
|
// Default zoom Tool Tip
|
||||||
zoomToolTip = dockWidgetPlot->toolTip();
|
zoomToolTip = dockWidgetPlot->toolTip();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -205,9 +208,7 @@ void qDetectorMain::SetUpDetector(const string fName){
|
|||||||
|
|
||||||
//if hostname doesnt exist even in shared memory
|
//if hostname doesnt exist even in shared memory
|
||||||
if(!host.length()){
|
if(!host.length()){
|
||||||
#ifdef VERBOSE
|
|
||||||
cout << endl << "No Detector Connected." << endl;
|
cout << endl << "No Detector Connected." << endl;
|
||||||
#endif
|
|
||||||
qDefs::Message(qDefs::CRITICAL,"No Detectors Connected. ","qDetectorMain::SetUpDetector");
|
qDefs::Message(qDefs::CRITICAL,"No Detectors Connected. ","qDetectorMain::SetUpDetector");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
@ -235,6 +236,7 @@ void qDetectorMain::SetUpDetector(const string fName){
|
|||||||
default:
|
default:
|
||||||
string detName = myDet->slsDetectorBase::getDetectorType(detType);
|
string detName = myDet->slsDetectorBase::getDetectorType(detType);
|
||||||
qDefs::checkErrorMessage(myDet,"qDetectorMain::SetUpDetector");
|
qDefs::checkErrorMessage(myDet,"qDetectorMain::SetUpDetector");
|
||||||
|
cout << "ERROR: " + host + " has unknown detector type \"" + detName + "\". Exiting GUI." << endl;
|
||||||
string errorMess = host+string(" has unknown detector type \"")+
|
string errorMess = host+string(" has unknown detector type \"")+
|
||||||
detName+string("\". Exiting GUI.");
|
detName+string("\". Exiting GUI.");
|
||||||
qDefs::Message(qDefs::CRITICAL,errorMess,"qDetectorMain::SetUpDetector");
|
qDefs::Message(qDefs::CRITICAL,errorMess,"qDetectorMain::SetUpDetector");
|
||||||
|
@ -49,8 +49,8 @@ qDrawPlot::~qDrawPlot(){
|
|||||||
plot1D_hists.clear();
|
plot1D_hists.clear();
|
||||||
if(lastImageArray) delete[] lastImageArray; lastImageArray=0;
|
if(lastImageArray) delete[] lastImageArray; lastImageArray=0;
|
||||||
StartOrStopThread(0);
|
StartOrStopThread(0);
|
||||||
delete myDet;
|
delete myDet; myDet = 0;
|
||||||
for(int i=0;i<MAXCloneWindows;i++) if(winClone[i]) delete winClone[i];
|
for(int i=0;i<MAXCloneWindows;i++) if(winClone[i]) {delete winClone[i]; winClone[i] = NULL;}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1296,8 +1296,10 @@ void qDrawPlot::SelectPlot(int i){ //1 for 1D otherwise 2D
|
|||||||
|
|
||||||
|
|
||||||
void qDrawPlot::Clear1DPlot(){
|
void qDrawPlot::Clear1DPlot(){
|
||||||
for(QVector<SlsQtH1D*>::iterator h = plot1D_hists.begin(); h!=plot1D_hists.end();h++)
|
for(QVector<SlsQtH1D*>::iterator h = plot1D_hists.begin(); h!=plot1D_hists.end();h++){
|
||||||
(*h)->Detach(plot1D);
|
(*h)->Detach(plot1D);
|
||||||
|
//do not delete *h or h.
|
||||||
|
}
|
||||||
|
|
||||||
plotHistogram->detach();
|
plotHistogram->detach();
|
||||||
}
|
}
|
||||||
@ -1719,8 +1721,7 @@ int qDrawPlot::UpdateTrimbitPlot(bool fromDetector,bool Histogram){
|
|||||||
|
|
||||||
//get trimbits
|
//get trimbits
|
||||||
actualPixelsX = myDet->getTotalNumberOfChannels(slsDetectorDefs::X);
|
actualPixelsX = myDet->getTotalNumberOfChannels(slsDetectorDefs::X);
|
||||||
if(histTrimbits) delete [] histTrimbits;
|
if(histTrimbits) delete [] histTrimbits; histTrimbits = new double[actualPixelsX];
|
||||||
histTrimbits = new double[actualPixelsX];
|
|
||||||
ret = myDet->getChanRegs(histTrimbits,fromDetector);
|
ret = myDet->getChanRegs(histTrimbits,fromDetector);
|
||||||
// cout << "got it!" << endl;
|
// cout << "got it!" << endl;
|
||||||
if(!ret){
|
if(!ret){
|
||||||
|
@ -197,7 +197,7 @@ void qTabActions::SetupWidgetWindow(){
|
|||||||
//load positions
|
//load positions
|
||||||
if(lblName[NumPositions]->isEnabled()){
|
if(lblName[NumPositions]->isEnabled()){
|
||||||
//delete existing positions
|
//delete existing positions
|
||||||
if (positions) delete [] positions;
|
if (positions) {delete [] positions; positions = NULL;}
|
||||||
//get number of positions
|
//get number of positions
|
||||||
int numPos=myDet->getPositions();
|
int numPos=myDet->getPositions();
|
||||||
comboPos->setMaxCount(numPos);
|
comboPos->setMaxCount(numPos);
|
||||||
@ -404,7 +404,7 @@ void qTabActions::SetPosition(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//delete existing positions
|
//delete existing positions
|
||||||
if (positions) delete [] positions;
|
if (positions) {delete [] positions; positions = NULL;}
|
||||||
positions=new double[comboPos->count()];
|
positions=new double[comboPos->count()];
|
||||||
//copying the list
|
//copying the list
|
||||||
for(int i=0;i<comboPos->count();i++)
|
for(int i=0;i<comboPos->count();i++)
|
||||||
@ -483,7 +483,7 @@ void qTabActions::Refresh(){
|
|||||||
|
|
||||||
if(lblName[NumPositions]->isEnabled()){
|
if(lblName[NumPositions]->isEnabled()){
|
||||||
//delete existing positions
|
//delete existing positions
|
||||||
if (positions) delete [] positions;
|
if (positions) {delete [] positions; positions = NULL;}
|
||||||
//get number of positions
|
//get number of positions
|
||||||
int numPos=myDet->getPositions();
|
int numPos=myDet->getPositions();
|
||||||
comboPos->setMaxCount(numPos);
|
comboPos->setMaxCount(numPos);
|
||||||
|
@ -177,6 +177,13 @@ void qTabAdvanced::SetupWidgetWindow(){
|
|||||||
cout << "Getting ROI" << endl;
|
cout << "Getting ROI" << endl;
|
||||||
updateROIList();
|
updateROIList();
|
||||||
|
|
||||||
|
|
||||||
|
// print receiver configurations
|
||||||
|
if(myDet->getDetectorsType() != slsDetectorDefs::MYTHEN){
|
||||||
|
cout << endl;
|
||||||
|
myDet->printReceiverConfiguration();
|
||||||
|
}
|
||||||
|
|
||||||
Initialization();
|
Initialization();
|
||||||
|
|
||||||
qDefs::checkErrorMessage(det,"qTabAdvanced::SetupWidgetWindow");
|
qDefs::checkErrorMessage(det,"qTabAdvanced::SetupWidgetWindow");
|
||||||
|
@ -134,6 +134,7 @@ void qTabDeveloper::SetupWidgetWindow(){
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cout << "ERROR: Unknown detector type: " + myDet->slsDetectorBase::getDetectorType(detType) << endl;
|
||||||
qDefs::Message(qDefs::CRITICAL,string("Unknown detector type:")+myDet->slsDetectorBase::getDetectorType(detType),"qTabDeveloper::SetupWidgetWindow");
|
qDefs::Message(qDefs::CRITICAL,string("Unknown detector type:")+myDet->slsDetectorBase::getDetectorType(detType),"qTabDeveloper::SetupWidgetWindow");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
break;
|
break;
|
||||||
@ -220,6 +221,7 @@ void qTabDeveloper::CreateDACWidgets(){
|
|||||||
for(int i=0;i<NUM_DAC_WIDGETS;i++){
|
for(int i=0;i<NUM_DAC_WIDGETS;i++){
|
||||||
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()),boxDacs);
|
lblDacs[i] = new QLabel(QString(dacNames[i].c_str()),boxDacs);
|
||||||
spinDacs[i] = new MyDoubleSpinBox(i,boxDacs);
|
spinDacs[i] = new MyDoubleSpinBox(i,boxDacs);
|
||||||
|
spinDacs[i]->setMinimum(-1);
|
||||||
spinDacs[i]->setMaximum(10000);
|
spinDacs[i]->setMaximum(10000);
|
||||||
lblDacsmV[i]= new QLabel("",boxDacs);
|
lblDacsmV[i]= new QLabel("",boxDacs);
|
||||||
|
|
||||||
@ -387,6 +389,7 @@ slsDetectorDefs::dacIndex qTabDeveloper::getSLSIndex(int index){
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cout << "Unknown detector type:" + myDet->slsDetectorBase::getDetectorType(detType) << endl;
|
||||||
qDefs::Message(qDefs::CRITICAL,string("Unknown detector type:")+myDet->slsDetectorBase::getDetectorType(detType),"qTabDeveloper::getSLSIndex");
|
qDefs::Message(qDefs::CRITICAL,string("Unknown detector type:")+myDet->slsDetectorBase::getDetectorType(detType),"qTabDeveloper::getSLSIndex");
|
||||||
qDefs::checkErrorMessage(myDet,"qTabDeveloper::getSLSIndex");
|
qDefs::checkErrorMessage(myDet,"qTabDeveloper::getSLSIndex");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
@ -152,6 +152,7 @@ void qTabMeasurement::SetupTimingMode(){
|
|||||||
item[(int)Gated_Start]->setEnabled(false);
|
item[(int)Gated_Start]->setEnabled(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cout << "Unknown detector type." << endl;
|
||||||
qDefs::Message(qDefs::CRITICAL,"Unknown detector type.","qTabMeasurement::SetupTimingMode");
|
qDefs::Message(qDefs::CRITICAL,"Unknown detector type.","qTabMeasurement::SetupTimingMode");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
break;
|
break;
|
||||||
@ -683,6 +684,7 @@ void qTabMeasurement::SetTimingMode(int mode){
|
|||||||
success = true;
|
success = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cout << "Timing mode unknown to GUI" << endl;
|
||||||
//This should never happen
|
//This should never happen
|
||||||
qDefs::Message(qDefs::CRITICAL,"Timing mode unknown to GUI","qTabMeasurement::SetTimingMode");
|
qDefs::Message(qDefs::CRITICAL,"Timing mode unknown to GUI","qTabMeasurement::SetTimingMode");
|
||||||
qDefs::checkErrorMessage(myDet,"qTabMeasurement::SetTimingMode");
|
qDefs::checkErrorMessage(myDet,"qTabMeasurement::SetTimingMode");
|
||||||
|
@ -144,6 +144,7 @@ void qTabSettings::SetupDetectorSettings(){
|
|||||||
item[(int)LowNoise]->setEnabled(false);
|
item[(int)LowNoise]->setEnabled(false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
cout << "Unknown detector type. Exiting GUI." << endl;
|
||||||
qDefs::Message(qDefs::CRITICAL,"Unknown detector type. Exiting GUI.","qTabSettings::SetupDetectorSettings");
|
qDefs::Message(qDefs::CRITICAL,"Unknown detector type. Exiting GUI.","qTabSettings::SetupDetectorSettings");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user