mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 17:10:42 +02:00
slsReceiverSoftware: bugfix double acquire did not write parameter file cuz vector.push_back always never clearing when closing current file
This commit is contained in:
parent
f0ac49190a
commit
b3ccd5e1a1
@ -240,7 +240,7 @@ public:
|
||||
}i=14;
|
||||
}
|
||||
catch(Exception error){
|
||||
cprintf(RED,"Error in writing parameters (parameter index %d) to file in object %d\n", i, ind);
|
||||
cprintf(RED,"Error in writing parameters (index:%d) to file in object %d\n", i, ind);
|
||||
error.printErrorStack();
|
||||
return 1;
|
||||
}
|
||||
|
@ -170,6 +170,13 @@ void HDF5File::CloseCurrentFile() {
|
||||
pthread_mutex_lock(&Mutex);
|
||||
HDF5FileStatic::CloseDataFile(index, filefd);
|
||||
pthread_mutex_unlock(&Mutex);
|
||||
for (int i = 0; i < dataset_para.size(); ++i)
|
||||
delete dataset_para[i];
|
||||
dataset_para.clear();
|
||||
if(dataspace_para) {delete dataspace_para;dataspace_para=0;}
|
||||
if(dataset) {delete dataset;dataset=0;}
|
||||
if(dataspace) {delete dataspace;dataspace=0;}
|
||||
if(filefd) {delete filefd;filefd=0;}
|
||||
}
|
||||
|
||||
|
||||
@ -182,6 +189,14 @@ void HDF5File::CloseAllFiles() {
|
||||
HDF5FileStatic::CloseVirtualDataFile(virtualfd);
|
||||
}
|
||||
pthread_mutex_unlock(&Mutex);
|
||||
|
||||
for (int i = 0; i < dataset_para.size(); ++i)
|
||||
delete dataset_para[i];
|
||||
dataset_para.clear();
|
||||
if(dataspace_para) delete dataspace_para;
|
||||
if(dataset) delete dataset;
|
||||
if(dataspace) delete dataspace;
|
||||
if(filefd) delete filefd;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user