mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 07:38:04 +01:00
m3: optimizing 1g and 10g digitizing by setting number of packets depending on 10/1g, dr and #counters
This commit is contained in:
@@ -444,10 +444,6 @@ class Mythen3Data : public GeneralData {
|
||||
* @param tgEnable ten giga enable
|
||||
*/
|
||||
virtual void SetNumberofCounters(const int n, const int dr, bool tgEnable) {
|
||||
if (n < 1 || n > 3) {
|
||||
throw sls::RuntimeError("Invalid number of counters " +
|
||||
std::to_string(n));
|
||||
}
|
||||
ncounters = n;
|
||||
nPixelsX = NCHAN * ncounters;
|
||||
LOG(logINFO) << "nPixelsX: " << nPixelsX;
|
||||
|
||||
@@ -1624,17 +1624,19 @@ uint32_t Implementation::getCounterMask() const {
|
||||
|
||||
void Implementation::setCounterMask(const uint32_t i) {
|
||||
if (counterMask != i) {
|
||||
counterMask = i;
|
||||
|
||||
if (myDetectorType == MYTHEN3) {
|
||||
int ncounters = __builtin_popcount(i);
|
||||
generalData->SetNumberofCounters(ncounters, dynamicRange,
|
||||
tengigaEnable);
|
||||
// to update npixelsx, npixelsy in file writer
|
||||
for (const auto &it : dataProcessor)
|
||||
it->SetPixelDimension();
|
||||
SetupFifoStructure();
|
||||
int ncounters = __builtin_popcount(i);
|
||||
if (ncounters < 1 || ncounters > 3) {
|
||||
throw sls::RuntimeError("Invalid number of counters " +
|
||||
std::to_string(ncounters) +
|
||||
". Expected 1-3.");
|
||||
}
|
||||
counterMask = i;
|
||||
generalData->SetNumberofCounters(ncounters, dynamicRange,
|
||||
tengigaEnable);
|
||||
// to update npixelsx, npixelsy in file writer
|
||||
for (const auto &it : dataProcessor)
|
||||
it->SetPixelDimension();
|
||||
SetupFifoStructure();
|
||||
}
|
||||
LOG(logINFO) << "Counter mask: " << sls::ToStringHex(counterMask);
|
||||
int ncounters = __builtin_popcount(counterMask);
|
||||
|
||||
Reference in New Issue
Block a user