G2parallel (#514)

* g2: non parallel added
This commit is contained in:
Dhanya Thattil
2022-08-16 09:35:39 +02:00
committed by GitHub
parent 22b9562629
commit 1bc4994be6
11 changed files with 44 additions and 12 deletions

View File

@ -499,12 +499,15 @@ class Detector {
void setExternalSignalFlags(int signalIndex, defs::externalSignalFlag value,
Positions pos = {});
/** [Eiger][Mythen3] */
/** [Eiger][Mythen3][Gotthard2] */
Result<bool> getParallelMode(Positions pos = {}) const;
/** [Eiger][Mythen3]
/** [Eiger][Mythen3][Gotthard2]
* [Mythen3] If exposure time is too short, acquisition will return with an
* ERROR and take fewer frames than expected */
* ERROR and take fewer frames than expected \n
* [Mythen3][Eiger] Default: Non parallel \n
* [Gotthard2] Default: Parallel. Non parallel mode works only in continuous
* mode.*/
void setParallelMode(bool value, Positions pos = {});
/** [Gotthard2][Jungfrau] */

View File

@ -1407,10 +1407,12 @@ class CmdProxy {
INTEGER_COMMAND_VEC_ID(
parallel, getParallelMode, setParallelMode, StringTo<int>,
"[0, 1]\n\t[Eiger][Mythen3] Enable or disable parallel "
"[0, 1]\n\t[Eiger][Mythen3][Gotthard2] Enable or disable parallel "
"mode.\n\t[Mythen3] If exptime is too short, the "
"acquisition will return ERROR status and take fewer "
"frames than expected.");
"frames than expected.\n\t[Mythen3][Eiger] Default: Non "
"parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works "
"only in continuous mode.");
INTEGER_COMMAND_VEC_ID(
filterresistor, getFilterResistor, setFilterResistor, StringTo<int>,

View File

@ -1483,7 +1483,8 @@ TEST_CASE("parallel", "[.cmd]") {
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
if (det_type == defs::EIGER || det_type == defs::MYTHEN3) {
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
det_type == defs::GOTTHARD2) {
auto prev_val = det.getParallelMode();
{
std::ostringstream oss;