jf: timing info decoder (#987)

* timing_info_decoder command with options swissfel (default) and shine. added to python, command line generation, autocomplete, tostring, tests.
This commit is contained in:
2024-10-01 11:17:35 +02:00
committed by GitHub
parent 8a7ed30676
commit f43bb8eea4
33 changed files with 23282 additions and 20749 deletions

View File

@ -667,6 +667,34 @@ TEST_CASE("Caller::pedestalmode", "[.cmdcall]") {
}
}
TEST_CASE("Caller::timing_info_decoder", "[.cmdcall]") {
Detector det;
Caller caller(&det);
if (det.getDetectorType().squash() == defs::JUNGFRAU) {
auto prev_val = det.getTimingInfoDecoder();
{
std::ostringstream oss;
caller.call("timing_info_decoder", {"shine"}, -1, PUT, oss);
REQUIRE(oss.str() == "timing_info_decoder shine\n");
}
{
std::ostringstream oss;
caller.call("timing_info_decoder", {"swissfel"}, -1, PUT, oss);
REQUIRE(oss.str() == "timing_info_decoder swissfel\n");
}
{
std::ostringstream oss;
caller.call("timing_info_decoder", {}, -1, GET, oss);
REQUIRE(oss.str() == "timing_info_decoder swissfel\n");
}
for (int i = 0; i != det.size(); ++i) {
det.setTimingInfoDecoder(prev_val[i], {i});
}
} else {
REQUIRE_THROWS(caller.call("timing_info_decoder", {}, -1, GET));
}
}
TEST_CASE("Caller::collectionmode", "[.cmdcall]") {
Detector det;
Caller caller(&det);