Jf: Electron collection mode (#983)

* electron collection mode for jungfrau. also removing the config chip when using register command
* collectionMode: HOLE/ELECTRON (enum)
This commit is contained in:
2024-09-30 17:15:22 +02:00
committed by GitHub
parent 7fa5b5d70a
commit 5b832cb6aa
30 changed files with 32158 additions and 21441 deletions

View File

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