slsReceiver, fixed virtual hdf5 last row random values bug

This commit is contained in:
2018-05-18 14:51:18 +02:00
parent 8b39443197
commit 94ce042401
8 changed files with 23 additions and 20 deletions

View File

@ -192,9 +192,10 @@ class DataProcessor : private virtual slsReceiverDefs, public ThreadObject {
/**
* End of Acquisition
* @param anyPacketsCaught true if any packets are caught, else false
* @param numf number of images caught
*/
void EndofAcquisition(uint64_t numf);
void EndofAcquisition(bool anyPacketsCaught, uint64_t numf);
/**
* Update pixel dimensions in file writer

View File

@ -152,9 +152,10 @@ class File : private virtual slsReceiverDefs {
/**
* End of Acquisition
* @param anyPacketsCaught true if any packets are caught, else false
* @param numf number of images caught
*/
virtual void EndofAcquisition(uint64_t numf) {
virtual void EndofAcquisition(bool anyPacketsCaught, uint64_t numf) {
cprintf(RED,"This is a generic function EndofAcquisition that "
"should be overloaded by a derived class\n");
}

View File

@ -519,7 +519,7 @@ class EigerData : public GeneralData {
packetSize = headerSizeinPacket + dataSize;
packetsPerFrame = 256;
imageSize = dataSize*packetsPerFrame;
maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE;
maxFramesPerFile = 5;//EIGER_MAX_FRAMES_PER_FILE;
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsReceiverDefs::sls_detector_header);
defaultFifoDepth = 100;
threadsPerReceiver = 2;

View File

@ -110,9 +110,10 @@ class HDF5File : private virtual slsReceiverDefs, public File, public HDF5FileSt
/**
* End of Acquisition
* @param anyPacketsCaught true if any packets are caught, else false
* @param numf number of images caught
*/
void EndofAcquisition(uint64_t numf);
void EndofAcquisition(bool anyPacketsCaught, uint64_t numf);
/**
* Create Virtual File

View File

@ -528,8 +528,8 @@ public:
}
//hyperslab
int numMajorHyperslab = (numf-1)/maxFramesPerFile;
if (((numf-1)%maxFramesPerFile) || (numf == 1)) numMajorHyperslab++;
int numMajorHyperslab = numf/maxFramesPerFile;
if (numf%maxFramesPerFile) numMajorHyperslab++;
bool error = false;
uint64_t framesSaved = 0;
for (int j = 0; j < numMajorHyperslab; j++) {