mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
Jungfrautrigger (#516)
* jungfrau trigger added * added blocking trigger
This commit is contained in:
@ -618,8 +618,10 @@ class Detector {
|
||||
* different frame numbers for different modules.*/
|
||||
void setNextFrameNumber(uint64_t value, Positions pos = {});
|
||||
|
||||
/** [Eiger][Mythen3] Sends an internal software trigger to the detector
|
||||
* block true if command blocks till frames are sent out from that trigger
|
||||
/** [Eiger][Mythen3][Jungfrau] Sends an internal software trigger to the
|
||||
* detector block true if command blocks till frames are sent out from that
|
||||
* trigger
|
||||
* [Eiger][Jungfrau] Block can be true
|
||||
*/
|
||||
void sendSoftwareTrigger(const bool block = false, Positions pos = {});
|
||||
|
||||
|
@ -1402,12 +1402,12 @@ std::string CmdProxy::Trigger(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "trigger") {
|
||||
os << "\n\t[Eiger][Mythen3] Sends software trigger signal to "
|
||||
"detector";
|
||||
os << "\n\t[Eiger][Mythen3][Jungfrau] Sends software trigger "
|
||||
"signal to detector";
|
||||
} else if (cmd == "blockingtrigger") {
|
||||
os << "\n\t[Eiger] Sends software trigger signal to detector and "
|
||||
"blocks till "
|
||||
"the frames are sent out for that trigger.";
|
||||
os << "\n\t[Eiger][Jungfrau] Sends software trigger signal to "
|
||||
"detector and blocks till the frames are sent out for that "
|
||||
"trigger.";
|
||||
} else {
|
||||
throw RuntimeError("unknown command " + cmd);
|
||||
}
|
||||
|
@ -523,7 +523,7 @@ TEST_CASE("interpolation", "[.cmd]") {
|
||||
REQUIRE(oss.str() == "interpolation 0\n");
|
||||
REQUIRE(det.getCounterMask().tsquash(
|
||||
"inconsistent counter mask") == fixedMask[i]);
|
||||
uint32_t expectedVth3DacVal =
|
||||
int expectedVth3DacVal =
|
||||
(fixedMask[i] & 0x4 ? fixedVth3DacVal : disabledDacValue);
|
||||
REQUIRE(det.getDAC(defs::VTH3, 0, {0})
|
||||
.tsquash("inconsistent vth3 dac value") ==
|
||||
|
@ -1943,11 +1943,9 @@ TEST_CASE("trigger", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, GET));
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::EIGER && det_type != defs::MYTHEN3) {
|
||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, PUT));
|
||||
} else if (det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
REQUIRE_NOTHROW(proxy.Call("trigger", {}, -1, PUT));
|
||||
} else if (det_type == defs::EIGER) {
|
||||
} else if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
auto prev_timing =
|
||||
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
||||
auto prev_frames =
|
||||
@ -1977,6 +1975,8 @@ TEST_CASE("trigger", "[.cmd]") {
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
det.setExptime(prev_exptime);
|
||||
det.setPeriod(prev_period);
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("trigger", {}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1985,9 +1985,7 @@ TEST_CASE("blockingtrigger", "[.cmd]") {
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, GET));
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::EIGER) {
|
||||
REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, PUT));
|
||||
} else if (det_type == defs::EIGER) {
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
auto prev_timing =
|
||||
det.getTimingMode().tsquash("inconsistent timing mode in test");
|
||||
auto prev_frames =
|
||||
@ -2020,6 +2018,8 @@ TEST_CASE("blockingtrigger", "[.cmd]") {
|
||||
det.setNumberOfFrames(prev_frames);
|
||||
det.setExptime(prev_exptime);
|
||||
det.setPeriod(prev_period);
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("blockingtrigger", {}, -1, PUT));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user