Merge pull request #294 from slsdetectorgroup/readnrows

Readnrows
This commit is contained in:
Dhanya Thattil 2021-09-09 10:42:34 +02:00 committed by GitHub
commit 00066e1e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 167 additions and 178 deletions

View File

@ -1846,7 +1846,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def partialread(self): def readnrows(self):
""" """
[Eiger] Number of rows to read out per half module starting from the centre. [Eiger] Number of rows to read out per half module starting from the centre.
[Jungfrau] Number of rows to read per module starting from the centre. [Jungfrau] Number of rows to read per module starting from the centre.
@ -1856,11 +1856,11 @@ class Detector(CppDetectorApi):
[Eiger]The permissible values depend on dynamic range and 10Gbe enabled.\n\n [Eiger]The permissible values depend on dynamic range and 10Gbe enabled.\n\n
[Jungfrau] Options: 8 - 512 (multiples of 8) [Jungfrau] Options: 8 - 512 (multiples of 8)
""" """
return self.getPartialReadout() return self.getReadNRows()
@partialread.setter @readnrows.setter
def partialread(self, value): def readnrows(self, value):
ut.set_using_dict(self.setPartialReadout, value) ut.set_using_dict(self.setReadNRows, value)
@property @property

View File

@ -874,13 +874,13 @@ void init_det(py::module &m) {
(void (Detector::*)(sls::ns, sls::Positions)) & (void (Detector::*)(sls::ns, sls::Positions)) &
Detector::setRateCorrection, Detector::setRateCorrection,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getPartialReadout", .def("getReadNRows",
(Result<int>(Detector::*)(sls::Positions) const) & (Result<int>(Detector::*)(sls::Positions) const) &
Detector::getPartialReadout, Detector::getReadNRows,
py::arg() = Positions{}) py::arg() = Positions{})
.def("setPartialReadout", .def("setReadNRows",
(void (Detector::*)(const int, sls::Positions)) & (void (Detector::*)(const int, sls::Positions)) &
Detector::setPartialReadout, Detector::setReadNRows,
py::arg(), py::arg() = Positions{}) py::arg(), py::arg() = Positions{})
.def("getInterruptSubframe", .def("getInterruptSubframe",
(Result<bool>(Detector::*)(sls::Positions) const) & (Result<bool>(Detector::*)(sls::Positions) const) &

View File

@ -33,7 +33,7 @@ int Beb_top = 0;
uint64_t Beb_deactivatedNextFrameNumber = 0; uint64_t Beb_deactivatedNextFrameNumber = 0;
int Beb_quadEnable = 0; int Beb_quadEnable = 0;
int Beb_positions[2] = {0, 0}; int Beb_positions[2] = {0, 0};
int Beb_partialReadout = MAX_ROWS_PER_READOUT; int Beb_readNRows = MAX_ROWS_PER_READOUT;
int Beb_deactivated_transmission_flowcontrol_10g = 0; int Beb_deactivated_transmission_flowcontrol_10g = 0;
int Beb_deactivated_transmission_delay_frame = 0; int Beb_deactivated_transmission_delay_frame = 0;
int Beb_deactivated_transmission_delay_left = 0; int Beb_deactivated_transmission_delay_left = 0;
@ -903,7 +903,7 @@ int Beb_RequestNImages(int ten_gig, unsigned int nimages, int test_just_send_out
unsigned int maxnl = MAX_ROWS_PER_READOUT; unsigned int maxnl = MAX_ROWS_PER_READOUT;
unsigned int maxnp = (ten_gig ? 4 : 16) * Beb_bit_mode; unsigned int maxnp = (ten_gig ? 4 : 16) * Beb_bit_mode;
unsigned int nl = Beb_partialReadout; unsigned int nl = Beb_readNRows;
unsigned int npackets = (nl * maxnp) / maxnl; unsigned int npackets = (nl * maxnp) / maxnl;
if ((nl * maxnp) % maxnl) { if ((nl * maxnp) % maxnl) {
LOG(logERROR, ("Read N Lines is incorrect. Switching to Full Image " LOG(logERROR, ("Read N Lines is incorrect. Switching to Full Image "
@ -1265,7 +1265,7 @@ int Beb_GetNextFrameNumber(uint64_t *retval, int tengigaEnable) {
return OK; return OK;
} }
void Beb_SetPartialReadout(int value) { Beb_partialReadout = value; } void Beb_SetReadNRows(int value) { Beb_readNRows = value; }
int Beb_GetNumberofDestinations(int *retval) { int Beb_GetNumberofDestinations(int *retval) {
if (!Beb_activated) { if (!Beb_activated) {

View File

@ -1554,24 +1554,24 @@ int Feb_Control_SetChipSignalsToTrimQuad(int enable) {
return 1; return 1;
} }
int Feb_Control_SetPartialReadout(int value) { int Feb_Control_SetReadNRows(int value) {
LOG(logINFO, ("Setting Partial Readout to %d\n", value)); LOG(logINFO, ("Setting number of rows to %d\n", value));
if (!Feb_Interface_WriteRegister(Feb_Control_AddressToAll(), if (!Feb_Interface_WriteRegister(Feb_Control_AddressToAll(),
DAQ_REG_PARTIAL_READOUT, value, 0, 0)) { DAQ_REG_READ_N_ROWS, value, 0, 0)) {
LOG(logERROR, ("Could not write %d to Partial Readout reg\n", value)); LOG(logERROR, ("Could not write %d to number of rows reg\n", value));
return 0; return 0;
} }
return 1; return 1;
} }
int Feb_Control_GetPartialReadout() { int Feb_Control_GetReadNRows() {
uint32_t regVal = 0; uint32_t regVal = 0;
if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(), if (!Feb_Interface_ReadRegister(Feb_Control_AddressToAll(),
DAQ_REG_PARTIAL_READOUT, &regVal)) { DAQ_REG_READ_N_ROWS, &regVal)) {
LOG(logERROR, ("Could not read back Partial Readout reg\n")); LOG(logERROR, ("Could not read back ReadNRows reg\n"));
return -1; return -1;
} }
LOG(logDEBUG1, ("Retval Partial Readout: %d\n", regVal)); LOG(logDEBUG1, ("Retval ReadNRows: %d\n", regVal));
return regVal; return regVal;
} }

View File

@ -88,8 +88,8 @@ void Feb_Control_SetMasterVariable(int val);
int Feb_Control_SetMaster(enum MASTERINDEX ind); int Feb_Control_SetMaster(enum MASTERINDEX ind);
int Feb_Control_SetQuad(int val); int Feb_Control_SetQuad(int val);
int Feb_Control_SetChipSignalsToTrimQuad(int enable); int Feb_Control_SetChipSignalsToTrimQuad(int enable);
int Feb_Control_SetPartialReadout(int value); int Feb_Control_SetReadNRows(int value);
int Feb_Control_GetPartialReadout(); int Feb_Control_GetReadNRows();
int Feb_Control_WriteRegister(uint32_t offset, uint32_t data); int Feb_Control_WriteRegister(uint32_t offset, uint32_t data);
int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval); int Feb_Control_ReadRegister(uint32_t offset, uint32_t *retval);

View File

@ -13,7 +13,7 @@
#define DAQ_REG_EXPOSURE_REPEAT_TIMER 5 // == (31 downto 3) * 10^(2 downto 0) #define DAQ_REG_EXPOSURE_REPEAT_TIMER 5 // == (31 downto 3) * 10^(2 downto 0)
#define DAQ_REG_SUBFRAME_EXPOSURES 6 #define DAQ_REG_SUBFRAME_EXPOSURES 6
#define DAQ_REG_SUBFRAME_PERIOD 7 // also pg and fifo status register #define DAQ_REG_SUBFRAME_PERIOD 7 // also pg and fifo status register
#define DAQ_REG_PARTIAL_READOUT 8 #define DAQ_REG_READ_N_ROWS 8
#define DAQ_REG_HRDWRE 12 #define DAQ_REG_HRDWRE 12
// clang-format off // clang-format off

View File

@ -85,7 +85,7 @@ uint64_t eiger_virtual_nextframenumber = 1;
int eiger_virtual_detPos[2] = {0, 0}; int eiger_virtual_detPos[2] = {0, 0};
int eiger_virtual_test_mode = 0; int eiger_virtual_test_mode = 0;
int eiger_virtual_quad_mode = 0; int eiger_virtual_quad_mode = 0;
int eiger_virtual_partial_readout = 256; int eiger_virtual_read_n_rows = 256;
int eiger_virtual_interrupt_subframe = 0; int eiger_virtual_interrupt_subframe = 0;
int eiger_virtual_left_datastream = 1; int eiger_virtual_left_datastream = 1;
int eiger_virtual_right_datastream = 1; int eiger_virtual_right_datastream = 1;
@ -708,7 +708,7 @@ void setupDetector() {
setIODelay(DEFAULT_IO_DELAY); setIODelay(DEFAULT_IO_DELAY);
setTiming(DEFAULT_TIMING_MODE); setTiming(DEFAULT_TIMING_MODE);
setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER); setNextFrameNumber(DEFAULT_STARTING_FRAME_NUMBER);
setPartialReadout(MAX_ROWS_PER_READOUT); setReadNRows(MAX_ROWS_PER_READOUT);
// SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15); // SetPhotonEnergyCalibrationParameters(-5.8381e-5,1.838515,5.09948e-7,-4.32390e-11,1.32527e-15);
eiger_tau_ns = DEFAULT_RATE_CORRECTION; eiger_tau_ns = DEFAULT_RATE_CORRECTION;
setRateCorrection(DEFAULT_RATE_CORRECTION); setRateCorrection(DEFAULT_RATE_CORRECTION);
@ -1683,29 +1683,29 @@ int getInterruptSubframe() {
#endif #endif
} }
int setPartialReadout(int value) { int setReadNRows(int value) {
if (value < 0) if (value < 0)
return FAIL; return FAIL;
#ifndef VIRTUAL #ifndef VIRTUAL
sharedMemory_lockLocalLink(); sharedMemory_lockLocalLink();
if (!Feb_Control_SetPartialReadout(value)) { if (!Feb_Control_SetReadNRows(value)) {
sharedMemory_unlockLocalLink(); sharedMemory_unlockLocalLink();
return FAIL; return FAIL;
} }
sharedMemory_unlockLocalLink(); sharedMemory_unlockLocalLink();
Beb_SetPartialReadout(value); Beb_SetReadNRows(value);
#else #else
eiger_virtual_partial_readout = value; eiger_virtual_read_n_rows = value;
#endif #endif
return OK; return OK;
} }
int getPartialReadout() { int getReadNRows() {
#ifdef VIRTUAL #ifdef VIRTUAL
return eiger_virtual_partial_readout; return eiger_virtual_read_n_rows;
#else #else
sharedMemory_lockLocalLink(); sharedMemory_lockLocalLink();
int retval = Feb_Control_GetPartialReadout(); int retval = Feb_Control_GetReadNRows();
sharedMemory_unlockLocalLink(); sharedMemory_unlockLocalLink();
return retval; return retval;
#endif #endif
@ -2328,15 +2328,15 @@ void *start_timer(void *arg) {
int colLeft = top ? eiger_virtual_detPos[1] : eiger_virtual_detPos[1] + 1; int colLeft = top ? eiger_virtual_detPos[1] : eiger_virtual_detPos[1] + 1;
int colRight = top ? eiger_virtual_detPos[1] + 1 : eiger_virtual_detPos[1]; int colRight = top ? eiger_virtual_detPos[1] + 1 : eiger_virtual_detPos[1];
int partialReadout = getPartialReadout(); int readNRows = getReadNRows();
if (partialReadout == -1) { if (readNRows == -1) {
LOG(logERROR, LOG(logERROR,
("partial readout is -1. Assuming no partial readout.\n")); ("readNRows is -1. Assuming no readNRows.\n"));
partialReadout = MAX_ROWS_PER_READOUT; readNRows = MAX_ROWS_PER_READOUT;
} }
const int maxRows = MAX_ROWS_PER_READOUT; const int maxRows = MAX_ROWS_PER_READOUT;
const int packetsPerFrame = const int packetsPerFrame =
(maxPacketsPerFrame * partialReadout) / maxRows; (maxPacketsPerFrame * readNRows) / maxRows;
LOG(logDEBUG1, LOG(logDEBUG1,
@ -2419,7 +2419,7 @@ void *start_timer(void *arg) {
// loop packet // loop packet
for (int i = 0; i != maxPacketsPerFrame; ++i) { for (int i = 0; i != maxPacketsPerFrame; ++i) {
// calculate for partial readout // calculate for readNRows
const int startval = 0; const int startval = 0;
const int endval = startval + packetsPerFrame - 1; const int endval = startval + packetsPerFrame - 1;

View File

@ -167,13 +167,13 @@
#define ADC_PORT_INVERT_ADC_3_OFST (24) #define ADC_PORT_INVERT_ADC_3_OFST (24)
#define ADC_PORT_INVERT_ADC_3_MSK (0x000000FF << ADC_PORT_INVERT_ADC_3_OFST) #define ADC_PORT_INVERT_ADC_3_MSK (0x000000FF << ADC_PORT_INVERT_ADC_3_OFST)
/** Partial Readout Register */ /** Read N Rows Register */
#define PARTIAL_READOUT_REG (0x44 << MEM_MAP_SHIFT) #define READ_N_ROWS_REG (0x44 << MEM_MAP_SHIFT)
#define PARTIAL_READOUT_NUM_ROWS_OFST (0) #define READ_N_ROWS_NUM_ROWS_OFST (0)
#define PARTIAL_READOUT_NUM_ROWS_MSK (0x0000003F << PARTIAL_READOUT_NUM_ROWS_OFST) #define READ_N_ROWS_NUM_ROWS_MSK (0x0000003F << READ_N_ROWS_NUM_ROWS_OFST)
#define PARTIAL_READOUT_ENBL_OFST (7) #define READ_N_ROWS_ENBL_OFST (7)
#define PARTIAL_READOUT_ENBL_MSK (0x00000001 << PARTIAL_READOUT_ENBL_OFST) #define READ_N_ROWS_ENBL_MSK (0x00000001 << READ_N_ROWS_ENBL_OFST)
/* Configuration Register */ /* Configuration Register */

View File

@ -52,9 +52,6 @@ int detPos[4] = {};
int chipVersion = 10; // (1.0) int chipVersion = 10; // (1.0)
int chipConfigured = 0; int chipConfigured = 0;
// until firmware is done
int temp_partialReadout = 512;
int isInitCheckDone() { return initCheckDone; } int isInitCheckDone() { return initCheckDone; }
int getInitResult(char **mess) { int getInitResult(char **mess) {
@ -485,7 +482,7 @@ void setupDetector() {
setFilterCell(DEFAULT_FILTER_CELL); setFilterCell(DEFAULT_FILTER_CELL);
} }
disableCurrentSource(); disableCurrentSource();
setPartialReadout(MAX_ROWS_PER_READOUT); setReadNRows(MAX_ROWS_PER_READOUT);
} }
int resetToDefaultDacs(int hardReset) { int resetToDefaultDacs(int hardReset) {
@ -1636,45 +1633,39 @@ int *getDetectorPosition() { return detPos; }
/* jungfrau specific - powerchip, autocompdisable, asictimer, clockdiv, pll, /* jungfrau specific - powerchip, autocompdisable, asictimer, clockdiv, pll,
* flashing fpga */ * flashing fpga */
int setPartialReadout(int value) { int setReadNRows(int value) {
if (value < 0 || (value % PARTIAL_READOUT_MULTIPLE != 0)) if (value < 0 || (value % READ_N_ROWS_MULTIPLE != 0)) {
LOG(logERROR, ("Invalid number of rows %d\n", value));
return FAIL; return FAIL;
}
// will be replaced when firmware is fixed
temp_partialReadout = value;
return OK;
// regval is numpackets - 1 // regval is numpackets - 1
int regval = (value / PARTIAL_READOUT_MULTIPLE) - 1; int regval = (value / READ_N_ROWS_MULTIPLE) - 1;
uint32_t addr = PARTIAL_READOUT_REG; uint32_t addr = READ_N_ROWS_REG;
LOG(logINFO, ("Setting Partial Readout: %d (regval:%d)\n", value, regval)); LOG(logINFO, ("Setting number of rows: %d (regval:%d)\n", value, regval));
bus_w(addr, bus_r(addr) &~PARTIAL_READOUT_NUM_ROWS_MSK); bus_w(addr, bus_r(addr) &~READ_N_ROWS_NUM_ROWS_MSK);
bus_w(addr, bus_r(addr) | ((regval << PARTIAL_READOUT_NUM_ROWS_OFST) & PARTIAL_READOUT_NUM_ROWS_MSK)); bus_w(addr, bus_r(addr) | ((regval << READ_N_ROWS_NUM_ROWS_OFST) & READ_N_ROWS_NUM_ROWS_MSK));
if (value == MAX_ROWS_PER_READOUT) { if (value == MAX_ROWS_PER_READOUT) {
LOG(logINFO, ("Disabling Partial Readout\n")); LOG(logINFO, ("Disabling Partial Readout (#rows)\n"));
bus_w(addr, bus_r(addr) &~PARTIAL_READOUT_ENBL_MSK); bus_w(addr, bus_r(addr) &~READ_N_ROWS_ENBL_MSK);
} else { } else {
LOG(logINFO, ("Enabling Partial Readout\n")); LOG(logINFO, ("Enabling Partial Readout (#rows)\n"));
bus_w(addr, bus_r(addr) | PARTIAL_READOUT_ENBL_MSK); bus_w(addr, bus_r(addr) | READ_N_ROWS_ENBL_MSK);
} }
return OK; return OK;
} }
int getPartialReadout() { int getReadNRows() {
int enable = (bus_r(READ_N_ROWS_REG) & READ_N_ROWS_ENBL_MSK);
int regval = ((bus_r(READ_N_ROWS_REG) & READ_N_ROWS_NUM_ROWS_MSK) >> READ_N_ROWS_NUM_ROWS_OFST);
// will be replaced when firmware is fixed int maxRegval = (MAX_ROWS_PER_READOUT/ READ_N_ROWS_MULTIPLE) - 1;
return temp_partialReadout;
int enable = (bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_ENBL_MSK);
int regval = ((bus_r(PARTIAL_READOUT_REG) & PARTIAL_READOUT_NUM_ROWS_MSK) >> PARTIAL_READOUT_NUM_ROWS_OFST);
int maxRegval = (MAX_ROWS_PER_READOUT/ PARTIAL_READOUT_MULTIPLE) - 1;
if ((regval == maxRegval && enable) || (regval != maxRegval && !enable)) { if ((regval == maxRegval && enable) || (regval != maxRegval && !enable)) {
return -1; return -1;
} }
return (regval + 1) * PARTIAL_READOUT_MULTIPLE; return (regval + 1) * READ_N_ROWS_MULTIPLE;
} }
void initReadoutConfiguration() { void initReadoutConfiguration() {
@ -2354,14 +2345,14 @@ void *start_timer(void *arg) {
const int packetsize = dataSize + sizeof(sls_detector_header); const int packetsize = dataSize + sizeof(sls_detector_header);
const int maxPacketsPerFrame = 128; const int maxPacketsPerFrame = 128;
const int maxRows = MAX_ROWS_PER_READOUT; const int maxRows = MAX_ROWS_PER_READOUT;
int partialReadout = getPartialReadout(); int readNRows = getReadNRows();
if (partialReadout == -1) { if (readNRows == -1) {
LOG(logERROR, LOG(logERROR,
("partial readout is -1. Assuming no partial readout.\n")); ("number of rows is -1. Assuming no partial readout (#rows).\n"));
partialReadout = MAX_ROWS_PER_READOUT; readNRows = MAX_ROWS_PER_READOUT;
} }
const int packetsPerFrame = const int packetsPerFrame =
((maxPacketsPerFrame / 2) * partialReadout) / (maxRows / 2); ((maxPacketsPerFrame / 2) * readNRows) / (maxRows / 2);
// Generate data // Generate data
char imageData[DATA_BYTES]; char imageData[DATA_BYTES];

View File

@ -116,7 +116,7 @@ enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
#define MAX_FILTER_CELL_VAL (12) #define MAX_FILTER_CELL_VAL (12)
#define MIN_ROWS_PER_READOUT (8) #define MIN_ROWS_PER_READOUT (8)
#define MAX_ROWS_PER_READOUT (512) #define MAX_ROWS_PER_READOUT (512)
#define PARTIAL_READOUT_MULTIPLE (8) //512 rows/128packets * 2 interfaces #define READ_N_ROWS_MULTIPLE (8) //512 rows/128packets * 2 interfaces
/* Defines in the Firmware */ /* Defines in the Firmware */
#define MAX_TIMESLOT_VAL (0x1F) #define MAX_TIMESLOT_VAL (0x1F)

View File

@ -417,8 +417,8 @@ int setQuad(int value);
int getQuad(); int getQuad();
int setInterruptSubframe(int value); int setInterruptSubframe(int value);
int getInterruptSubframe(); int getInterruptSubframe();
int setPartialReadout(int value); int setReadNRows(int value);
int getPartialReadout(); int getReadNRows();
#endif #endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(EIGERD) || \ #if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(EIGERD) || \
defined(MYTHEN3D) defined(MYTHEN3D)
@ -457,8 +457,8 @@ void setDigitalIODelay(uint64_t pinMask, int delay);
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock, // jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock,
// pll, flashing firmware // pll, flashing firmware
#ifdef JUNGFRAUD #ifdef JUNGFRAUD
int setPartialReadout(int value); int setReadNRows(int value);
int getPartialReadout(); int getReadNRows();
void initReadoutConfiguration(); void initReadoutConfiguration();
int powerChip(int on); int powerChip(int on);
int isChipConfigured(); int isChipConfigured();

View File

@ -144,8 +144,8 @@ int set_quad(int);
int get_quad(int); int get_quad(int);
int set_interrupt_subframe(int); int set_interrupt_subframe(int);
int get_interrupt_subframe(int); int get_interrupt_subframe(int);
int set_partial_readout(int); int set_read_n_rows(int);
int get_partial_readout(int); int get_read_n_rows(int);
void calculate_and_set_position(); void calculate_and_set_position();
int set_detector_position(int); int set_detector_position(int);
int check_detector_idle(const char *s); int check_detector_idle(const char *s);

View File

@ -284,8 +284,8 @@ void function_table() {
flist[F_GET_QUAD] = &get_quad; flist[F_GET_QUAD] = &get_quad;
flist[F_SET_INTERRUPT_SUBFRAME] = &set_interrupt_subframe; flist[F_SET_INTERRUPT_SUBFRAME] = &set_interrupt_subframe;
flist[F_GET_INTERRUPT_SUBFRAME] = &get_interrupt_subframe; flist[F_GET_INTERRUPT_SUBFRAME] = &get_interrupt_subframe;
flist[F_SET_PARTIAL_READOUT] = &set_partial_readout; flist[F_SET_READ_N_ROWS] = &set_read_n_rows;
flist[F_GET_PARTIAL_READOUT] = &get_partial_readout; flist[F_GET_READ_N_ROWS] = &get_read_n_rows;
flist[F_SET_POSITION] = &set_detector_position; flist[F_SET_POSITION] = &set_detector_position;
flist[F_SET_SOURCE_UDP_MAC] = &set_source_udp_mac; flist[F_SET_SOURCE_UDP_MAC] = &set_source_udp_mac;
flist[F_GET_SOURCE_UDP_MAC] = &get_source_udp_mac; flist[F_GET_SOURCE_UDP_MAC] = &get_source_udp_mac;
@ -4741,14 +4741,14 @@ int get_interrupt_subframe(int file_des) {
return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
} }
int set_partial_readout(int file_des) { int set_read_n_rows(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int arg = 0; int arg = 0;
if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0) if (receiveData(file_des, &arg, sizeof(arg), INT32) < 0)
return printSocketReadError(); return printSocketReadError();
LOG(logDEBUG1, ("Setting partial readout: %u\n", arg)); LOG(logDEBUG1, ("Setting number of rows: %u\n", arg));
#if !defined(EIGERD) && !defined(JUNGFRAUD) #if !defined(EIGERD) && !defined(JUNGFRAUD)
functionNotImplemented(); functionNotImplemented();
@ -4758,7 +4758,7 @@ int set_partial_readout(int file_des) {
if (arg <= 0 || arg > MAX_ROWS_PER_READOUT) { if (arg <= 0 || arg > MAX_ROWS_PER_READOUT) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess,
"Could not set partial readout. Must be between %d " "Could not set read n rows. Must be between %d "
"and %d\n", "and %d\n",
MIN_ROWS_PER_READOUT, MAX_ROWS_PER_READOUT); MIN_ROWS_PER_READOUT, MAX_ROWS_PER_READOUT);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
@ -4771,7 +4771,7 @@ int set_partial_readout(int file_des) {
if ((arg * maxnp) % maxnl) { if ((arg * maxnp) % maxnl) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess,
"Could not set %d partial readout. For %d bit " "Could not set number of rows to %d. For %d bit "
"mode and 10 giga %s, (%d (num " "mode and 10 giga %s, (%d (num "
"rows) x %d (max num packets for this mode)) must be " "rows) x %d (max num packets for this mode)) must be "
"divisible by %d\n", "divisible by %d\n",
@ -4780,26 +4780,26 @@ int set_partial_readout(int file_des) {
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else } else
#elif JUNGFRAUD #elif JUNGFRAUD
if ((check_detector_idle("set partial readout") == OK) && (arg % PARTIAL_READOUT_MULTIPLE != 0)) { if ((check_detector_idle("set nmber of rows") == OK) && (arg % READ_N_ROWS_MULTIPLE != 0)) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess,
"Could not set partial readout. %d must be a multiple " "Could not set number of rows. %d must be a multiple "
"of %d\n", "of %d\n",
arg, PARTIAL_READOUT_MULTIPLE); arg, READ_N_ROWS_MULTIPLE);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else } else
#endif #endif
{ {
if (setPartialReadout(arg) == FAIL) { if (setReadNRows(arg) == FAIL) {
ret = FAIL; ret = FAIL;
sprintf(mess, "Could not set partial readout to %d.\n", arg); sprintf(mess, "Could not set number of rows to %d.\n", arg);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
int retval = getPartialReadout(); int retval = getReadNRows();
if (arg != retval) { if (arg != retval) {
ret = FAIL; ret = FAIL;
sprintf(mess, sprintf(mess,
"Could not set partial readout. Set %d, but " "Could not set number of rows. Set %d, but "
"read %d\n", "read %d\n",
retval, arg); retval, arg);
LOG(logERROR, (mess)); LOG(logERROR, (mess));
@ -4812,24 +4812,24 @@ int set_partial_readout(int file_des) {
return Server_SendResult(file_des, INT32, NULL, 0); return Server_SendResult(file_des, INT32, NULL, 0);
} }
int get_partial_readout(int file_des) { int get_read_n_rows(int file_des) {
ret = OK; ret = OK;
memset(mess, 0, sizeof(mess)); memset(mess, 0, sizeof(mess));
int retval = -1; int retval = -1;
LOG(logDEBUG1, ("Getting partial readout\n")); LOG(logDEBUG1, ("Getting number of rows\n"));
#if !defined(EIGERD) && !defined(JUNGFRAUD) #if !defined(EIGERD) && !defined(JUNGFRAUD)
functionNotImplemented(); functionNotImplemented();
#else #else
// get only // get only
retval = getPartialReadout(); retval = getReadNRows();
if (retval == -1) { if (retval == -1) {
ret = FAIL; ret = FAIL;
sprintf(mess, "Could not get partial readout. \n"); sprintf(mess, "Could not get numbr of rows. \n");
LOG(logERROR, (mess)); LOG(logERROR, (mess));
} else { } else {
LOG(logDEBUG1, ("Partial readout retval: %u\n", retval)); LOG(logDEBUG1, ("number of rows retval: %u\n", retval));
} }
#endif #endif
return Server_SendResult(file_des, INT32, &retval, sizeof(retval)); return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
@ -7211,9 +7211,9 @@ int get_receiver_parameters(int file_des) {
if (n < 0) if (n < 0)
return printSocketReadError(); return printSocketReadError();
// partialReadout // ReadNRows
#if defined(EIGERD) || defined(JUNGFRAUD) #if defined(EIGERD) || defined(JUNGFRAUD)
i32 = getPartialReadout(); i32 = getReadNRows();
#else #else
i32 = 0; i32 = 0;
#endif #endif

View File

@ -510,13 +510,13 @@ class Detector {
void setDBITPipeline(int value, Positions pos = {}); void setDBITPipeline(int value, Positions pos = {});
/** [Eiger][Jungfrau] */ /** [Eiger][Jungfrau] */
Result<int> getPartialReadout(Positions pos = {}) const; Result<int> getReadNRows(Positions pos = {}) const;
/** [Eiger] Number of lines to read out per half module /** [Eiger] Number of rows to read out per half module
* Options: 0 - 256. 256 is default. The permissible values depend on * Options: 0 - 256. 256 is default. The permissible values depend on
* dynamic range and 10Gbe enabled. \n[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512. * dynamic range and 10Gbe enabled. \n[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512.
*/ */
void setPartialReadout(const int lines, Positions pos = {}); void setReadNRows(const int lines, Positions pos = {});
///@{ ///@{

View File

@ -593,7 +593,7 @@ class CmdProxy {
{"vhighvoltage", "highvoltage"}, {"vhighvoltage", "highvoltage"},
{"digitest", "imagetest"}, {"digitest", "imagetest"},
{"filter", "filterresistor"}, {"filter", "filterresistor"},
{"readnlines", "partialread"}, {"readnlines", "readnrows"},
/** temperature */ /** temperature */
@ -807,7 +807,7 @@ class CmdProxy {
{"filterresistor", &CmdProxy::filterresistor}, {"filterresistor", &CmdProxy::filterresistor},
{"currentsource", &CmdProxy::CurrentSource}, {"currentsource", &CmdProxy::CurrentSource},
{"dbitpipeline", &CmdProxy::dbitpipeline}, {"dbitpipeline", &CmdProxy::dbitpipeline},
{"partialread", &CmdProxy::partialread}, {"readnrows", &CmdProxy::readnrows},
/** temperature */ /** temperature */
{"templist", &CmdProxy::templist}, {"templist", &CmdProxy::templist},
@ -1376,7 +1376,7 @@ class CmdProxy {
"Options: 0-7\n\t[CTB] Options: 0-255"); "Options: 0-7\n\t[CTB] Options: 0-255");
INTEGER_COMMAND_VEC_ID( INTEGER_COMMAND_VEC_ID(
partialread, getPartialReadout, setPartialReadout, StringTo<int>, readnrows, getReadNRows, setReadNRows, StringTo<int>,
"[1 - 256]\n\t[Eiger] Number of rows to readout per half module " "[1 - 256]\n\t[Eiger] Number of rows to readout per half module "
"starting from the centre. Options: 0 - 256. 256 is default. The " "starting from the centre. Options: 0 - 256. 256 is default. The "
"permissible values depend on dynamic range and 10Gbe enabled.\n[8-512 (multiple of 8)]\n\t[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512."); "permissible values depend on dynamic range and 10Gbe enabled.\n[8-512 (multiple of 8)]\n\t[Jungfrau] Number of rows per module starting from the centre. Options: 8 - 512, must be multiples of 8. Default is 512.");

View File

@ -732,12 +732,12 @@ void Detector::setDBITPipeline(int value, Positions pos) {
pimpl->Parallel(&Module::setDBITPipeline, pos, value); pimpl->Parallel(&Module::setDBITPipeline, pos, value);
} }
Result<int> Detector::getPartialReadout(Positions pos) const { Result<int> Detector::getReadNRows(Positions pos) const {
return pimpl->Parallel(&Module::getPartialReadout, pos); return pimpl->Parallel(&Module::getReadNRows, pos);
} }
void Detector::setPartialReadout(const int lines, Positions pos) { void Detector::setReadNRows(const int lines, Positions pos) {
pimpl->Parallel(&Module::setPartialReadout, pos, lines); pimpl->Parallel(&Module::setReadNRows, pos, lines);
} }
// Acquisition // Acquisition

View File

@ -734,14 +734,14 @@ void Module::setDBITPipeline(int value) {
sendToDetector(F_SET_DBIT_PIPELINE, value, nullptr); sendToDetector(F_SET_DBIT_PIPELINE, value, nullptr);
} }
int Module::getPartialReadout() const { int Module::getReadNRows() const {
return sendToDetector<int>(F_GET_PARTIAL_READOUT); return sendToDetector<int>(F_GET_READ_N_ROWS);
} }
void Module::setPartialReadout(const int value) { void Module::setReadNRows(const int value) {
sendToDetector(F_SET_PARTIAL_READOUT, value, nullptr); sendToDetector(F_SET_READ_N_ROWS, value, nullptr);
if (shm()->useReceiverFlag) { if (shm()->useReceiverFlag) {
sendToReceiver(F_SET_RECEIVER_PARTIAL_READOUT, value, nullptr); sendToReceiver(F_SET_RECEIVER_READ_N_ROWS, value, nullptr);
} }
} }

View File

@ -178,8 +178,8 @@ class Module : public virtual slsDetectorDefs {
void setCurrentSource(defs::currentSrcParameters par); void setCurrentSource(defs::currentSrcParameters par);
int getDBITPipeline() const; int getDBITPipeline() const;
void setDBITPipeline(int value); void setDBITPipeline(int value);
int getPartialReadout() const; int getReadNRows() const;
void setPartialReadout(const int value); void setReadNRows(const int value);
/************************************************** /**************************************************
* * * *
* Acquisition * * Acquisition *

View File

@ -1494,40 +1494,40 @@ TEST_CASE("dbitpipeline", "[.cmd]") {
} }
} }
TEST_CASE("partialread", "[.cmd]") { TEST_CASE("readnrows", "[.cmd]") {
Detector det; Detector det;
CmdProxy proxy(&det); CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash(); auto det_type = det.getDetectorType().squash();
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) { if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
auto prev_val = det.getPartialReadout(); auto prev_val = det.getReadNRows();
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("partialread", {"256"}, -1, PUT, oss); proxy.Call("readnrows", {"256"}, -1, PUT, oss);
REQUIRE(oss.str() == "partialread 256\n"); REQUIRE(oss.str() == "readnrows 256\n");
} }
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("partialread", {}, -1, GET, oss); proxy.Call("readnrows", {}, -1, GET, oss);
REQUIRE(oss.str() == "partialread 256\n"); REQUIRE(oss.str() == "readnrows 256\n");
} }
{ {
std::ostringstream oss; std::ostringstream oss;
proxy.Call("partialread", {"16"}, -1, PUT, oss); proxy.Call("readnrows", {"16"}, -1, PUT, oss);
REQUIRE(oss.str() == "partialread 16\n"); REQUIRE(oss.str() == "readnrows 16\n");
} }
if (det_type == defs::JUNGFRAU) { if (det_type == defs::JUNGFRAU) {
REQUIRE_THROWS(proxy.Call("partialread", {"7"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"7"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("partialread", {"20"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"20"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("partialread", {"44"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"44"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("partialread", {"513"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"513"}, -1, PUT));
REQUIRE_THROWS(proxy.Call("partialread", {"1"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"1"}, -1, PUT));
} }
REQUIRE_THROWS(proxy.Call("partialread", {"0"}, -1, PUT)); REQUIRE_THROWS(proxy.Call("readnrows", {"0"}, -1, PUT));
for (int i = 0; i != det.size(); ++i) { for (int i = 0; i != det.size(); ++i) {
det.setPartialReadout(prev_val[i], {i}); det.setReadNRows(prev_val[i], {i});
} }
} else { } else {
REQUIRE_THROWS(proxy.Call("partialread", {}, -1, GET)); REQUIRE_THROWS(proxy.Call("readnrows", {}, -1, GET));
} }
} }

View File

@ -187,7 +187,7 @@ int ClientInterface::functionTable(){
flist[F_SET_RECEIVER_DBIT_OFFSET] = &ClientInterface::set_dbit_offset; flist[F_SET_RECEIVER_DBIT_OFFSET] = &ClientInterface::set_dbit_offset;
flist[F_GET_RECEIVER_DBIT_OFFSET] = &ClientInterface::get_dbit_offset; flist[F_GET_RECEIVER_DBIT_OFFSET] = &ClientInterface::get_dbit_offset;
flist[F_SET_RECEIVER_QUAD] = &ClientInterface::set_quad_type; flist[F_SET_RECEIVER_QUAD] = &ClientInterface::set_quad_type;
flist[F_SET_RECEIVER_PARTIAL_READOUT] = &ClientInterface::set_partial_readout; flist[F_SET_RECEIVER_READ_N_ROWS] = &ClientInterface::set_read_n_rows;
flist[F_SET_RECEIVER_UDP_IP] = &ClientInterface::set_udp_ip; flist[F_SET_RECEIVER_UDP_IP] = &ClientInterface::set_udp_ip;
flist[F_SET_RECEIVER_UDP_IP2] = &ClientInterface::set_udp_ip2; flist[F_SET_RECEIVER_UDP_IP2] = &ClientInterface::set_udp_ip2;
flist[F_SET_RECEIVER_UDP_PORT] = &ClientInterface::set_udp_port; flist[F_SET_RECEIVER_UDP_PORT] = &ClientInterface::set_udp_port;
@ -417,7 +417,7 @@ int ClientInterface::setup_receiver(Interface &socket) {
impl()->setThresholdEnergy(arg.thresholdEnergyeV[0]); impl()->setThresholdEnergy(arg.thresholdEnergyeV[0]);
} }
if (myDetectorType == EIGER || myDetectorType == JUNGFRAU) { if (myDetectorType == EIGER || myDetectorType == JUNGFRAU) {
impl()->setPartialReadout(arg.partialReadout); impl()->setReadNRows(arg.readNRows);
} }
if (myDetectorType == MYTHEN3) { if (myDetectorType == MYTHEN3) {
std::array<int, 3> val; std::array<int, 3> val;
@ -1406,19 +1406,19 @@ int ClientInterface::set_quad_type(Interface &socket) {
return socket.Send(OK); return socket.Send(OK);
} }
int ClientInterface::set_partial_readout(Interface &socket) { int ClientInterface::set_read_n_rows(Interface &socket) {
auto arg = socket.Receive<int>(); auto arg = socket.Receive<int>();
if (arg >= 0) { if (arg >= 0) {
verifyIdle(socket); verifyIdle(socket);
if (myDetectorType != EIGER && myDetectorType != JUNGFRAU) { if (myDetectorType != EIGER && myDetectorType != JUNGFRAU) {
throw RuntimeError("Could not set partial readout. Not implemented for this detector"); throw RuntimeError("Could not set number of rows. Not implemented for this detector");
} }
LOG(logDEBUG1) << "Setting Partial Readout:" << arg; LOG(logDEBUG1) << "Setting number of rows:" << arg;
impl()->setPartialReadout(arg); impl()->setReadNRows(arg);
} }
int retval = impl()->getPartialReadout(); int retval = impl()->getReadNRows();
validate(arg, retval, "set partial readout", DEC); validate(arg, retval, "set number of rows", DEC);
LOG(logDEBUG1) << "read partial readout:" << retval; LOG(logDEBUG1) << "read number of rows:" << retval;
return socket.Send(OK); return socket.Send(OK);
} }

View File

@ -138,7 +138,7 @@ class ClientInterface : private virtual slsDetectorDefs {
int set_dbit_offset(sls::ServerInterface &socket); int set_dbit_offset(sls::ServerInterface &socket);
int get_dbit_offset(sls::ServerInterface &socket); int get_dbit_offset(sls::ServerInterface &socket);
int set_quad_type(sls::ServerInterface &socket); int set_quad_type(sls::ServerInterface &socket);
int set_partial_readout(sls::ServerInterface &socket); int set_read_n_rows(sls::ServerInterface &socket);
sls::MacAddr setUdpIp(sls::IpAddr arg); sls::MacAddr setUdpIp(sls::IpAddr arg);
int set_udp_ip(sls::ServerInterface &socket); int set_udp_ip(sls::ServerInterface &socket);
sls::MacAddr setUdpIp2(sls::IpAddr arg); sls::MacAddr setUdpIp2(sls::IpAddr arg);

View File

@ -476,9 +476,9 @@ std::vector<uint64_t> Implementation::getNumMissingPackets() const {
for (int i = 0; i < numThreads; i++) { for (int i = 0; i < numThreads; i++) {
int np = generalData->packetsPerFrame; int np = generalData->packetsPerFrame;
uint64_t totnp = np; uint64_t totnp = np;
// partial readout // ReadNRows
if (partialReadout != (int)generalData->maxRowsPerReadout) { if (readNRows != (int)generalData->maxRowsPerReadout) {
totnp = ((partialReadout * np) / generalData->maxRowsPerReadout); totnp = ((readNRows * np) / generalData->maxRowsPerReadout);
} }
totnp *= numberOfTotalFrames; totnp *= numberOfTotalFrames;
mp[i] = listener[i]->GetNumMissingPacket(stoppedFlag, totnp); mp[i] = listener[i]->GetNumMissingPacket(stoppedFlag, totnp);
@ -765,7 +765,7 @@ void Implementation::SetupWriter() {
masterAttributes->subExptime = subExpTime; masterAttributes->subExptime = subExpTime;
masterAttributes->subPeriod = subPeriod; masterAttributes->subPeriod = subPeriod;
masterAttributes->quad = quadEnable; masterAttributes->quad = quadEnable;
masterAttributes->partialReadout = partialReadout; masterAttributes->readNRows = readNRows;
masterAttributes->ratecorr = rateCorrections; masterAttributes->ratecorr = rateCorrections;
masterAttributes->adcmask = masterAttributes->adcmask =
tengigaEnable ? adcEnableMaskTenGiga : adcEnableMaskOneGiga; tengigaEnable ? adcEnableMaskTenGiga : adcEnableMaskOneGiga;
@ -1533,11 +1533,11 @@ void Implementation::setDeactivatedPadding(bool enable) {
<< (deactivatedPaddingEnable ? "enabled" : "disabled"); << (deactivatedPaddingEnable ? "enabled" : "disabled");
} }
int Implementation::getPartialReadout() const { return partialReadout; } int Implementation::getReadNRows() const { return readNRows; }
void Implementation::setPartialReadout(const int value) { void Implementation::setReadNRows(const int value) {
partialReadout = value; readNRows = value;
LOG(logINFO) << "Partial readout (#rows): " << partialReadout; LOG(logINFO) << "Number of rows: " << readNRows;
} }
void Implementation::setThresholdEnergy(const int value) { void Implementation::setThresholdEnergy(const int value) {

View File

@ -218,9 +218,9 @@ class Implementation : private virtual slsDetectorDefs {
bool getDeactivatedPadding() const; bool getDeactivatedPadding() const;
/* [Eiger] */ /* [Eiger] */
void setDeactivatedPadding(const bool enable); void setDeactivatedPadding(const bool enable);
int getPartialReadout() const; int getReadNRows() const;
/* [Eiger][Jungfrau] */ /* [Eiger][Jungfrau] */
void setPartialReadout(const int value); void setReadNRows(const int value);
/** [Eiger] */ /** [Eiger] */
void setThresholdEnergy(const int value); void setThresholdEnergy(const int value);
void setThresholdEnergy(const std::array<int, 3> value); void setThresholdEnergy(const std::array<int, 3> value);
@ -352,7 +352,7 @@ class Implementation : private virtual slsDetectorDefs {
bool activated{true}; bool activated{true};
std::array<bool, 2> detectorDataStream = {{true, true}}; std::array<bool, 2> detectorDataStream = {{true, true}};
bool deactivatedPaddingEnable{true}; bool deactivatedPaddingEnable{true};
int partialReadout{0}; int readNRows{0};
int thresholdEnergyeV{-1}; int thresholdEnergyeV{-1};
std::array<int, 3> thresholdAllEnergyeV = {{-1, -1, -1}}; std::array<int, 3> thresholdAllEnergyeV = {{-1, -1, -1}};
std::vector<int64_t> rateCorrections; std::vector<int64_t> rateCorrections;

View File

@ -37,7 +37,7 @@ struct MasterAttributes {
ns subExptime{0}; ns subExptime{0};
ns subPeriod{0}; ns subPeriod{0};
uint32_t quad{0}; uint32_t quad{0};
uint32_t partialReadout; uint32_t readNRows;
std::vector<int64_t> ratecorr; std::vector<int64_t> ratecorr;
uint32_t adcmask{0}; uint32_t adcmask{0};
uint32_t analog{0}; uint32_t analog{0};
@ -337,7 +337,7 @@ class JungfrauMasterAttributes : public MasterAttributes {
<< "Exptime : " << sls::ToString(exptime) << '\n' << "Exptime : " << sls::ToString(exptime) << '\n'
<< "Period : " << sls::ToString(period) << '\n' << "Period : " << sls::ToString(period) << '\n'
<< "Number of UDP Interfaces : " << numUDPInterfaces << '\n' << "Number of UDP Interfaces : " << numUDPInterfaces << '\n'
<< "Partial Readout (rows) : " << partialReadout << '\n'; << "Number of rows : " << readNRows << '\n';
std::string message = oss.str(); std::string message = oss.str();
MasterAttributes::WriteBinaryAttributes(fd, message); MasterAttributes::WriteBinaryAttributes(fd, message);
}; };
@ -353,12 +353,12 @@ class JungfrauMasterAttributes : public MasterAttributes {
"Number of UDP Interfaces", PredType::NATIVE_INT, dataspace); "Number of UDP Interfaces", PredType::NATIVE_INT, dataspace);
dataset.write(&numUDPInterfaces, PredType::NATIVE_INT); dataset.write(&numUDPInterfaces, PredType::NATIVE_INT);
} }
// partialReadout // readNRows
{ {
DataSpace dataspace = DataSpace(H5S_SCALAR); DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet( DataSet dataset = group->createDataSet(
"Partial readout (rows)", PredType::NATIVE_INT, dataspace); "Number of rows", PredType::NATIVE_INT, dataspace);
dataset.write(&partialReadout, PredType::NATIVE_INT); dataset.write(&readNRows, PredType::NATIVE_INT);
} }
}; };
#endif #endif
@ -381,7 +381,7 @@ class EigerMasterAttributes : public MasterAttributes {
<< "SubPeriod : " << sls::ToString(subPeriod) << "SubPeriod : " << sls::ToString(subPeriod)
<< '\n' << '\n'
<< "Quad : " << quad << '\n' << "Quad : " << quad << '\n'
<< "Partial Readout (rows) : " << partialReadout << '\n' << "Number of rows : " << readNRows << '\n'
<< "Rate Corrections : " << sls::ToString(ratecorr) << "Rate Corrections : " << sls::ToString(ratecorr)
<< '\n'; << '\n';
std::string message = oss.str(); std::string message = oss.str();
@ -435,12 +435,12 @@ class EigerMasterAttributes : public MasterAttributes {
group->createDataSet("Quad", PredType::NATIVE_INT, dataspace); group->createDataSet("Quad", PredType::NATIVE_INT, dataspace);
dataset.write(&quad, PredType::NATIVE_INT); dataset.write(&quad, PredType::NATIVE_INT);
} }
// partialReadout // readNRows
{ {
DataSpace dataspace = DataSpace(H5S_SCALAR); DataSpace dataspace = DataSpace(H5S_SCALAR);
DataSet dataset = group->createDataSet( DataSet dataset = group->createDataSet(
"Partial readout (rows)", PredType::NATIVE_INT, dataspace); "Number of rows", PredType::NATIVE_INT, dataspace);
dataset.write(&partialReadout, PredType::NATIVE_INT); dataset.write(&readNRows, PredType::NATIVE_INT);
} }
// Rate corrections // Rate corrections
{ {

View File

@ -523,7 +523,7 @@ typedef struct {
int dataStreamLeft{0}; int dataStreamLeft{0};
int dataStreamRight{0}; int dataStreamRight{0};
int quad{0}; int quad{0};
int partialReadout{0}; int readNRows{0};
int thresholdEnergyeV[3]{0, 0, 0}; int thresholdEnergyeV[3]{0, 0, 0};
int dynamicRange{16}; int dynamicRange{16};
timingMode timMode{AUTO_TIMING}; timingMode timMode{AUTO_TIMING};

View File

@ -124,8 +124,8 @@ enum detFuncs {
F_GET_QUAD, F_GET_QUAD,
F_SET_INTERRUPT_SUBFRAME, F_SET_INTERRUPT_SUBFRAME,
F_GET_INTERRUPT_SUBFRAME, F_GET_INTERRUPT_SUBFRAME,
F_SET_PARTIAL_READOUT, F_SET_READ_N_ROWS,
F_GET_PARTIAL_READOUT, F_GET_READ_N_ROWS,
F_SET_POSITION, F_SET_POSITION,
F_SET_SOURCE_UDP_MAC, F_SET_SOURCE_UDP_MAC,
F_GET_SOURCE_UDP_MAC, F_GET_SOURCE_UDP_MAC,
@ -332,7 +332,7 @@ enum detFuncs {
F_SET_RECEIVER_DBIT_OFFSET, F_SET_RECEIVER_DBIT_OFFSET,
F_GET_RECEIVER_DBIT_OFFSET, F_GET_RECEIVER_DBIT_OFFSET,
F_SET_RECEIVER_QUAD, F_SET_RECEIVER_QUAD,
F_SET_RECEIVER_PARTIAL_READOUT, F_SET_RECEIVER_READ_N_ROWS,
F_SET_RECEIVER_UDP_IP, F_SET_RECEIVER_UDP_IP,
F_SET_RECEIVER_UDP_IP2, F_SET_RECEIVER_UDP_IP2,
F_SET_RECEIVER_UDP_PORT, F_SET_RECEIVER_UDP_PORT,
@ -483,8 +483,8 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_GET_QUAD: return "F_GET_QUAD"; case F_GET_QUAD: return "F_GET_QUAD";
case F_SET_INTERRUPT_SUBFRAME: return "F_SET_INTERRUPT_SUBFRAME"; case F_SET_INTERRUPT_SUBFRAME: return "F_SET_INTERRUPT_SUBFRAME";
case F_GET_INTERRUPT_SUBFRAME: return "F_GET_INTERRUPT_SUBFRAME"; case F_GET_INTERRUPT_SUBFRAME: return "F_GET_INTERRUPT_SUBFRAME";
case F_SET_PARTIAL_READOUT: return "F_SET_PARTIAL_READOUT"; case F_SET_READ_N_ROWS: return "F_SET_READ_N_ROWS";
case F_GET_PARTIAL_READOUT: return "F_GET_PARTIAL_READOUT"; case F_GET_READ_N_ROWS: return "F_GET_READ_N_ROWS";
case F_SET_POSITION: return "F_SET_POSITION"; case F_SET_POSITION: return "F_SET_POSITION";
case F_SET_SOURCE_UDP_MAC: return "F_SET_SOURCE_UDP_MAC"; case F_SET_SOURCE_UDP_MAC: return "F_SET_SOURCE_UDP_MAC";
case F_GET_SOURCE_UDP_MAC: return "F_GET_SOURCE_UDP_MAC"; case F_GET_SOURCE_UDP_MAC: return "F_GET_SOURCE_UDP_MAC";
@ -689,7 +689,7 @@ const char* getFunctionNameFromEnum(enum detFuncs func) {
case F_SET_RECEIVER_DBIT_OFFSET: return "F_SET_RECEIVER_DBIT_OFFSET"; case F_SET_RECEIVER_DBIT_OFFSET: return "F_SET_RECEIVER_DBIT_OFFSET";
case F_GET_RECEIVER_DBIT_OFFSET: return "F_GET_RECEIVER_DBIT_OFFSET"; case F_GET_RECEIVER_DBIT_OFFSET: return "F_GET_RECEIVER_DBIT_OFFSET";
case F_SET_RECEIVER_QUAD: return "F_SET_RECEIVER_QUAD"; case F_SET_RECEIVER_QUAD: return "F_SET_RECEIVER_QUAD";
case F_SET_RECEIVER_PARTIAL_READOUT: return "F_SET_RECEIVER_PARTIAL_READOUT"; case F_SET_RECEIVER_READ_N_ROWS: return "F_SET_RECEIVER_READ_N_ROWS";
case F_SET_RECEIVER_UDP_IP: return "F_SET_RECEIVER_UDP_IP"; case F_SET_RECEIVER_UDP_IP: return "F_SET_RECEIVER_UDP_IP";
case F_SET_RECEIVER_UDP_IP2: return "F_SET_RECEIVER_UDP_IP2"; case F_SET_RECEIVER_UDP_IP2: return "F_SET_RECEIVER_UDP_IP2";
case F_SET_RECEIVER_UDP_PORT: return "F_SET_RECEIVER_UDP_PORT"; case F_SET_RECEIVER_UDP_PORT: return "F_SET_RECEIVER_UDP_PORT";

View File

@ -1,11 +1,9 @@
/** API versions */ /** API versions */
#define GITBRANCH "roundrobin" #define GITBRANCH "roundrobin"
#define APILIB 0x210831 #define APILIB 0x210831
#define APIRECEIVER 0x210831 #define APIRECEIVER 0x210831
#define APIGUI 0x210819 #define APIGUI 0x210819
#define APICTB 0x210907 #define APICTB 0x210907
#define APIGOTTHARD 0x210907 #define APIGOTTHARD 0x210907
#define APIGOTTHARD2 0x210907 #define APIGOTTHARD2 0x210907

View File

@ -55,7 +55,7 @@ std::string ToString(const slsDetectorDefs::rxParameters &r) {
<< "leftDataStream:" << r.dataStreamLeft << std::endl << "leftDataStream:" << r.dataStreamLeft << std::endl
<< "rightDataStream:" << r.dataStreamRight << std::endl << "rightDataStream:" << r.dataStreamRight << std::endl
<< "quad:" << r.quad << std::endl << "quad:" << r.quad << std::endl
<< "partialReadout:" << r.partialReadout << std::endl << "readNRows:" << r.readNRows << std::endl
<< "thresholdEnergyeV:" << ToString(r.thresholdEnergyeV) << std::endl << "thresholdEnergyeV:" << ToString(r.thresholdEnergyeV) << std::endl
<< "dynamicRange:" << r.dynamicRange << std::endl << "dynamicRange:" << r.dynamicRange << std::endl
<< "timMode:" << r.timMode << std::endl << "timMode:" << r.timMode << std::endl