still updating slsdetector.cpp

This commit is contained in:
2018-10-26 17:40:18 +02:00
parent cf87b6ca83
commit 33ac63d14a
16 changed files with 1501 additions and 2523 deletions

View File

@ -32,8 +32,6 @@ typedef struct detParameterList {
int nChipY;
int nDacs;
int nAdcs;
int nGain;
int nOffset;
int dynamicRange;
int nGappixelsX;
int nGappixelsY;
@ -112,12 +110,6 @@ private:
/** number of adcs per module */
int nAdcs;
/** number of extra gain values*/
int nGain;
/** number of extra offset values */
int nOffset;
/** dynamic range of the detector data */
int dynamicRange;
@ -158,18 +150,9 @@ private:
/** memory offsets for the adc arrays */
int adcoff;
/** memory offsets for the chip register arrays */
int chipoff;
/** memory offsets for the channel register arrays -trimbits*/
int chanoff;
/** memory offsets for the gain register arrays */
int gainoff;
/** memory offsets for the offset register arrays -trimbits*/
int offsetoff;
/** ip address/hostname of the receiver for client control via TCP */
char receiver_hostname[MAX_STR_LENGTH];
@ -622,12 +605,10 @@ public:
* Writes a trim/settings file for module number
* the values will be read from the current detector structure
* @param fname name of the file to be written
* @param iodelay io delay (detector specific)
* @param tau tau (detector specific)
* @returns OK or FAIL if the file could not be written
* \sa ::sls_detector_module sharedSlsDetector mythenDetector::writeSettingsFile(string, int)
*/
int writeSettingsFile(std::string fname, int iodelay, int tau);
int writeSettingsFile(std::string fname);
/**
* Get detector settings
@ -1073,11 +1054,11 @@ public:
/**
* Gets counter memory block in detector (Gotthard)
* @param arg counter memory block from detector
* @param image counter memory block from detector
* @param startACQ 1 to start acquisition afterwards, else 0
* @returns OK or FAIL
*/
int getCounterBlock(short int arg[],int startACQ=0);
int getCounterBlock(short int image[],int startACQ=0);
/**
* Resets counter in detector
@ -1276,10 +1257,8 @@ public:
/**
* Returns the trimbits from the detector's shared memmory (Mythen, Eiger)
* Returns the trimbits from the detector's shared memmory (Eiger)
* @param retval is the array with the trimbits
* @param fromDetector is true if the trimbits shared memory have to be
* uploaded from detector
* @returns total number of channels for the detector
*/
int getChanRegs(double* retval,bool fromDetector);
@ -1289,17 +1268,11 @@ public:
* Called for loading trimbits and settings settings to the detector
* @param module module to be set - must contain correct module number and
* also channel and chip registers
* @param iodelay iodelay (detector specific)
* @param tau tau (detector specific)
* @param e_eV threashold in eV (detector specific)
* @param gainval pointer to extra gain values
* @param offsetval pointer to extra offset values
* @param tb 1 to include trimbits, 0 to exclude (used for eiger)
* @returns ok or fail
* \sa ::sls_detector_module
*/
int setModule(sls_detector_module module, int iodelay, int tau, int e_eV,
int* gainval=0, int* offsetval=0, int tb=1);
int setModule(sls_detector_module module, int tb = 1);
/**
@ -1308,14 +1281,6 @@ public:
*/
sls_detector_module *getModule();
/**
* Calibrate Pedestal (ChipTestBoard)
* Starts acquisition, calibrates pedestal and writes to fpga
* @param frames number of frames
* @returns number of frames
*/
int calibratePedestal(int frames = 0);
/**
* Set Rate correction (Mythen, Eiger)
* @param t dead time in ns - if 0 disable correction,
@ -1323,19 +1288,19 @@ public:
* for current settings
* @returns 0 if rate correction disabled, >0 otherwise
*/
int setRateCorrection(int t=0);
int setRateCorrection(int64_t t = 0);
/**
* Get rate correction Eiger)
* @returns 0 if rate correction disabled, > 0 otherwise
*/
int getRateCorrection();
int64_t getRateCorrection();
/**
* Prints receiver configuration
* @returns OK or FAIL
* #param level print level
*/
int printReceiverConfiguration();
void printReceiverConfiguration(int level = logINFO);
/**
* Checks if receiver is online and set flag
@ -1824,28 +1789,21 @@ private:
/**
* reads a trim/settings file
* @param fname name of the file to be read
* @param iodelay io delay (detector specific)
* @param tau tau (detector specific)
* @param myMod pointer to the module structure which has to be set. <BR>
* If it is NULL a new module structure will be created
* @param tb 1 to include trimbits, 0 to exclude (used for eiger)
* @returns the pointer to myMod or NULL if reading the file failed
*/
sls_detector_module* readSettingsFile(std::string fname,
int& iodelay, int& tau,
sls_detector_module* myMod=NULL, int tb=1);
sls_detector_module* readSettingsFile(std::string fname, sls_detector_module* myMod=NULL, int tb=1);
/**
* writes a trim/settings file
* @param fname name of the file to be written
* @param mod module structure which has to be written to file
* @param iodelay io delay (detector specific)
* @param tau tau (detector specific)
* @returns OK or FAIL if the file could not be written
*/
int writeSettingsFile(std::string fname,
sls_detector_module mod, int iodelay, int tau);
int writeSettingsFile(std::string fname, sls_detector_module mod);
/** slsDetector Id or position in the detectors list */
@ -1884,17 +1842,8 @@ private:
/** pointer to adc valuse in shared memory */
int *adcs;
/** pointer to chip registers in shared memory */
int *chipregs;
/** pointer to channal registers in shared memory */
int *chanregs;
/** pointer to gain values in shared memory */
int *gain;
/** pointer to offset values in shared memory */
int *offset;
};
#endif