Dev/update rx metadata threshold m3 (#1509)
Build and Deploy on local RHEL9 / build (push) Successful in 2m11s
Build on RHEL9 docker image / build (push) Successful in 5m2s
Build on RHEL8 docker image / build (push) Successful in 5m9s
Build and Deploy on local RHEL8 / build (push) Successful in 5m9s
Run Simulator Tests on local RHEL9 / build (push) Successful in 20m8s
Run Simulator Tests on local RHEL8 / build (push) Successful in 23m27s

* update rx master file for all threshold energies(m3) when setting dac directly, custom trimbits, setting settings, trimbits etc

* formatting

* refactored for future modifications for eier

* renaming
This commit is contained in:
2026-08-06 16:28:23 +02:00
committed by GitHub
parent 3e51239112
commit 6ce69bfadc
2 changed files with 11 additions and 1 deletions
+10 -1
View File
@@ -196,6 +196,7 @@ void Module::setSettings(detectorSettings isettings) {
"Cannot set settings for Eiger. Use threshold energy.");
}
sendToDetector<int>(F_SET_SETTINGS, isettings);
updateRxThresholdEnergyMetadata();
}
int Module::getThresholdEnergy() const {
@@ -414,9 +415,14 @@ void Module::setAllThresholdEnergy(std::array<int, 3> e_eV,
throw RuntimeError("setThresholdEnergyAndSettings: Could not set "
"settings in Module");
}
}
void Module::updateRxThresholdEnergyMetadata() {
if (shm()->useReceiverFlag) {
sendToReceiver(F_RECEIVER_SET_ALL_THRESHOLD, e_eV, nullptr);
if (shm()->detType == MYTHEN3) {
auto e_eV = getAllThresholdEnergy();
sendToReceiver(F_RECEIVER_SET_ALL_THRESHOLD, e_eV, nullptr);
}
}
}
@@ -477,6 +483,7 @@ int Module::getAllTrimbits() const {
void Module::setAllTrimbits(int val) {
sendToDetector<int>(F_SET_ALL_TRIMBITS, val);
updateRxThresholdEnergyMetadata();
}
std::vector<int> Module::getTrimEn() const {
@@ -784,6 +791,7 @@ void Module::setDAC(int val, dacIndex index, bool mV) {
}
int args[]{static_cast<int>(index), static_cast<int>(mV), val};
sendToDetector<int>(F_SET_DAC, args);
updateRxThresholdEnergyMetadata();
}
bool Module::getPowerChip() const {
@@ -3552,6 +3560,7 @@ void Module::setModule(sls_detector_module &module, bool trimbits) {
client.sendCommand(F_SET_MODULE, nullptr, 0);
sendModule(&module, client);
client.readReply(nullptr, 0);
updateRxThresholdEnergyMetadata();
}
sls_detector_module Module::getModule() {
+1
View File
@@ -111,6 +111,7 @@ class Module : public virtual slsDetectorDefs {
void setAllThresholdEnergy(std::array<int, 3> e_eV,
detectorSettings isettings, bool trimbits);
std::string getSettingsDir() const;
void updateRxThresholdEnergyMetadata();
std::string setSettingsDir(const std::string &dir);
void loadTrimbits(const std::string &fname);
void saveTrimbits(const std::string &fname);