changes for single images with index 0 not realized as caught and therefore no virtual file created, fixed

This commit is contained in:
Dhanya Maliakal 2017-07-28 12:16:07 +02:00
parent 88b6fabb0d
commit f5773de068
2 changed files with 5 additions and 2 deletions

View File

@ -260,7 +260,7 @@ void DataProcessor::CloseFiles() {
}
void DataProcessor::EndofAcquisition(uint64_t numf) {
if (*fileWriteEnable && file->GetFileType() == HDF5 && numf) {
if (*fileWriteEnable && file->GetFileType() == HDF5) {
file->EndofAcquisition(numf);
}
}

View File

@ -494,10 +494,13 @@ void UDPStandardImplementation::stopReceiver(){
//create virtual file
if (fileWriteEnable && fileFormatType == HDF5) {
uint64_t maxIndexCaught = 0;
bool anycaught = false;
for (vector<DataProcessor*>::const_iterator it = dataProcessor.begin(); it != dataProcessor.end(); ++it) {
maxIndexCaught = max(maxIndexCaught, (*it)->GetProcessedMeasurementIndex());
if((*it)->GetMeasurementStartedFlag())
anycaught = true;
}
if (maxIndexCaught)
if (anycaught)
dataProcessor[0]->EndofAcquisition(maxIndexCaught); //to create virtual file
}