mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-01 17:11:17 +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:
@@ -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