18 <<
" Constructing object...";
25 <<
" Destructing object...";
41 peds_[0].isProfile_ =
true;
60 peds_[1].isProfile_ =
true;
80 for (uint16_t iapv = 0; iapv < 2; iapv++) {
91 cm_[iapv].isProfile_ =
false;
93 cm_[iapv].vNumOfEntries_.resize(
nbins, 0);
94 cm_[iapv].vNumOfEntries_.resize(
nbins, 0);
101 if (digis.
data.size() !=
peds_[0].vNumOfEntries_.size()) {
103 <<
" Unexpected number of digis: " << digis.
data.size();
108 uint16_t
nbins =
peds_[0].vNumOfEntries_.size();
114 uint16_t napvs =
nbins / 128;
115 std::vector<uint32_t> cm;
119 std::vector<uint16_t>
adc;
120 for (uint16_t iapv = 0; iapv < napvs; iapv++) {
123 for (uint16_t ibin = 0; ibin < 128; ibin++) {
124 if ((iapv * 128) + ibin <
nbins) {
125 adc.push_back(digis.
data[(iapv * 128) + ibin].adc());
128 sort(
adc.begin(),
adc.end());
129 uint16_t
index =
adc.size() % 2 ?
adc.size() / 2 :
adc.size() / 2 - 1;
131 cm[iapv] = static_cast<uint32_t>(
adc[
index]);
135 for (uint16_t ibin = 0; ibin <
nbins; ibin++) {
137 float diff = static_cast<float>(digis.
data[ibin].adc()) - static_cast<float>(cm[ibin / 128]);
141 if (cm.size() <
cm_.size()) {
143 <<
" Fewer CM values than expected: " << cm.size();
158 for (uint16_t
ii = 0;
ii <
peds_[1].vNumOfEntries_.size(); ++
ii) {
161 float entries =
peds_[1].vNumOfEntries_[
ii];
167 float noise = spread;