bugfix receiver: setImagesize only for ctb, moench

This commit is contained in:
2019-03-01 15:22:39 +01:00
parent d2d50a56df
commit 93192c6e84
2 changed files with 15 additions and 13 deletions

View File

@ -147,7 +147,7 @@ public:
* @param i ROI * @param i ROI
*/ */
virtual void SetROI(std::vector<slsDetectorDefs::ROI> i) { virtual void SetROI(std::vector<slsDetectorDefs::ROI> i) {
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "SetROI is a generic function that should be overloaded by a derived class";
}; };
/** /**
@ -157,7 +157,7 @@ public:
* @returns adc configured * @returns adc configured
*/ */
virtual int GetAdcConfigured(int index, std::vector<slsDetectorDefs::ROI>* i) const{ virtual int GetAdcConfigured(int index, std::vector<slsDetectorDefs::ROI>* i) const{
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "GetAdcConfigured is a generic function that should be overloaded by a derived class";
return 0; return 0;
}; };
@ -167,7 +167,7 @@ public:
* @param tgEnable true if 10GbE is enabled, else false * @param tgEnable true if 10GbE is enabled, else false
*/ */
virtual void SetDynamicRange(int dr, bool tgEnable) { virtual void SetDynamicRange(int dr, bool tgEnable) {
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "SetDynamicRange is a generic function that should be overloaded by a derived class";
}; };
/** /**
@ -176,7 +176,7 @@ public:
* @param dr dynamic range * @param dr dynamic range
*/ */
virtual void SetTenGigaEnable(bool tgEnable, int dr) { virtual void SetTenGigaEnable(bool tgEnable, int dr) {
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "SetTenGigaEnable is a generic function that should be overloaded by a derived class";
}; };
/** /**
@ -184,7 +184,7 @@ public:
* @param ns number of samples * @param ns number of samples
*/ */
virtual void setNumberofSamples(const uint64_t ns) { virtual void setNumberofSamples(const uint64_t ns) {
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "setNumberofSamples is a generic function that should be overloaded by a derived class";
}; };
/** /**
@ -192,7 +192,7 @@ public:
* @param enable true if gap pixels enable, else false * @param enable true if gap pixels enable, else false
*/ */
virtual void SetGapPixelsEnable(bool b, int dr) { virtual void SetGapPixelsEnable(bool b, int dr) {
FILE_LOG(logERROR) << "This is a generic function that should be overloaded by a derived class"; FILE_LOG(logERROR) << "SetGapPixelsEnable is a generic function that should be overloaded by a derived class";
}; };
/** /**
@ -202,7 +202,7 @@ public:
* @returns true or false for odd starting packet number * @returns true or false for odd starting packet number
*/ */
virtual bool SetOddStartingPacket(int index, char* packetData) { virtual bool SetOddStartingPacket(int index, char* packetData) {
cprintf(RED,"This is a generic function that should be overloaded by a derived class\n"); cprintf(RED,"SetOddStartingPacket is a generic function that should be overloaded by a derived class\n");
return false; return false;
}; };
@ -214,7 +214,7 @@ public:
* @param t tengiga enable * @param t tengiga enable
*/ */
virtual void setImageSize(slsDetectorDefs::readOutFlags f, std::vector<slsDetectorDefs::ROI> i, int s, bool t) { virtual void setImageSize(slsDetectorDefs::readOutFlags f, std::vector<slsDetectorDefs::ROI> i, int s, bool t) {
cprintf(RED,"This is a generic function that should be overloaded by a derived class\n"); cprintf(RED,"setImageSize is a generic function that should be overloaded by a derived class\n");
}; };
/** /**

View File

@ -447,11 +447,13 @@ int slsReceiverImplementation::setReadOutFlags(const readOutFlags f) {
readoutFlags = f; readoutFlags = f;
// side effects // side effects
generalData->setImageSize(readoutFlags, roi, numberOfSamples, tengigaEnable); if (myDetectorType == CHIPTESTBOARD || myDetectorType == MOENCH) {
for (const auto& it : dataProcessor) generalData->setImageSize(readoutFlags, roi, numberOfSamples, tengigaEnable);
it->SetPixelDimension(); for (const auto& it : dataProcessor)
if (SetupFifoStructure() == FAIL) it->SetPixelDimension();
return FAIL; if (SetupFifoStructure() == FAIL)
return FAIL;
}
} }
std::string flag; std::string flag;
if (f == NORMAL_READOUT) if (f == NORMAL_READOUT)