mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
commit
83b3488bc5
@ -272,7 +272,7 @@ This document describes the differences between 6.0.0 and 5.2.0 releases.
|
||||
|
||||
Gotthard2
|
||||
=========
|
||||
Compatible version : 27.05.2021 (development)
|
||||
Compatible version : 27.05.2021 (v1.0)
|
||||
|
||||
Moench
|
||||
======
|
||||
|
@ -2040,17 +2040,17 @@ int setAllTrimbits(int val) {
|
||||
}
|
||||
|
||||
int getAllTrimbits() {
|
||||
int value = *((detectorModules->chanregs));
|
||||
if (detectorModules) {
|
||||
int value = (*((detectorModules->chanregs)));
|
||||
for (int ichan = 0; ichan < (detectorModules->nchan); ichan++) {
|
||||
if (*((detectorModules->chanregs) + ichan) != value) {
|
||||
value = -1;
|
||||
break;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
LOG(logINFO, ("Value of all Trimbits: %d\n", value));
|
||||
return value;
|
||||
}
|
||||
LOG(logINFO, ("Value of all Trimbits: %d\n", value));
|
||||
return value;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int getBebFPGATemp() {
|
||||
|
@ -9247,7 +9247,7 @@ int get_readout_speed(int file_des) {
|
||||
int retval = -1;
|
||||
LOG(logDEBUG1, ("Getting readout speed\n"));
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(EIGER) && !defined(GOTTHARD2D)
|
||||
#if !defined(JUNGFRAUD) && !defined(EIGERD) && !defined(GOTTHARD2D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -9270,7 +9270,7 @@ int set_readout_speed(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Setting readout speed : %u\n", arg));
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(EIGER) && !defined(GOTTHARD2D)
|
||||
#if !defined(JUNGFRAUD) && !defined(EIGERD) && !defined(GOTTHARD2D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
|
@ -833,10 +833,6 @@ Result<std::string> Detector::getScanErrorMessage(Positions pos) const {
|
||||
// Network Configuration (Detector<->Receiver)
|
||||
|
||||
Result<int> Detector::getNumberofUDPInterfaces(Positions pos) const {
|
||||
if (getDetectorType().squash() != defs::JUNGFRAU) {
|
||||
throw sls::RuntimeError(
|
||||
"Cannot set number of udp interfaces for this detector.");
|
||||
}
|
||||
// also called by vetostream (for gotthard2)
|
||||
return pimpl->getNumberofUDPInterfaces(pos);
|
||||
}
|
||||
|
@ -576,11 +576,11 @@ void Module::setDynamicRange(int dr) {
|
||||
if (dr == 32) {
|
||||
LOG(logINFO) << "Setting Clock to Quarter Speed to cope with "
|
||||
"Dynamic Range of 32";
|
||||
setClockDivider(RUN_CLOCK, 2);
|
||||
setReadoutSpeed(defs::QUARTER_SPEED);
|
||||
} else {
|
||||
LOG(logINFO) << "Setting Clock to Full Speed for Dynamic Range of "
|
||||
<< dr;
|
||||
setClockDivider(RUN_CLOCK, 0);
|
||||
setReadoutSpeed(defs::FULL_SPEED);
|
||||
}
|
||||
// EIGER only, update speed and rate correction when dr changes
|
||||
if (dr != prev_val) {
|
||||
|
@ -488,23 +488,13 @@ TEST_CASE("activate", "[.cmd]") {
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("activate", {"1", "nopadding"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "activate 1 nopadding\n");
|
||||
proxy.Call("activate", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "activate 1\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("activate", {"0", "padding"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "activate 0 padding\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("activate", {"0", "nopadding"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "activate 0 nopadding\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("activate", {"1", "padding"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "activate 1 padding\n");
|
||||
proxy.Call("activate", {"0"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "activate 0\n");
|
||||
}
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setActive(prev_val[i], {i});
|
||||
|
@ -287,7 +287,7 @@ TEST_CASE("comp_disable_time", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
if (det_type == defs::JUNGFRAU && det.getChipVersion().squash()*10 == 11) {
|
||||
auto prev_val = det.getComparatorDisableTime();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
@ -308,12 +308,13 @@ TEST_CASE("rx_udpsocksize", "[.cmd][.rx]") {
|
||||
CmdProxy proxy(&det);
|
||||
int64_t prev_val = det.getRxUDPSocketBufferSize().tsquash(
|
||||
"Need same udp socket buffer size to test");
|
||||
std::string s_new_val = std::to_string(prev_val - 1000);
|
||||
{
|
||||
std::string s_new_val = std::to_string(prev_val);
|
||||
/*std::string s_new_val = std::to_string(prev_val - 1000);
|
||||
{ Need permissions
|
||||
std::ostringstream oss;
|
||||
proxy.Call("rx_udpsocksize", {s_new_val}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() >= "rx_udpsocksize " + s_new_val + "\n");
|
||||
}
|
||||
}*/
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("rx_udpsocksize", {}, -1, GET, oss);
|
||||
|
@ -345,7 +345,7 @@ TEST_CASE("thresholdnotb", "[.cmd]") {
|
||||
std::string senergy = std::to_string(prev_energies[0]);
|
||||
std::ostringstream oss1, oss2;
|
||||
proxy.Call("thresholdnotb", {senergy, "standard"}, -1, PUT, oss1);
|
||||
REQUIRE(oss1.str() == "threshold [" + senergy + ", standard]\n");
|
||||
REQUIRE(oss1.str() == "thresholdnotb [" + senergy + ", standard]\n");
|
||||
proxy.Call("threshold", {}, -1, GET, oss2);
|
||||
REQUIRE(oss2.str() == "threshold " + senergy + "\n");
|
||||
REQUIRE_THROWS(proxy.Call("thresholdnotb",
|
||||
@ -973,8 +973,14 @@ TEST_CASE("readoutspeed", "[.cmd]") {
|
||||
TEST_CASE("readoutspeedlist", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
REQUIRE_NOTHROW(proxy.Call("readoutspeedlist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, PUT));
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU || det_type == defs::EIGER)
|
||||
{
|
||||
REQUIRE_NOTHROW(proxy.Call("readoutspeedlist", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("readoutspeedlist", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("adcphase", "[.cmd]") {
|
||||
@ -1575,17 +1581,17 @@ TEST_CASE("currentsource", "[.cmd]") {
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("currentsource", {"1"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "currentsource 1\n");
|
||||
REQUIRE(oss.str() == "currentsource [1]\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("currentsource", {"0"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "currentsource 0\n");
|
||||
REQUIRE(oss.str() == "currentsource [0]\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("currentsource", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "currentsource 0\n");
|
||||
REQUIRE(oss.str() == "currentsource [disabled]\n");
|
||||
}
|
||||
REQUIRE_THROWS(
|
||||
proxy.Call("currentsource", {"1", "fix", "42"}, -1, PUT));
|
||||
@ -1772,6 +1778,9 @@ TEST_CASE("defaultdac", "[.cmd]") {
|
||||
REQUIRE_THROWS(proxy.Call("defaultdac", {"blabla"}, -1, PUT));
|
||||
auto daclist = det.getDacList();
|
||||
for (auto it : daclist) {
|
||||
if (it == defs::VTHRESHOLD) {
|
||||
continue;
|
||||
}
|
||||
auto dacname = sls::ToString(it);
|
||||
auto prev_val = det.getDefaultDac(it);
|
||||
{
|
||||
@ -1916,6 +1925,9 @@ TEST_CASE("blockingtrigger", "[.cmd]") {
|
||||
proxy.Call("blockingtrigger", {}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "blockingtrigger successful\n");
|
||||
}
|
||||
if (det.isVirtualDetectorServer().tsquash("inconsistent virtual detectors")) {
|
||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||
}
|
||||
auto currentfnum =
|
||||
det.getNextFrameNumber().tsquash("inconsistent frame nr in test");
|
||||
REQUIRE(nextframenumber + 1 == currentfnum);
|
||||
@ -2310,7 +2322,7 @@ TEST_CASE("udp_firstdst", "[.cmd]") {
|
||||
det.setFirstUDPDestination(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("udp_numdst", {}, -1, GET));
|
||||
REQUIRE_THROWS(proxy.Call("udp_firstdst", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user