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