merge from 4.2.0

This commit is contained in:
2020-04-07 15:14:27 +02:00
parent ab9fed45fb
commit 9f3ad4e2f4
11 changed files with 119 additions and 125 deletions

View File

@ -414,7 +414,7 @@ class EigerData : public GeneralData {
imageSize = dataSize*packetsPerFrame;
maxFramesPerFile = EIGER_MAX_FRAMES_PER_FILE;
fifoBufferHeaderSize= FIFO_HEADER_NUMBYTES + sizeof(slsDetectorDefs::sls_receiver_header);
defaultFifoDepth = 100;
defaultFifoDepth = 1000;
threadsPerReceiver = 2;
headerPacketSize = 40;
standardheader = true;
@ -428,6 +428,7 @@ class EigerData : public GeneralData {
void SetDynamicRange(int dr, bool tgEnable) {
packetsPerFrame = (tgEnable ? 4 : 16) * dr;
imageSize = dataSize*packetsPerFrame;
defaultFifoDepth = (dr == 32 ? 100 : 1000);
}
/**

View File

@ -187,7 +187,9 @@ void Implementation::SetupFifoStructure() {
fifoDepth));
} catch (...) {
fifo.clear();
throw sls::RuntimeError("Could not allocate memory for fifo structure " + std::to_string(i));
fifoDepth = 0;
throw sls::RuntimeError("Could not allocate memory for fifo structure " +
std::to_string(i) + ". FifoDepth is now 0.");
}
// set the listener & dataprocessor threads to point to the right fifo
if (listener.size())
@ -1475,6 +1477,7 @@ void Implementation::setDynamicRange(const uint32_t i) {
// to update npixelsx, npixelsy in file writer
for (const auto &it : dataProcessor)
it->SetPixelDimension();
fifoDepth = generalData->defaultFifoDepth;
SetupFifoStructure();
}
}