mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
removed unused fields and added popcount
This commit is contained in:
parent
ea1b41c84a
commit
ac1e9569b5
@ -168,7 +168,6 @@ class GeneralData {
|
|||||||
class GotthardData : public GeneralData {
|
class GotthardData : public GeneralData {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const int nChip = 10;
|
|
||||||
const int nChan = 128;
|
const int nChan = 128;
|
||||||
const int nChipsPerAdc = 2;
|
const int nChipsPerAdc = 2;
|
||||||
|
|
||||||
@ -532,8 +531,6 @@ class Gotthard2Data : public GeneralData {
|
|||||||
|
|
||||||
class ChipTestBoardData : public GeneralData {
|
class ChipTestBoardData : public GeneralData {
|
||||||
private:
|
private:
|
||||||
/** Number of analog channels */
|
|
||||||
const int NCHAN_ANALOG = 32;
|
|
||||||
/** Number of digital channels */
|
/** Number of digital channels */
|
||||||
const int NCHAN_DIGITAL = 64;
|
const int NCHAN_DIGITAL = 64;
|
||||||
/** Number of bytes per analog channel */
|
/** Number of bytes per analog channel */
|
||||||
@ -579,14 +576,8 @@ class ChipTestBoardData : public GeneralData {
|
|||||||
// analog channels (normal, analog/digital readout)
|
// analog channels (normal, analog/digital readout)
|
||||||
if (f == slsDetectorDefs::ANALOG_ONLY ||
|
if (f == slsDetectorDefs::ANALOG_ONLY ||
|
||||||
f == slsDetectorDefs::ANALOG_AND_DIGITAL) {
|
f == slsDetectorDefs::ANALOG_AND_DIGITAL) {
|
||||||
if (a == BIT32_MASK) {
|
nachans = __builtin_popcount(a);
|
||||||
nachans = 32;
|
|
||||||
} else {
|
|
||||||
for (int ich = 0; ich < 32; ++ich) {
|
|
||||||
if (a & (1 << ich))
|
|
||||||
++nachans;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
adatabytes = nachans * NUM_BYTES_PER_ANALOG_CHANNEL * as;
|
adatabytes = nachans * NUM_BYTES_PER_ANALOG_CHANNEL * as;
|
||||||
LOG(logDEBUG1) << " Number of Analog Channels:" << nachans
|
LOG(logDEBUG1) << " Number of Analog Channels:" << nachans
|
||||||
<< " Databytes: " << adatabytes;
|
<< " Databytes: " << adatabytes;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user