mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
WIP
This commit is contained in:
@ -36,7 +36,7 @@ class qCloneWidget : public QMainWindow {
|
|||||||
* @param lines style of plot if lines or dots
|
* @param lines style of plot if lines or dots
|
||||||
* @param markers style of plot markers or not
|
* @param markers style of plot markers or not
|
||||||
*/
|
*/
|
||||||
void SetCloneHists(unsigned int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, std::vector<std::string> histTitle, bool lines, bool markers);
|
void SetCloneHists(unsigned int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, QString histTitle, bool lines, bool markers);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the 1D hist values to plot for angle plotting
|
* Get the 1D hist values to plot for angle plotting
|
||||||
|
@ -79,13 +79,11 @@ class qDrawPlot : public QWidget {
|
|||||||
private slots:
|
private slots:
|
||||||
void SetSaveFileName(QString val);
|
void SetSaveFileName(QString val);
|
||||||
void CloneCloseEvent(int id);
|
void CloneCloseEvent(int id);
|
||||||
|
void AcquireThread();
|
||||||
|
|
||||||
void UpdatePlot();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void UpdatingPlotFinished();
|
void AcquireSignal();
|
||||||
void UpdatePlotSignal();
|
void AcquireFinishedSignal();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupWidgetWindow();
|
void SetupWidgetWindow();
|
||||||
@ -98,23 +96,15 @@ class qDrawPlot : public QWidget {
|
|||||||
void GetStatistics(double &min, double &max, double &sum, double *array, int size);
|
void GetStatistics(double &min, double &max, double &sum, double *array, int size);
|
||||||
void DetachHists();
|
void DetachHists();
|
||||||
void UpdateXYRange();
|
void UpdateXYRange();
|
||||||
|
static void GetProgressCallBack(double currentProgress, void *this_pointer);
|
||||||
|
static void GetAcquisitionFinishedCallBack(double currentProgress, int detectorStatus, void *this_pointer);
|
||||||
|
static void GetMeasurementFinishedCallBack(int currentMeasurementIndex, void *this_pointer);
|
||||||
|
static void GetDataCallBack(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex, void *this_pointer);
|
||||||
|
void AcquisitionFinished(double currentProgress, int detectorStatus);
|
||||||
bool StartOrStopThread(bool start);
|
void MeasurementFinished(int currentMeasurementIndex);
|
||||||
void SetupMeasurement();
|
void GetData(detectorData *data, uint64_t frameIndex, uint32_t subFrameIndex);
|
||||||
static void *DataStartAcquireThread(void *this_pointer);
|
|
||||||
static int GetDataCallBack(detectorData *data, int fIndex, int subIndex, void *this_pointer);
|
|
||||||
int GetData(detectorData *data, int fIndex, int subIndex);
|
|
||||||
static int GetAcquisitionFinishedCallBack(double currentProgress, int detectorStatus, void *this_pointer);
|
|
||||||
int AcquisitionFinished(double currentProgress, int detectorStatus);
|
|
||||||
static int GetMeasurementFinishedCallBack(int currentMeasurementIndex, int fileIndex, void *this_pointer);
|
|
||||||
int MeasurementFinished(int currentMeasurementIndex, int fileIndex);
|
|
||||||
static int GetProgressCallBack(double currentProgress, void *this_pointer);
|
|
||||||
void toDoublePixelData(double *dest, char *source, int size, int databytes, int dr, double *gaindest = NULL);
|
void toDoublePixelData(double *dest, char *source, int size, int databytes, int dr, double *gaindest = NULL);
|
||||||
|
void UpdatePlot();
|
||||||
|
|
||||||
static const int NUM_PEDESTAL_FRAMES = 20;
|
static const int NUM_PEDESTAL_FRAMES = 20;
|
||||||
multiSlsDetector *myDet;
|
multiSlsDetector *myDet;
|
||||||
@ -131,14 +121,10 @@ class qDrawPlot : public QWidget {
|
|||||||
|
|
||||||
bool is1d{true};
|
bool is1d{true};
|
||||||
bool isRunning{false};
|
bool isRunning{false};
|
||||||
int progress{0};
|
|
||||||
|
|
||||||
// titles
|
// titles
|
||||||
QString plotTitle{""};
|
|
||||||
QString plotTitle_prefix{""};
|
QString plotTitle_prefix{""};
|
||||||
QLabel *lblFrameIndexTitle1d{nullptr};
|
QLabel *lblFrameIndexTitle1d{nullptr};
|
||||||
std::vector<std::string> title1d;
|
|
||||||
std::string title2d{""};
|
|
||||||
QString xTitle1d{"Channel Number"};
|
QString xTitle1d{"Channel Number"};
|
||||||
QString yTitle1d{"Counts"};
|
QString yTitle1d{"Counts"};
|
||||||
QString xTitle2d{"Pixel"};
|
QString xTitle2d{"Pixel"};
|
||||||
@ -155,11 +141,12 @@ class qDrawPlot : public QWidget {
|
|||||||
double *data2d{nullptr};
|
double *data2d{nullptr};
|
||||||
|
|
||||||
//options
|
//options
|
||||||
bool binary{false};
|
bool plotEnable{true};
|
||||||
|
bool binary{false};
|
||||||
int binaryFrom{0};
|
int binaryFrom{0};
|
||||||
int binaryTo{0};
|
int binaryTo{0};
|
||||||
int persistency{0};
|
int persistency{0};
|
||||||
int currentPersistency0};
|
int currentPersistency{0};
|
||||||
bool isLines{true};
|
bool isLines{true};
|
||||||
bool isMarkers{false};
|
bool isMarkers{false};
|
||||||
QwtSymbol *marker{nullptr};
|
QwtSymbol *marker{nullptr};
|
||||||
@ -191,9 +178,9 @@ class qDrawPlot : public QWidget {
|
|||||||
double endPixel{0};
|
double endPixel{0};
|
||||||
double pixelWidth{0};
|
double pixelWidth{0};
|
||||||
|
|
||||||
|
int progress{0};
|
||||||
int64_t currentMeasurement{0};
|
int64_t currentMeasurement{0};
|
||||||
int64_t currentFrame{0};
|
int64_t currentFrame{0};
|
||||||
int64_t lastImageNumber{0};
|
|
||||||
pthread_mutex_t lastImageCompleteMutex;
|
pthread_mutex_t lastImageCompleteMutex;
|
||||||
|
|
||||||
const static int npixelsx_jctb = 400;
|
const static int npixelsx_jctb = 400;
|
||||||
|
@ -124,7 +124,7 @@ void qCloneWidget::SetupWidgetWindow(QString title, QString xTitle, QString yTit
|
|||||||
resize(500, 350);
|
resize(500, 350);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qCloneWidget::SetCloneHists(unsigned int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, std::vector<std::string> histTitle, bool lines, bool markers) {
|
void qCloneWidget::SetCloneHists(unsigned int nHists, int histNBins, double *histXAxis, std::vector<double*> histYAxis, QString histTitle, bool lines, bool markers) {
|
||||||
//for each plot, create hists
|
//for each plot, create hists
|
||||||
for (unsigned int hist_num = 0; hist_num < nHists; ++hist_num) {
|
for (unsigned int hist_num = 0; hist_num < nHists; ++hist_num) {
|
||||||
SlsQtH1D *h = new SlsQtH1D("1d plot", histNBins, histXAxis, histYAxis[hist_num]);
|
SlsQtH1D *h = new SlsQtH1D("1d plot", histNBins, histXAxis, histYAxis[hist_num]);
|
||||||
@ -138,13 +138,14 @@ void qCloneWidget::SetCloneHists(unsigned int nHists, int histNBins, double *his
|
|||||||
cloneplot1D_hists.append(h);
|
cloneplot1D_hists.append(h);
|
||||||
h->Attach(cloneplot1D);
|
h->Attach(cloneplot1D);
|
||||||
|
|
||||||
lblHistTitle->setText(QString(histTitle[0].c_str()));
|
lblHistTitle->setText(histTitle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void qCloneWidget::SetCloneHists2D(int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, double *d) {
|
void qCloneWidget::SetCloneHists2D(int nbinsx, double xmin, double xmax, int nbinsy, double ymin, double ymax, double *d, QwtText frameIndexTitle) {
|
||||||
cloneplot2D->GetPlot()->SetData(nbinsx, xmin, xmax, nbinsy, ymin, ymax, d);
|
cloneplot2D->GetPlot()->SetData(nbinsx, xmin, xmax, nbinsy, ymin, ymax, d);
|
||||||
cloneplot2D->KeepZRangeIfSet();
|
cloneplot2D->KeepZRangeIfSet();
|
||||||
|
cloneplot2D->setTitle(frameIndexTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qCloneWidget::SetRange(bool IsXYRange[], double XYRange[]) {
|
void qCloneWidget::SetRange(bool IsXYRange[], double XYRange[]) {
|
||||||
|
@ -699,7 +699,7 @@ void qDetectorMain::EnableTabs() {
|
|||||||
tabDeveloper->Refresh();
|
tabDeveloper->Refresh();
|
||||||
|
|
||||||
tabPlot->Refresh();
|
tabPlot->Refresh();
|
||||||
myPlot->StartStopDaqToggle();
|
myPlot->StartAcquisition();
|
||||||
} else { // to enable scan box
|
} else { // to enable scan box
|
||||||
tabPlot->Refresh();
|
tabPlot->Refresh();
|
||||||
// to start adc timer
|
// to start adc timer
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -523,16 +523,18 @@ void qTabMeasurement::SetRunIndex(int val) {
|
|||||||
|
|
||||||
void qTabMeasurement::ResetProgress() {
|
void qTabMeasurement::ResetProgress() {
|
||||||
FILE_LOG(logDEBUG) << "Resetting progress";
|
FILE_LOG(logDEBUG) << "Resetting progress";
|
||||||
lblCurrentFrame->setText(QString::number(0));
|
lblCurrentFrame->setText("");
|
||||||
lblCurrentMeasurement->setText(QString::number(0));
|
lblCurrentMeasurement->setText("");
|
||||||
progressBar->setValue(0);
|
progressBar->setValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void qTabMeasurement::UpdateProgress() {
|
void qTabMeasurement::UpdateProgress() {
|
||||||
FILE_LOG(logDEBUG) << "Updating progress";
|
FILE_LOG(logDEBUG) << "Updating progress";
|
||||||
progressBar->setValue(myPlot->GetProgress());
|
progressBar->setValue(myPlot->GetProgress());
|
||||||
lblCurrentFrame->setText(QString::number(myPlot->GetCurrentFrameIndex()));
|
int64_t temp = myPlot->GetCurrentFrameIndex();
|
||||||
lblCurrentMeasurement->setText(QString::number(myPlot->GetCurrentMeasurementIndex()));
|
lblCurrentFrame->setText(temp >= 0 ? QString::number(temp) : "");
|
||||||
|
temp = myPlot->GetCurrentMeasurementIndex();
|
||||||
|
lblCurrentMeasurement->setText(temp >= 0 ? QString::number(temp) : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
int qTabMeasurement::VerifyOutputDirectoryError() {
|
int qTabMeasurement::VerifyOutputDirectoryError() {
|
||||||
@ -574,8 +576,8 @@ void qTabMeasurement::StartAcquisition() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
FILE_LOG(logINFOBLUE) << "Starting Acquisition";
|
FILE_LOG(logINFOBLUE) << "Starting Acquisition";
|
||||||
lblCurrentFrame->setText(QString::number(0));
|
lblCurrentFrame->setText("");
|
||||||
lblCurrentMeasurement->setText(QString::number(0));
|
lblCurrentMeasurement->setText("");
|
||||||
Enable(0);
|
Enable(0);
|
||||||
progressBar->setValue(0);
|
progressBar->setValue(0);
|
||||||
progressTimer->start(100);
|
progressTimer->start(100);
|
||||||
|
@ -1,71 +1,60 @@
|
|||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#ifndef DETECTOR_DATA_H
|
#pragma once
|
||||||
#define DETECTOR_DATA_H
|
|
||||||
/**
|
/**
|
||||||
@short data structure to hold the detector data after postprocessing (e.g. to plot, store in a root tree etc.)
|
@short data structure to hold the detector data after postprocessing
|
||||||
*/
|
*/
|
||||||
class detectorData {
|
class detectorData {
|
||||||
public:
|
public:
|
||||||
/** @short The constructor
|
/**
|
||||||
\param f_ind file index
|
* Constructor
|
||||||
\param fname file name to which the data are saved
|
* @param progress progress index
|
||||||
\param np number of points in x coordinate defaults to the number of detector channels (1D detector) or dimension in x (2D detector)
|
* @param fname file name prefix
|
||||||
\param ny dimension in y (2D detector)
|
* @param nx number of detector channels (1D detector) or dimension in x (2D detector)
|
||||||
\param cval pointer to data in char* format
|
* @param ny dimension in y (2D detector)
|
||||||
\param dbytes number of bytes of image pointed to by cval pointer
|
* @param d pointer to data in char* format
|
||||||
\param dr dynamic range or bits per pixel
|
* @param dbytes number of bytes of image pointed to by cval pointer
|
||||||
\param file_ind file index
|
* @param dr dynamic range or bits per pixel
|
||||||
|
* @param fIndex file index
|
||||||
*/
|
*/
|
||||||
detectorData(double f_ind=-1,
|
detectorData(double progress, std::string fname, int x, int y, char *d, int dbytes, int dr, uint64_t fIndex) :
|
||||||
const char *fname="", int np=-1, int ny=1, char *cval=NULL, int dbytes=0, int dr=0,
|
progressIndex(progress), fileName(fname), nx(x), ny(y), data(d), databytes(dbytes), dynamicRange(dr), gain(nullptr), fileIndex(fIndex) {};
|
||||||
long long int file_ind=-1) :
|
|
||||||
progressIndex(f_ind),
|
|
||||||
npoints(np), npy(ny), cvalues(cval), databytes(dbytes),
|
|
||||||
dynamicRange(dr), dgainvalues(NULL), fileIndex(file_ind) {
|
|
||||||
strcpy(fileName,fname);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
int64_t getChannel(int i) {
|
|
||||||
int off=dynamicRange/8;
|
|
||||||
if (off==1) {
|
|
||||||
char val=*(cvalues+i);
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
if (off==2) {
|
|
||||||
int16_t val=*((int16_t*)(cvalues+i*off));
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
if (off==4) {
|
|
||||||
int32_t val=*((int32_t*)(cvalues+i*off));
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
if (off==8) {
|
|
||||||
int64_t val=*((int64_t*)(cvalues+i*off));
|
|
||||||
return val;
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@short The destructor
|
* Destructor
|
||||||
deletes also the arrays pointing to data/errors/angles if not NULL
|
* Also deletes gain
|
||||||
cvalues are deleted by caller
|
* data has to be deleted by caller
|
||||||
*/
|
*/
|
||||||
~detectorData() {if(dgainvalues) delete [] dgainvalues;};
|
~detectorData() {if(gain) delete [] gain;};
|
||||||
|
|
||||||
|
int64_t getChannel(int i) {
|
||||||
|
int off=dynamicRange/8;
|
||||||
|
if (off==1) {
|
||||||
|
char val=*(data+i);
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
if (off==2) {
|
||||||
|
int16_t val=*((int16_t*)(data+i*off));
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
if (off==4) {
|
||||||
|
int32_t val=*((int32_t*)(data+i*off));
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
if (off==8) {
|
||||||
|
int64_t val=*((int64_t*)(data+i*off));
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
//private:
|
//private:
|
||||||
double progressIndex;/**< @short file index */
|
double progressIndex;
|
||||||
char fileName[1000];/**< @short file name */
|
std::string fileName;
|
||||||
int npoints;/**< @short number of points */
|
uint64_t fileIndex;
|
||||||
int npy;/**< @short dimensions in y coordinate*/
|
int nx;
|
||||||
char* cvalues; /**< @short pointer to the data as char arary */
|
int ny;
|
||||||
int databytes; /**< @short number of bytes of data. Used with cvalues */
|
char* data;
|
||||||
int dynamicRange; /**< @short dynamic range */
|
double* gain;
|
||||||
double* dgainvalues; /**< @short pointer to gain data as double array for Jungfrau only in show gain mode */
|
int databytes;
|
||||||
long long int fileIndex; /**< @short file index */
|
int dynamicRange;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
@ -2091,16 +2091,16 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* gets detector status and progress index as arguments
|
* gets detector status and progress index as arguments
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerAcquisitionFinishedCallback(int (*func)(double, int, void *),
|
void registerAcquisitionFinishedCallback(void (*func)(double, int, void *),
|
||||||
void *pArg);
|
void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register callback for accessing measurement final data
|
* register callback for accessing measurement final data
|
||||||
* @param func function to be called at the end of the acquisition.
|
* @param func function to be called at the end of the acquisition.
|
||||||
* gets detector status and progress index as arguments
|
* gets measurement index
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerMeasurementFinishedCallback(int (*func)(int, int, void *),
|
void registerMeasurementFinishedCallback(void (*func)(int, void *),
|
||||||
void *pArg);
|
void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2109,7 +2109,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* gets detector status and progress index as arguments
|
* gets detector status and progress index as arguments
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerProgressCallback(int (*func)(double, void *), void *pArg);
|
void registerProgressCallback(void (*func)(double, void *), void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register calbback for accessing detector final data,
|
* register calbback for accessing detector final data,
|
||||||
@ -2120,7 +2120,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
* s is for subframe number for eiger for 32 bit mode
|
* s is for subframe number for eiger for 32 bit mode
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerDataCallback(int (*userCallback)(detectorData *, int, int,
|
void registerDataCallback(void (*userCallback)(detectorData *, uint64_t, uint32_t,
|
||||||
void *),
|
void *),
|
||||||
void *pArg);
|
void *pArg);
|
||||||
|
|
||||||
@ -2299,16 +2299,16 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
|||||||
/** detector data packed for the gui */
|
/** detector data packed for the gui */
|
||||||
detectorData *thisData{nullptr};
|
detectorData *thisData{nullptr};
|
||||||
|
|
||||||
int (*acquisition_finished)(double, int, void *){nullptr};
|
void (*acquisition_finished)(double, int, void *){nullptr};
|
||||||
void *acqFinished_p{nullptr};
|
void *acqFinished_p{nullptr};
|
||||||
|
|
||||||
int (*measurement_finished)(int, int, void *){nullptr};
|
void (*measurement_finished)(int, void *){nullptr};
|
||||||
void *measFinished_p{nullptr};
|
void *measFinished_p{nullptr};
|
||||||
|
|
||||||
int (*progress_call)(double, void *){nullptr};
|
void (*progress_call)(double, void *){nullptr};
|
||||||
void *pProgressCallArg{nullptr};
|
void *pProgressCallArg{nullptr};
|
||||||
|
|
||||||
int (*dataReady)(detectorData *, int, int, void *){nullptr};
|
void (*dataReady)(detectorData *, uint64_t, uint32_t, void *){nullptr};
|
||||||
void *pCallbackArg{nullptr};
|
void *pCallbackArg{nullptr};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -813,7 +813,7 @@ public:
|
|||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void registerDataCallback(int( *userCallback)(detectorData* d, int f, int s, void*), void *pArg);
|
void registerDataCallback(void( *userCallback)(detectorData* d, uint64_t f, uint32_t s, void*), void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register callback for accessing acquisition final data in client,
|
* register callback for accessing acquisition final data in client,
|
||||||
@ -821,15 +821,15 @@ public:
|
|||||||
* gets detector status and progress index as arguments
|
* gets detector status and progress index as arguments
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerAcquisitionFinishedCallback(int( *func)(double,int, void*), void *pArg);
|
void registerAcquisitionFinishedCallback(void( *func)(double,int, void*), void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register callback for accessing measurement final data in client,
|
* register callback for accessing measurement final data in client,
|
||||||
* @param func function to be called at the end of the acquisition.
|
* @param func function to be called at the end of the acquisition.
|
||||||
* gets detector status and progress index as arguments
|
* gets measurement index
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerMeasurementFinishedCallback(int( *func)(int,int, void*), void *pArg);
|
void registerMeasurementFinishedCallback(void( *func)(int, void*), void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* register callback for accessing detector progress in client,
|
* register callback for accessing detector progress in client,
|
||||||
@ -837,7 +837,7 @@ public:
|
|||||||
* gets detector status and progress index as arguments
|
* gets detector status and progress index as arguments
|
||||||
* @param pArg argument
|
* @param pArg argument
|
||||||
*/
|
*/
|
||||||
void registerProgressCallback(int( *func)(double,void*), void *pArg);
|
void registerProgressCallback(void( *func)(double,void*), void *pArg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@short [usage strongly discouraged] sets parameters trough command line interface http://www.psi.ch/detectors/UsersSupportEN/slsDetectorClientHowTo.pdf
|
@short [usage strongly discouraged] sets parameters trough command line interface http://www.psi.ch/detectors/UsersSupportEN/slsDetectorClientHowTo.pdf
|
||||||
|
@ -4069,24 +4069,24 @@ int multiSlsDetector::dumpDetectorSetup(const std::string &fname, int level) {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void multiSlsDetector::registerAcquisitionFinishedCallback(int (*func)(double, int, void *),
|
void multiSlsDetector::registerAcquisitionFinishedCallback(void (*func)(double, int, void *),
|
||||||
void *pArg) {
|
void *pArg) {
|
||||||
acquisition_finished = func;
|
acquisition_finished = func;
|
||||||
acqFinished_p = pArg;
|
acqFinished_p = pArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void multiSlsDetector::registerMeasurementFinishedCallback(int (*func)(int, int, void *),
|
void multiSlsDetector::registerMeasurementFinishedCallback(void (*func)(int, void *),
|
||||||
void *pArg) {
|
void *pArg) {
|
||||||
measurement_finished = func;
|
measurement_finished = func;
|
||||||
measFinished_p = pArg;
|
measFinished_p = pArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void multiSlsDetector::registerProgressCallback(int (*func)(double, void *), void *pArg) {
|
void multiSlsDetector::registerProgressCallback(void (*func)(double, void *), void *pArg) {
|
||||||
progress_call = func;
|
progress_call = func;
|
||||||
pProgressCallArg = pArg;
|
pProgressCallArg = pArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void multiSlsDetector::registerDataCallback(int (*userCallback)(detectorData *, int, int, void *),
|
void multiSlsDetector::registerDataCallback(void (*userCallback)(detectorData *, uint64_t, uint32_t, void *),
|
||||||
void *pArg) {
|
void *pArg) {
|
||||||
dataReady = userCallback;
|
dataReady = userCallback;
|
||||||
pCallbackArg = pArg;
|
pCallbackArg = pArg;
|
||||||
@ -4233,7 +4233,7 @@ int multiSlsDetector::acquire() {
|
|||||||
findex = incrementFileIndex();
|
findex = incrementFileIndex();
|
||||||
|
|
||||||
if (measurement_finished != nullptr) {
|
if (measurement_finished != nullptr) {
|
||||||
measurement_finished(im, findex, measFinished_p);
|
measurement_finished(im, measFinished_p);
|
||||||
}
|
}
|
||||||
if (multi_shm()->stoppedFlag != 0) {
|
if (multi_shm()->stoppedFlag != 0) {
|
||||||
break;
|
break;
|
||||||
|
@ -398,19 +398,19 @@ int slsDetectorUsers::setDetectorMode(int value, int detPos) {
|
|||||||
|
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
void slsDetectorUsers::registerDataCallback(int( *userCallback)(detectorData*, int, int, void*), void *pArg) {
|
void slsDetectorUsers::registerDataCallback(void( *userCallback)(detectorData*, uint64_t, uint32_t, void*), void *pArg) {
|
||||||
detector.registerDataCallback(userCallback,pArg);
|
detector.registerDataCallback(userCallback,pArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void slsDetectorUsers::registerAcquisitionFinishedCallback(int( *func)(double,int, void*), void *pArg) {
|
void slsDetectorUsers::registerAcquisitionFinishedCallback(void( *func)(double,int, void*), void *pArg) {
|
||||||
detector.registerAcquisitionFinishedCallback(func,pArg);
|
detector.registerAcquisitionFinishedCallback(func,pArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void slsDetectorUsers::registerMeasurementFinishedCallback(int( *func)(int,int, void*), void *pArg) {
|
void slsDetectorUsers::registerMeasurementFinishedCallback(void( *func)(int,void*), void *pArg) {
|
||||||
detector.registerMeasurementFinishedCallback(func,pArg);
|
detector.registerMeasurementFinishedCallback(func,pArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void slsDetectorUsers::registerProgressCallback(int( *func)(double,void*), void *pArg) {
|
void slsDetectorUsers::registerProgressCallback(void( *func)(double,void*), void *pArg) {
|
||||||
detector.registerProgressCallback(func,pArg);
|
detector.registerProgressCallback(func,pArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user