changing g_108MHz enum to g2_108MHZ (similarly 144), adding readoutspeedlist command

This commit is contained in:
2021-10-08 11:05:25 +02:00
parent b1ae47d189
commit 417bfbaf38
12 changed files with 37 additions and 20 deletions

View File

@ -306,8 +306,9 @@ class Detector {
/** [Eiger][Jungfrau][Gotthard2]
* [Jungfrau] Options: FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED \n
* [Eiger] Options: FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED \n
* [Gotthard2] Options: G_108MHZ (Default), G_144MHZ \n
* [Jungfrau] FULL_SPEED option only available from v2.0 boards \n Also overwrites adcphase to
* [Gotthard2] Options: G2_108MHZ (Default), G2_144MHZ \n
* [Jungfrau] FULL_SPEED option only available from v2.0 boards and is
* recommended to set number of interfaces to 2. \n Also overwrites adcphase to
* recommended default.
*/
void setReadoutSpeed(defs::speedLevel value, Positions pos = {});

View File

@ -613,7 +613,8 @@ std::string CmdProxy::ReadoutSpeed(int action) {
"quarter_speed]\n\t\t[Eiger][Jungfrau] Readout "
"speed of chip.\n\t\t[Eiger] Default speed is full_speed."
"\n\t\t[Jungfrau] Default speed is half_speed. full_speed "
"option only available from v2.0 boards. Also overwrites "
"option only available from v2.0 boards and is recommended to set "
"number of interfaces to 2. Also overwrites "
"adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] "
"Readout speed of chip in MHz. Default is 108."
<< '\n';

View File

@ -794,6 +794,7 @@ class CmdProxy {
{"timing", &CmdProxy::timing},
{"timinglist", &CmdProxy::timinglist},
{"readoutspeed", &CmdProxy::ReadoutSpeed},
{"readoutspeedlist", &CmdProxy::readoutspeedlist},
{"adcphase", &CmdProxy::Adcphase},
{"maxadcphaseshift", &CmdProxy::maxadcphaseshift},
{"dbitphase", &CmdProxy::Dbitphase},
@ -1329,6 +1330,10 @@ class CmdProxy {
GET_COMMAND_NOID(timinglist, getTimingModeList,
"\n\tGets the list of timing modes for this detector.");
GET_COMMAND_NOID(readoutspeedlist, getReadoutSpeedList,
"\n\tList of readout speed levels implemented for this detector.");
GET_COMMAND(maxadcphaseshift, getMaxADCPhaseShift,
"\n\t[Jungfrau][CTB][Moench] Absolute maximum Phase shift of "
"ADC clock.");

View File

@ -429,8 +429,8 @@ std::vector<defs::speedLevel> Detector::getReadoutSpeedList() const {
defs::HALF_SPEED,
defs::QUARTER_SPEED};
case defs::GOTTHARD2:
return std::vector<defs::speedLevel>{defs::G_108MHZ,
defs::G_144MHZ};
return std::vector<defs::speedLevel>{defs::G2_108MHZ,
defs::G2_144MHZ};
default:
throw RuntimeError("Readout speed not implemented for this detector");
}

View File

@ -970,6 +970,13 @@ TEST_CASE("readoutspeed", "[.cmd]") {
}
}
TEST_CASE("readoutspeedlist", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
REQUIRE_NOTHROW(proxy.Call("readoutspeedlist", {}, -1, GET));
REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, PUT));
}
TEST_CASE("adcphase", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);