mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-15 00:38:41 +01:00
Merge branch 'developer' into dev/fix_tests
This commit is contained in:
@@ -29,6 +29,8 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
|
||||
if (moduleIndex >= 0) {
|
||||
SharedMemory<sharedModule> moduleShm(detectorIndex, moduleIndex);
|
||||
if (moduleShm.exists()) {
|
||||
moduleShm.openSharedMemory(false);
|
||||
moduleShm()->isValid = false;
|
||||
moduleShm.removeSharedMemory();
|
||||
}
|
||||
return;
|
||||
@@ -41,18 +43,26 @@ void freeSharedMemory(const int detectorIndex, const int moduleIndex) {
|
||||
if (detectorShm.exists()) {
|
||||
detectorShm.openSharedMemory(false);
|
||||
numDetectors = detectorShm()->totalNumberOfModules;
|
||||
detectorShm()->isValid = false;
|
||||
detectorShm.removeSharedMemory();
|
||||
}
|
||||
|
||||
for (int i = 0; i < numDetectors; ++i) {
|
||||
SharedMemory<sharedModule> moduleShm(detectorIndex, i);
|
||||
if (moduleShm.exists()) {
|
||||
moduleShm.openSharedMemory(false);
|
||||
moduleShm()->isValid = false;
|
||||
}
|
||||
moduleShm.removeSharedMemory();
|
||||
}
|
||||
|
||||
// Ctb configuration
|
||||
SharedMemory<CtbConfig> ctbShm(detectorIndex, -1, CtbConfig::shm_tag());
|
||||
if (ctbShm.exists())
|
||||
if (ctbShm.exists()) {
|
||||
ctbShm.openSharedMemory(false);
|
||||
ctbShm()->isValid = false;
|
||||
ctbShm.removeSharedMemory();
|
||||
}
|
||||
}
|
||||
|
||||
using defs = slsDetectorDefs;
|
||||
|
||||
Reference in New Issue
Block a user