mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-25 15:50:03 +02:00
gotthard type can only have max 2 modules
This commit is contained in:
parent
83e0599a37
commit
753387c34c
@ -281,6 +281,13 @@ void DetectorImpl::addModule(const std::string &hostname) {
|
|||||||
|
|
||||||
// get type by connecting
|
// get type by connecting
|
||||||
detectorType type = Module::getTypeFromDetector(host, port);
|
detectorType type = Module::getTypeFromDetector(host, port);
|
||||||
|
|
||||||
|
// gotthard cannot have more than 2 modules (50um=1, 25um=2
|
||||||
|
if ((type == GOTTHARD || type == GOTTHARD2) && modules.size() > 2) {
|
||||||
|
freeSharedMemory();
|
||||||
|
throw sls::RuntimeError("Gotthard cannot have more than 2 modules");
|
||||||
|
}
|
||||||
|
|
||||||
auto pos = modules.size();
|
auto pos = modules.size();
|
||||||
modules.emplace_back(
|
modules.emplace_back(
|
||||||
sls::make_unique<Module>(type, detectorIndex, pos, false));
|
sls::make_unique<Module>(type, detectorIndex, pos, false));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user