mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
fixed filedir for gotthard receiver problem
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@113 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -109,7 +109,6 @@ void qDrawPlot::SetupWidgetWindow(){
|
||||
currentFileIndex = 0;
|
||||
currentFrameIndex = 0;
|
||||
|
||||
receiver=false;
|
||||
// This is so that it initially stop and plots
|
||||
running = 1;
|
||||
for(int i=0;i<MAX_1DPLOTS;i++)
|
||||
@ -351,8 +350,6 @@ bool qDrawPlot::StartOrStopThread(bool start){
|
||||
//sets up the measurement parameters
|
||||
SetupMeasurement();
|
||||
|
||||
if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG)
|
||||
receiver=true;
|
||||
|
||||
cout << "Starting new acquisition threadddd ...." << endl;
|
||||
// Start acquiring data from server
|
||||
@ -547,19 +544,15 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
||||
//set progress
|
||||
progress=(int)data->progressIndex;
|
||||
currentFrameIndex = fileIOStatic::getIndicesFromFileName(string(data->fileName),currentFileIndex);
|
||||
|
||||
#ifdef VERYVERBOSE
|
||||
cout << "progress:" << progress << endl;
|
||||
#endif
|
||||
|
||||
//Plot Disabled
|
||||
if(!plotEnable) return 0;
|
||||
|
||||
// secondary title necessary to differentiate between frames when not saving data
|
||||
char temp_title[2000];
|
||||
if(receiver){
|
||||
//findex is used because in the receiver, you cannot know the frame index as many frames are in 1 file.
|
||||
if(fIndex==-1) fIndex=currentFrame;
|
||||
//findex is used because in the receiver, you cannot know the frame index as many frames are in 1 file.
|
||||
if(fIndex!=-1){
|
||||
currentFrameIndex=fIndex;
|
||||
sprintf(temp_title,"#%d",fIndex);
|
||||
}else{
|
||||
if(fileSaveEnable) strcpy(temp_title,"");
|
||||
@ -567,6 +560,10 @@ int qDrawPlot::GetData(detectorData *data,int fIndex){
|
||||
}
|
||||
|
||||
|
||||
//Plot Disabled
|
||||
if(!plotEnable) return 0;
|
||||
|
||||
|
||||
//angle plotting
|
||||
if(anglePlot){
|
||||
while(1){
|
||||
|
@ -143,11 +143,40 @@ void qTabDataOutput::setOutputDir(){
|
||||
|
||||
QString path = dispOutputDir->text();
|
||||
|
||||
string oldPath = myDet->getFilePath();
|
||||
bool error=false;
|
||||
|
||||
//gets rid of the end '/'s
|
||||
while(path.endsWith('/')) path.chop(1);
|
||||
dispOutputDir->setText(path);
|
||||
|
||||
if(QFile::exists(path)){
|
||||
if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG){
|
||||
for(int i=0;i<myDet->getNumberOfDetectors();i++){
|
||||
slsDetector *det = myDet->getSlsDetector(i);
|
||||
det->setFilePath(string(path.toAscii().constData()));
|
||||
if(det->getFilePath()!=(string(path.toAscii().constData()))){
|
||||
error=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(error){
|
||||
//set it back for the ones which got set
|
||||
for(int i=0;i<myDet->getNumberOfDetectors();i++){
|
||||
slsDetector *det = myDet->getSlsDetector(i);
|
||||
det->setFilePath(oldPath);
|
||||
}
|
||||
}//set it in multi as well if it worked so that they reflect the same
|
||||
else
|
||||
myDet->setFilePath(string(path.toAscii().constData()));
|
||||
}
|
||||
else {
|
||||
myDet->setFilePath(string(path.toAscii().constData()));
|
||||
if(myDet->getFilePath()!=(string(path.toAscii().constData())))
|
||||
error=true;
|
||||
}
|
||||
|
||||
if(!error){
|
||||
//if(QFile::exists(path)){
|
||||
lblOutputDir->setText("Output Directory: ");
|
||||
lblOutputDir->setPalette(chkRate->palette());
|
||||
lblOutputDir->setToolTip(outDirTip);
|
||||
@ -512,6 +541,12 @@ void qTabDataOutput::Refresh(){
|
||||
if(myDet->getBadChannelCorrection()) chkDiscardBad->setChecked(true);
|
||||
|
||||
|
||||
if(myDet->setReceiverOnline()==slsDetectorDefs::ONLINE_FLAG)
|
||||
btnOutputBrowse->setEnabled(false);
|
||||
else
|
||||
btnOutputBrowse->setEnabled(true);
|
||||
|
||||
|
||||
#ifdef VERBOSE
|
||||
cout << "**Updated DataOutput Tab" << endl << endl;
|
||||
#endif
|
||||
|
@ -767,8 +767,8 @@ void qTabPlot::SetScanArgument(){
|
||||
break;
|
||||
break;
|
||||
case 2://file index
|
||||
dispYAxis->setText("File Index");
|
||||
myPlot->SetImageYAxisTitle("File Index");
|
||||
dispYAxis->setText("Frame Index");
|
||||
myPlot->SetImageYAxisTitle("Frame Index");
|
||||
break;
|
||||
case 3://all frames
|
||||
dispYAxis->setText("All Frames");
|
||||
|
Reference in New Issue
Block a user