the scans work

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@38 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
l_maliakal_d
2012-08-27 14:11:58 +00:00
parent 73152572a5
commit ee3a54601c
18 changed files with 852 additions and 319 deletions

View File

@ -65,6 +65,11 @@ public:
* */
void SetCloneHists(int nHists,int histNBins,double* histXAxis,double* histYAxis[],string histTitle[]);
public slots:
/** Save Plots automatically by save all clones
* returns -1 if fail*/
int SavePlotAutomatic();
private:
/** clone window id*/

View File

@ -27,6 +27,7 @@ class qCloneWidget;
/** C++ Include Headers */
#define MAX_1DPLOTS 10
@ -120,8 +121,12 @@ void Clear1DPlot();
void ClonePlot();
/** Closes all the clone plots */
void CloseClones();
/** Saves all the clone plots */
void SaveClones();
/** To Save plot */
void SavePlot();
/** Save all plots **/
void SaveAll(bool enable);
/** Sets persistency from plot tab */
void SetPersistency(int val);
/** sets style of plot to dotted */
@ -168,9 +173,8 @@ static void* DataStartAcquireThread(void *this_pointer);
static int GetDataCallBack(detectorData *data, void *this_pointer);
/** This is called by the GetDataCallBack function to copy the data */
int GetData(detectorData *data);
/** Saves all the plots. All sets saveError to true if not saved.*/
void SavePlotAutomatic();
@ -187,9 +191,12 @@ void StartDaq(bool start);
/** To set the reference to zero after closing a clone
* @param id is the id of the clone */
void CloneCloseEvent(int id);
/**After a pause, the gui is allowed to collect the data
* this is called when it is over */
void UpdatePause(){data_pause_over=true;};
/** Shows the first save error message while automatic saving
* @param fileName file name of the first file that it tried to save.*/
void ShowSaveErrorMessage(QString fileName);
@ -233,14 +240,21 @@ int currentMeasurement;
int currentFrame;
/** current Index */
int currentIndex;
/** current Scan Division Level */
int currentScanDivLevel;
/** current scan Value */
double currentScanValue;
/** Number of Exposures */
int number_of_exposures;
/** Number of Frames Per Measurement */
int number_of_frames;
/** Duration between Exposures */
double acquisitionPeriod;
/** Acquisition Time */
double exposureTime;
/**variables for threads */
/** */
volatile bool stop_signal;
@ -266,8 +280,19 @@ std::string imageTitle;
unsigned int plot_in_scope;
/** Number of Pixels in X Axis */
unsigned int nPixelsX;
/** Number of Pixels in Y Axis */
unsigned int nPixelsY;
/** Number of pixel bins in Y Axis */
int nPixelsY;
/** Min Pixel number for Y Axis*/
double minPixelsY;
/** Max Pixel number for Y Axis*/
double maxPixelsY;
/** starting pixel */
double startPixel;
/** end Pixel*/
double endPixel;
/** pixel width */
double pixelWidth;
/** Current Image Number */
unsigned int lastImageNumber;
int last_plot_number;
@ -299,8 +324,14 @@ int progress;
bool plotEnable;
/**If plot is dotted */
bool plotDotted;
/** Save all plots */
bool saveAll;
/** If error, while automatically saving plots, checks this at the end of an acquistion */
bool saveError;
/** index of last saved image for automatic saving*/
int lastSavedFrame;
/** index of measurement number of last saved image for automatic saving*/
int lastSavedMeasurement;
/**if an acquisition is running, so as not to refresh tab
* and also to update plot only if running (while creating clones)*/
bool running;
@ -319,9 +350,6 @@ static const double PLOT_TIMER_MS = 250;
double timerValue;
/** every nth frame when to plot */
int frameFactor;
/** old data that did not get lock(for frame factor)**/
bool oldCopy;
int oldFrameNumber;
/**if frame is enabled in measurement tab */
bool isFrameEnabled;
/**if trigger is enabled in measurement tab */
@ -341,6 +369,7 @@ void LogzSignal(bool);
void SetZRangeSignal(double,double);
void EnableZRangeSignal(bool);
void SetCurrentMeasurementSignal(int);
void saveErrorSignal(QString);
};

View File

@ -145,7 +145,7 @@ void BrowseFileStepsPath();
signals:
void EnableScanBox(int,int);
void EnableScanBox();
};

View File

@ -12,9 +12,9 @@
/* Qt Project Class Headers */
#include "qActionsWidget.h"
#include "qScanWidget.h"
/** Project Class Headers */
/** C++ Project Class Headers */
class multiSlsDetector;
class qActionsWidget;
#include "sls_detector_defs.h"
/** Qt Include Headers */
#include <QWidget>
#include <QPushButton>
@ -48,11 +48,19 @@ public:
*/
void Refresh();
public slots:
/** Disable Positions
* @param enable true if to disable
* */
void EnablePositions(bool enable);
private:
/** The sls detector object */
multiSlsDetector *myDet;
slsDetectorDefs::detectorType detType;
enum actionIndex{Scan0=1, Scan1, NumPositions=4, NumTotalActions=9};
QGridLayout *gridLayout;
@ -111,7 +119,7 @@ void SetPosition();
void DeletePosition();
signals:
void EnableScanBox(int,int);
void EnableScanBox();
};

View File

@ -92,6 +92,10 @@ void SetAngularCorrection();
/**discard bad channels*/
void DiscardBadChannels();
signals:
/**signal to enable/disable positions in Actions*/
void AngularConversionSignal(bool);
};

View File

@ -97,10 +97,8 @@ public slots:
/** Set frequency between plots*/
void SetFrequency();
/** Enable Scan box
* @param enable to enable the scan group box
* @param id is 0 if its scan level 0 or scan level 1
*/
void EnableScanBox(int mode=-1,int id=-1);
void EnableScanBox();
/** a variable is set when timing mode has been changed.
* This variable is also disabled if exptime>acq period to be on safe side

View File

@ -38,12 +38,6 @@ public:
*/
void Refresh();
/** enable expert mode
* @param enable true if expert mode is enabled
*/
void EnableExpertMode(bool enable){expertMode=enable;Refresh();};
private:
/** The sls detector object */
@ -55,7 +49,7 @@ private:
/** detector type */
slsDetectorDefs::detectorType detType;
bool expertMode;
enum{Standard,Fast,HighGain,DynamicGain,LowGain,MediumGain,VeryHighGain,Undefined,Uninitialized,NumSettings};