sharedmem: done with multi, sls and command line left to do

This commit is contained in:
maliakal_d 2018-06-20 14:06:10 +02:00
parent fc0f8ef9da
commit 2853f97fe7
2 changed files with 4155 additions and 4532 deletions

File diff suppressed because it is too large Load Diff

View File

@ -451,6 +451,12 @@ public:
*/ */
int64_t clearAllErrorMask(); int64_t clearAllErrorMask();
/**
* Set Error Mask from all detectors
* if each had errors in the mask already
*/
void setErrorMaskFromAllDetectors();
/** /**
Set acquiring flag in shared memory Set acquiring flag in shared memory
\param b acquiring flag \param b acquiring flag
@ -987,20 +993,20 @@ public:
void resetFinalDataQueue(); void resetFinalDataQueue();
/** /**
* Configures in detector the destination for UDP packets * Configures in detector the destination for UDP packets (Not Mythen)
* @returns OK or FAIL * @returns OK or FAIL
*/ */
int configureMAC(); int configureMAC();
/** /**
* Get threshold energy * Get threshold energy (Mythen and Eiger)
* @param imod module number (-1 all) * @param imod module number (-1 all)
* @returns current threshold value for imod in ev (-1 failed) * @returns current threshold value for imod in ev (-1 failed)
*/ */
int getThresholdEnergy(int imod=-1); int getThresholdEnergy(int imod=-1);
/** /**
* Set threshold energy * Set threshold energy (Mythen and Eiger)
* @param e_eV threshold in eV * @param e_eV threshold in eV
* @param imod module number (-1 all) * @param imod module number (-1 all)
* @param isettings ev. change settings * @param isettings ev. change settings
@ -1009,26 +1015,35 @@ public:
*/ */
int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS,int tb=1); int setThresholdEnergy(int e_eV, int imod=-1, detectorSettings isettings=GET_SETTINGS,int tb=1);
/** /**
set/get timer value * Set/get timer value (not all implemented for all detectors)
\param index timer index * @param index timer index
\param t time in ns or number of...(e.g. frames, gates, probes) * @param t time in ns or number of...(e.g. frames, gates, probes)
\returns timer set value in ns or number of...(e.g. frames, gates, probes) * @returns timer set value in ns or number of...(e.g. frames, gates, probes)
*/ */
int64_t setTimer(timerIndex index, int64_t t=-1); int64_t setTimer(timerIndex index, int64_t t=-1);
/** /**
set/get timer value * Set/get timer value left in acquisition (not all implemented for all detectors)
\param index timer index * @param index timer index
\param t time in ns or number of...(e.g. frames, gates, probes) * @param t time in ns or number of...(e.g. frames, gates, probes)
\returns timer set value in ns or number of...(e.g. frames, gates, probes) * @returns timer set value in ns or number of...(e.g. frames, gates, probes)
*/ */
int64_t getTimeLeft(timerIndex index); int64_t getTimeLeft(timerIndex index);
/**
* Set speed
* @param sp speed type (clkdivider option for Jungfrau and Eiger, others for Mythen/Gotthard)
* @param value (clkdivider 0,1,2 for full, half and quarter speed). Other values check manual
* @returns value of speed set
*/
int setSpeed(speedVariable sp, int value=-1); int setSpeed(speedVariable sp, int value=-1);
/** /**
set/get dynamic range and updates the number of dataBytes set/get dynamic range and updates the number of dataBytes
\param n dynamic range (-1 get) \param n dynamic range (-1 get)
@ -1297,7 +1312,7 @@ public:
double getScanStep(int index, int istep){return thisMultiDetector->scanSteps[index][istep];}; double getScanStep(int index, int istep);
/** /**
@ -1321,7 +1336,7 @@ public:
*/ */
int setChannel(int64_t reg, int ichan=-1, int ichip=-1, int imod=-1); int setChannel(int64_t reg, int ichan=-1, int ichip=-1, int imod=-1);
void setErrorMaskFromAllDetectors();
int getMoveFlag(int imod); int getMoveFlag(int imod);
@ -1363,6 +1378,20 @@ public:
\returns 0 if rate correction disabled, >0 otherwise \returns 0 if rate correction disabled, >0 otherwise
*/ */
int getRateCorrection(); int getRateCorrection();
/**
rate correct data
\param datain data array
\param errin error array on data (if NULL will default to sqrt(datain)
\param dataout array of corrected data
\param errout error on corrected data (if not NULL)
\returns 0
*/
int rateCorrect(double* datain, double *errin, double* dataout, double *errout);
/** /**
set flat field corrections set flat field corrections
\param fname name of the flat field file (or "" if disable) \param fname name of the flat field file (or "" if disable)
@ -1441,17 +1470,6 @@ public:
*/ */
int flatFieldCorrect(double* datain, double *errin, double* dataout, double *errout); int flatFieldCorrect(double* datain, double *errin, double* dataout, double *errout);
/**
rate correct data
\param datain data array
\param errin error array on data (if NULL will default to sqrt(datain)
\param dataout array of corrected data
\param errout error on corrected data (if not NULL)
\returns 0
*/
int rateCorrect(double* datain, double *errin, double* dataout, double *errout);
@ -1488,6 +1506,10 @@ public:
*/ */
int exitReceiver(); int exitReceiver();
/**
\returns file dir
*/
std::string getFilePath();
/** /**
Sets up the file directory Sets up the file directory
@ -1496,6 +1518,11 @@ public:
*/ */
std::string setFilePath(std::string s=""); std::string setFilePath(std::string s="");
/**
\returns file name
*/
std::string getFileName();
/** /**
Sets up the file name Sets up the file name
@param s file name @param s file name
@ -1510,6 +1537,12 @@ public:
*/ */
int setReceiverFramesPerFile(int f = -1); int setReceiverFramesPerFile(int f = -1);
/**
\returns file name
*/
fileFormat getFileFormat();
/** /**
Sets up the file format Sets up the file format
@param f file format @param f file format
@ -1517,6 +1550,11 @@ public:
*/ */
fileFormat setFileFormat(fileFormat f=GET_FILE_FORMAT); fileFormat setFileFormat(fileFormat f=GET_FILE_FORMAT);
/**
\returns file index
*/
int getFileIndex();
/** /**
Sets up the file index Sets up the file index
@param i file index @param i file index
@ -1524,26 +1562,6 @@ public:
*/ */
int setFileIndex(int i=-1); int setFileIndex(int i=-1);
/**
\returns file dir
*/
std::string getFilePath(){return setFilePath();};
/**
\returns file name
*/
std::string getFileName(){return setFileName();};
/**
\returns file name
*/
fileFormat getFileFormat(){return setFileFormat();};
/**
\returns file index
*/
int getFileIndex(){return setFileIndex();};
/** Starts the listening mode of receiver /** Starts the listening mode of receiver
\returns OK or FAIL \returns OK or FAIL