mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-18 07:47:12 +02:00
Compare commits
2 Commits
2022.05.10
...
2022.05.10
Author | SHA1 | Date | |
---|---|---|---|
cd4520b051 | |||
0129c2c686 |
Binary file not shown.
@ -1411,6 +1411,9 @@ enum detectorSettings setSettings(enum detectorSettings sett) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void validateSettings() {
|
void validateSettings() {
|
||||||
|
LOG(logWARNING, ("Not validating dac settings temporarily"));
|
||||||
|
return;
|
||||||
|
|
||||||
// if any special dac value is changed individually => undefined
|
// if any special dac value is changed individually => undefined
|
||||||
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
const int specialDacs[NSPECIALDACS] = SPECIALDACINDEX;
|
||||||
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,
|
int *specialDacValues[] = {defaultDacValue_standard, defaultDacValue_fast,
|
||||||
|
@ -1173,31 +1173,40 @@ int DetectorImpl::acquire() {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DetectorImpl::startAcquisition(bool blocking, Positions pos) {
|
void DetectorImpl::startAcquisition(bool blocking, std::vector<int> positions) {
|
||||||
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
|
if (shm()->detType == defs::MYTHEN3 && size() > 1) {
|
||||||
std::vector<int> master;
|
std::vector<int> master;
|
||||||
std::vector<int> slaves;
|
std::vector<int> slaves;
|
||||||
auto is_master = Parallel(&Module::isMaster, pos);
|
if (positions.empty() ||
|
||||||
// could be all slaves in pos
|
(positions.size() == 1 && positions[0] == -1)) {
|
||||||
slaves.reserve(pos.size());
|
positions.resize(modules.size());
|
||||||
for (size_t i = 0; i != pos.size(); ++i) {
|
std::iota(begin(positions), end(positions), 0);
|
||||||
|
}
|
||||||
|
// could be all slaves in positions
|
||||||
|
slaves.reserve(positions.size());
|
||||||
|
auto is_master = Parallel(&Module::isMaster, positions);
|
||||||
|
for (size_t i : positions) {
|
||||||
if (is_master[i])
|
if (is_master[i])
|
||||||
master.push_back(i);
|
master.push_back(i);
|
||||||
else
|
else
|
||||||
slaves.push_back(i);
|
slaves.push_back(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!slaves.empty()) {
|
||||||
Parallel(&Module::startAcquisition, slaves);
|
Parallel(&Module::startAcquisition, slaves);
|
||||||
|
}
|
||||||
|
if (!master.empty()) {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
Parallel(&Module::startAndReadAll, master);
|
Parallel(&Module::startAndReadAll, master);
|
||||||
} else {
|
} else {
|
||||||
Parallel(&Module::startAcquisition, master);
|
Parallel(&Module::startAcquisition, master);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (blocking) {
|
if (blocking) {
|
||||||
Parallel(&Module::startAndReadAll, pos);
|
Parallel(&Module::startAndReadAll, positions);
|
||||||
} else {
|
} else {
|
||||||
Parallel(&Module::startAcquisition, pos);
|
Parallel(&Module::startAcquisition, positions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,7 +279,7 @@ class DetectorImpl : public virtual slsDetectorDefs {
|
|||||||
int acquire();
|
int acquire();
|
||||||
|
|
||||||
/** also takes care of master and slave for multi module mythen */
|
/** also takes care of master and slave for multi module mythen */
|
||||||
void startAcquisition(bool blocking, Positions pos);
|
void startAcquisition(bool blocking, std::vector<int> positions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combines data from all readouts and gives it to the gui
|
* Combines data from all readouts and gives it to the gui
|
||||||
|
@ -10,6 +10,6 @@
|
|||||||
#define APIGOTTHARD 0x220428
|
#define APIGOTTHARD 0x220428
|
||||||
#define APIGOTTHARD2 0x220428
|
#define APIGOTTHARD2 0x220428
|
||||||
#define APIJUNGFRAU 0x220428
|
#define APIJUNGFRAU 0x220428
|
||||||
#define APIMYTHEN3 0x220428
|
|
||||||
#define APIMOENCH 0x220427
|
#define APIMOENCH 0x220427
|
||||||
#define APIEIGER 0x220428
|
#define APIEIGER 0x220428
|
||||||
|
#define APIMYTHEN3 0x220510
|
||||||
|
Reference in New Issue
Block a user