some clean up regarding trimbits

This commit is contained in:
2021-09-15 11:22:45 +02:00
parent 7eb64fc055
commit 2e36bb3a65
4 changed files with 5 additions and 6 deletions

View File

@ -1503,7 +1503,7 @@ int set_module(int file_des) {
ret = OK;
memset(mess, 0, sizeof(mess));
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(GOTTHARD2D)
#if !(defined(MYTHEN3D) && defined(EIGERD))
functionNotImplemented();
#else
@ -1524,7 +1524,6 @@ int set_module(int file_des) {
} else
module.dacs = myDac;
#if defined(EIGERD) || defined(MYTHEN3D)
// allocate chans
if (ret == OK) {
myChan = malloc(getTotalNumberOfChannels() * sizeof(int));
@ -1535,7 +1534,6 @@ int set_module(int file_des) {
} else
module.chanregs = myChan;
}
#endif
// receive arguments
if (ret == OK) {
module.nchip = getNumberOfChips();
@ -1573,6 +1571,7 @@ int set_module(int file_des) {
// setsettings
#ifndef MYTHEN3D
// m3 uses reg for chip (not settings)
validate_settings((enum detectorSettings)(module.reg));
#endif
ret = setModule(module, mess);

View File

@ -256,7 +256,7 @@ void Detector::setSettingsPath(const std::string &value, Positions pos) {
}
void Detector::loadTrimbits(const std::string &fname, Positions pos) {
pimpl->Parallel(&Module::loadSettingsFile, pos, fname);
pimpl->Parallel(&Module::loadTrimbits, pos, fname);
}
Result<int> Detector::getAllTrimbits(Positions pos) const {

View File

@ -409,7 +409,7 @@ std::string Module::setSettingsDir(const std::string &dir) {
return shm()->settingsDir;
}
void Module::loadSettingsFile(const std::string &fname) {
void Module::loadTrimbits(const std::string &fname) {
// find specific file if it has detid in file name (.snxxx)
if (shm()->myDetectorType == EIGER || shm()->myDetectorType == MYTHEN3) {
std::ostringstream ostfn;

View File

@ -110,7 +110,7 @@ class Module : public virtual slsDetectorDefs {
detectorSettings isettings, bool trimbits);
std::string getSettingsDir() const;
std::string setSettingsDir(const std::string &dir);
void loadSettingsFile(const std::string &fname);
void loadTrimbits(const std::string &fname);
int getAllTrimbits() const;
void setAllTrimbits(int val);
std::vector<int> getTrimEn() const;