mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user