Fix jf softwre trigger and tests with real jungfrau detector (#673)

* jungfrau: software triggers do not work, fixed

* eiger test: get highvoltage must be read twice to get the real voltage
This commit is contained in:
Dhanya Thattil 2023-02-20 15:22:46 +01:00 committed by GitHub
parent fe281bd1b1
commit b200a2efc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 35 additions and 17 deletions

View File

@ -1 +0,0 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc5

View File

@ -3,12 +3,12 @@
# empty branch = developer branch in updateAPIVersion.sh
branch=""
det_list=("ctbDetectorServer"
"gotthardDetectorServer"
"gotthard2DetectorServer"
"jungfrauDetectorServer"
"mythen3DetectorServer"
"moenchDetectorServer"
det_list=("ctbDetectorServer
gotthardDetectorServer
gotthard2DetectorServer
jungfrauDetectorServer
mythen3DetectorServer
moenchDetectorServer"
)
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
@ -25,9 +25,11 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
else
# only one server
# arg not in list
if [[ $det_list != *$1* ]]; then
echo $det_list | grep -w -q $1
#if [[ $det_list != *$1* ]]; then
if ! [[ $? ]] ; then
echo -e "Invalid argument 1: $1. $usage"
return -1
return 1
fi
declare -a det=("${1}")
#echo "Compiling only $1"
@ -37,14 +39,14 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
# arg in list
if [[ $det_list == *$2* ]]; then
echo -e "Invalid argument 2: $2. $usage"
return -1
return 1
fi
branch+=$2
#echo "with branch $branch"
fi
else
echo -e "Too many arguments.$usage"
return -1
return 1
fi
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")

View File

@ -1457,6 +1457,12 @@ int setHighVoltage(int val) {
sharedMemory_unlockLocalLink();
return -3;
}
// need to read the file twice to get the proper value
if (!Feb_Control_GetHighVoltage(&eiger_highvoltage)) {
LOG(logERROR, ("Could not read high voltage\n"));
sharedMemory_unlockLocalLink();
return -3;
}
sharedMemory_unlockLocalLink();
// tolerance of 5

View File

@ -2798,6 +2798,7 @@ int softwareTrigger(int block) {
LOG(logINFO, ("Sending Software Trigger\n"));
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_SOFTWARE_TRIGGER_MSK);
bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_SOFTWARE_TRIGGER_MSK);
#ifndef VIRTUAL
// block till frame is sent out

View File

@ -524,11 +524,20 @@ TEST_CASE("gappixels", "[.cmd]") {
Detector det;
CmdProxy proxy(&det);
auto det_type = det.getDetectorType().squash();
bool quad = det.getQuad().squash(false);
bool fullModule = (det.getModuleGeometry().y % 2 == 0);
if (det_type == defs::JUNGFRAU ||
(det_type == defs::EIGER && (quad || fullModule))) {
// test only for jungfrau and eiger(quad or full module only)
bool gapPixelTest = false;
if (det_type == defs::JUNGFRAU)
gapPixelTest = true;
else if (det_type == defs::EIGER) {
bool quad = det.getQuad().squash(false);
bool fullModule = (det.getModuleGeometry().y % 2 == 0);
if (quad || fullModule) {
gapPixelTest = true;
}
}
if (gapPixelTest) {
auto prev_val = det.getGapPixelsinCallback();
{
std::ostringstream oss;

View File

@ -5,9 +5,9 @@
#define APICTB "7.0.0.rc3 0x230130"
#define APIGOTTHARD "7.0.0.rc3 0x230130"
#define APIGOTTHARD2 "7.0.0.rc3 0x230130"
#define APIJUNGFRAU "7.0.0.rc3 0x230130"
#define APIMYTHEN3 "7.0.0.rc3 0x230130"
#define APIMOENCH "7.0.0.rc3 0x230130"
#define APIEIGER "7.0.0.rc3 0x230130"
#define APILIB "7.0.0.rc4 0x230214"
#define APIRECEIVER "7.0.0.rc4 0x230214"
#define APIJUNGFRAU "7.0.0.rc5 0x230216"
#define APIEIGER "7.0.0.rc5 0x230220"