eiger server: added overflow, noverflow to the flags to show/not show saturation when there is overflow in any of the single subframes in 32 bit mode

This commit is contained in:
2018-05-22 18:43:13 +02:00
parent 0ed82d4ef7
commit cb635d800a
15 changed files with 158 additions and 33 deletions

View File

@ -5440,17 +5440,7 @@ int slsDetector::sendROI(int n,ROI roiLimits[]){
/*
enum readOutFlags {
NORMAL_READOUT,
setReadOutFlags(STORE_IN_RAM,
READ_HITS,
ZERO_COMPRESSION,
BACKGROUND_CORRECTION
}{};
*/
int slsDetector::setReadOutFlags(readOutFlags flag){

View File

@ -407,6 +407,15 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
} \
};
void setOverflowMode(int value){ \
if(value>=0){ \
switch(value){ \
case 1: setReadOutFlags(SHOW_OVERFLOW);break; \
case 0: setReadOutFlags(NOOVERFLOW);break; \
} \
} \
};
/**
get readout mode of detector (eiger specific)
\returns 0 for nonparallel, 1 for parallel, 2 for safe
@ -417,6 +426,18 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef
if (ret&PARALLEL) return 1; \
if (ret&SAFE) return 2; \
return -1; \
}
/**
get readout overflow mode of detector (eiger specific)
\returns 1 for show overflow, 0 for do not show overflow
*/
int getOverflowMode(){ \
int ret = setReadOutFlags(); \
if (ret&SHOW_OVERFLOW) return 1; \
if (ret&NOOVERFLOW) return 0; \
return -1; \
} \
/**

View File

@ -414,7 +414,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
*/
/*! \page config
- <b>flags [flag]</b> sets/gets the readout flags to mode. Options: none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, unknown. Used for MYTHEN and EIGER only. \c Returns \c (string). put takes one string and \c returns concatenation of all active flags separated by spaces.
- <b>flags [flag]</b> sets/gets the readout flags to mode. Options: none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, overflow, nooverflow, unknown. Used for MYTHEN and EIGER only. \c Returns \c (string). put takes one string and \c returns concatenation of all active flags separated by spaces.
*/
descrToFuncMap[i].m_pFuncName="flags";
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced;
@ -6016,6 +6016,10 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
flag=DIGITAL_ONLY;
else if (sval=="analog_digital")
flag=ANALOG_AND_DIGITAL;
else if (sval=="overflow")
flag=SHOW_OVERFLOW;
else if (sval=="nooverflow")
flag=NOOVERFLOW;
else
return string("could not scan flag ")+string(args[1]);
}
@ -6044,6 +6048,10 @@ string slsDetectorCommand::cmdAdvanced(int narg, char *args[], int action) {
strcat(answer,"digital " );
if (retval & ANALOG_AND_DIGITAL)
strcat(answer,"analog_digital ");
if (retval & SHOW_OVERFLOW)
strcat(answer,"overflow ");
if (retval & NOOVERFLOW)
strcat(answer,"nooverflow ");
if(strlen(answer))
return string(answer);
@ -6148,7 +6156,7 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
if (action==PUT_ACTION || action==HELP_ACTION) {
os << "extsig:i mode \t sets the mode of the external signal i. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
os << "flags mode \t sets the readout flags to mode. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, unknown" << std::endl;
os << "flags mode \t sets the readout flags to mode. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, overlow, nooverflow, unknown." << std::endl;
os << "programfpga f \t programs the fpga with file f (with .pof extension)." << std::endl;
os << "resetfpga f \t resets fpga, f can be any value" << std::endl;
@ -6161,9 +6169,8 @@ string slsDetectorCommand::helpAdvanced(int narg, char *args[], int action) {
os << "extsig:i \t gets the mode of the external signal i. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, unknown" << std::endl;
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, digital, analog_digital, overflow, nooverflow, unknown" << std::endl;
os << "led \t returns led status (0 off, 1 on)" << std::endl;
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, safe, unknown" << std::endl;
os << "powerchip \t gets if the chip has been powered on or off" << std::endl;
os << "auto_comp_disable \t Currently not implemented. gets if the automatic comparator diable mode is enabled/disabled" << std::endl;

View File

@ -343,6 +343,12 @@ int slsDetectorUsers::setParallelMode(int value) {
return myDetector->getParallelMode();
}
int slsDetectorUsers::setOverflowMode(int value) {
if(value >= 0)
myDetector->setOverflowMode(value);
return myDetector->getOverflowMode();
}
int slsDetectorUsers::setAllTrimbits(int val, int id) {
return myDetector->setAllTrimbits(val, id);
}

View File

@ -612,6 +612,13 @@ class slsDetectorUsers
*/
int setParallelMode(int value);
/**
* @short show saturated for overflow in subframes in 32 bit mode (eiger only)
* \param value 0 for do not show saturatd, 1 for show saturated (-1 gets)
* \returns overflow mode enable in 32 bit mode
*/
int setOverflowMode(int value);
/**
@short sets all trimbits to value (only available for eiger)
\param val value to be set (-1 gets)