mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
tests updated
This commit is contained in:
@ -25,7 +25,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::MYTHEN3) {
|
||||
/*SECTION("vcassh") { test_dac(defs::VCASSH, "vcassh", 1200); }
|
||||
SECTION("vcassh") { test_dac(defs::VCASSH, "vcassh", 1200); }
|
||||
SECTION("vth2") { test_dac(defs::VTH2, "vth2", 2800); }
|
||||
SECTION("vrshaper") { test_dac(defs::VRSHAPER, "vrshaper", 1280); }
|
||||
SECTION("vrshaper_n") {
|
||||
@ -42,7 +42,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
SECTION("vishaper") { test_dac(defs::VISHAPER, "vishaper", 1708); }
|
||||
SECTION("vcal_p") { test_dac(defs::VCAL_P, "vcal_p", 1712); }
|
||||
SECTION("vtrim") { test_dac(defs::VTRIM, "vtrim", 2800); }
|
||||
SECTION("vdcsh") { test_dac(defs::VDCSH, "vdcsh", 800); }*/
|
||||
SECTION("vdcsh") { test_dac(defs::VDCSH, "vdcsh", 800); }
|
||||
SECTION("vthreshold") {
|
||||
// Read out individual vcmp to be able to reset after
|
||||
// the test is done
|
||||
@ -105,6 +105,17 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
proxy.Call("dac", {"vth3"}, -1, GET, oss3);
|
||||
REQUIRE(oss3.str() == "dac vth3 2100\n");
|
||||
}
|
||||
// counters enabled, sets remembered values
|
||||
proxy.Call("counters", {"0", "1"}, -1, PUT);
|
||||
{
|
||||
std::ostringstream oss1, oss2, oss3;
|
||||
proxy.Call("dac", {"vth1"}, -1, GET, oss1);
|
||||
REQUIRE(oss1.str() == "dac vth1 2100\n");
|
||||
proxy.Call("dac", {"vth2"}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "dac vth2 2200\n");
|
||||
proxy.Call("dac", {"vth3"}, -1, GET, oss3);
|
||||
REQUIRE(oss3.str() == "dac vth3 2800\n");
|
||||
}
|
||||
// Reset dacs after test
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setCounterMask(mask[i], {i});
|
||||
@ -113,7 +124,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
det.setDAC(defs::VTH3, vth3[i], false, {i});
|
||||
}
|
||||
}
|
||||
/*REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vsvp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vsvn"}, -1, GET));
|
||||
// REQUIRE_THROWS(proxy.Call("dac", {"vtrim"}, -1, GET));
|
||||
// REQUIRE_THROWS(proxy.Call("dac", {"vrpreamp"}, -1, GET));
|
||||
@ -156,7 +167,7 @@ TEST_CASE("Setting and reading back MYTHEN3 dacs", "[.cmd][.dacs]") {
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_comp"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vb_pixbuf"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vin_com"}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET));*/
|
||||
REQUIRE_THROWS(proxy.Call("dac", {"vdd_prot"}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user