mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 22:07:12 +02:00
some clean up regarding trimbits
This commit is contained in:
@ -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);
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user