mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-15 06:17: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;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
|
|
||||||
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(GOTTHARD2D)
|
#if !(defined(MYTHEN3D) && defined(EIGERD))
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -1524,7 +1524,6 @@ int set_module(int file_des) {
|
|||||||
} else
|
} else
|
||||||
module.dacs = myDac;
|
module.dacs = myDac;
|
||||||
|
|
||||||
#if defined(EIGERD) || defined(MYTHEN3D)
|
|
||||||
// allocate chans
|
// allocate chans
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
myChan = malloc(getTotalNumberOfChannels() * sizeof(int));
|
myChan = malloc(getTotalNumberOfChannels() * sizeof(int));
|
||||||
@ -1535,7 +1534,6 @@ int set_module(int file_des) {
|
|||||||
} else
|
} else
|
||||||
module.chanregs = myChan;
|
module.chanregs = myChan;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// receive arguments
|
// receive arguments
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
module.nchip = getNumberOfChips();
|
module.nchip = getNumberOfChips();
|
||||||
@ -1573,6 +1571,7 @@ int set_module(int file_des) {
|
|||||||
|
|
||||||
// setsettings
|
// setsettings
|
||||||
#ifndef MYTHEN3D
|
#ifndef MYTHEN3D
|
||||||
|
// m3 uses reg for chip (not settings)
|
||||||
validate_settings((enum detectorSettings)(module.reg));
|
validate_settings((enum detectorSettings)(module.reg));
|
||||||
#endif
|
#endif
|
||||||
ret = setModule(module, mess);
|
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) {
|
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 {
|
Result<int> Detector::getAllTrimbits(Positions pos) const {
|
||||||
|
@ -409,7 +409,7 @@ std::string Module::setSettingsDir(const std::string &dir) {
|
|||||||
return shm()->settingsDir;
|
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)
|
// find specific file if it has detid in file name (.snxxx)
|
||||||
if (shm()->myDetectorType == EIGER || shm()->myDetectorType == MYTHEN3) {
|
if (shm()->myDetectorType == EIGER || shm()->myDetectorType == MYTHEN3) {
|
||||||
std::ostringstream ostfn;
|
std::ostringstream ostfn;
|
||||||
|
@ -110,7 +110,7 @@ class Module : public virtual slsDetectorDefs {
|
|||||||
detectorSettings isettings, bool trimbits);
|
detectorSettings isettings, bool trimbits);
|
||||||
std::string getSettingsDir() const;
|
std::string getSettingsDir() const;
|
||||||
std::string setSettingsDir(const std::string &dir);
|
std::string setSettingsDir(const std::string &dir);
|
||||||
void loadSettingsFile(const std::string &fname);
|
void loadTrimbits(const std::string &fname);
|
||||||
int getAllTrimbits() const;
|
int getAllTrimbits() const;
|
||||||
void setAllTrimbits(int val);
|
void setAllTrimbits(int val);
|
||||||
std::vector<int> getTrimEn() const;
|
std::vector<int> getTrimEn() const;
|
||||||
|
Reference in New Issue
Block a user