minor fix

This commit is contained in:
maliakal_d 2021-09-17 11:00:40 +02:00
parent 0e193615b9
commit c2202a97e1

View File

@ -75,8 +75,8 @@ void DetectorImpl::freeSharedMemory(int detectorIndex, int detPos) {
void DetectorImpl::freeSharedMemory() { void DetectorImpl::freeSharedMemory() {
zmqSocket.clear(); zmqSocket.clear();
for (auto &d : modules) { for (auto &module : modules) {
d->freeSharedMemory(); module->freeSharedMemory();
} }
modules.clear(); modules.clear();
@ -92,8 +92,9 @@ std::string DetectorImpl::getUserDetails() {
std::ostringstream sstream; std::ostringstream sstream;
sstream << "\nHostname: "; sstream << "\nHostname: ";
for (auto &d : modules) { for (auto &module : modules) {
sstream << (d->isFixedPatternSharedMemoryCompatible() ? d->getHostname() sstream << (module->isFixedPatternSharedMemoryCompatible()
? module->getHostname()
: "Unknown") : "Unknown")
<< "+"; << "+";
} }
@ -104,9 +105,9 @@ std::string DetectorImpl::getUserDetails() {
} }
// get type from module shm // get type from module shm
else { else {
for (auto &d : modules) { for (auto &module : modules) {
sstream << (d->isFixedPatternSharedMemoryCompatible() sstream << (module->isFixedPatternSharedMemoryCompatible()
? ToString(d->getDetectorType()) ? ToString(module->getDetectorType())
: "Unknown") : "Unknown")
<< "+"; << "+";
} }
@ -255,8 +256,8 @@ void DetectorImpl::addModule(const std::string &hostname) {
} }
if (host != "localhost") { if (host != "localhost") {
for (auto &d : modules) { for (auto &module : modules) {
if (d->getHostname() == host) { if (module->getHostname() == host) {
LOG(logWARNING) LOG(logWARNING)
<< "Module " << host << "already part of the Detector!" << "Module " << host << "already part of the Detector!"
<< std::endl << std::endl
@ -331,8 +332,8 @@ void DetectorImpl::updateDetectorSize() {
<< "\n\tNumber of Channels in Y direction:" << "\n\tNumber of Channels in Y direction:"
<< shm()->numberOfChannels.y; << shm()->numberOfChannels.y;
for (auto &d : modules) { for (auto &module : modules) {
d->updateNumberOfModule(shm()->numberOfModule); module->updateNumberOfModule(shm()->numberOfModule);
} }
} }