126 size_t dataSize = waveform.size();
134 size_t binOffset = 0;
136 float normFactor = 1. / deconNorm;
137 bool applyNormFactor =
std::abs(normFactor - 1.) > std::numeric_limits<float>::epsilon() ?
true :
false;
140 std::copy(waveform.begin(),waveform.end(),rawAdcLessPedVec.begin()+binOffset);
145 std::vector<float> holder;
147 for(
size_t roiIdx = 0; roiIdx < roiVec.size(); roiIdx++)
149 const auto& roi = roiVec[roiIdx];
152 size_t roiLen = roi.second - roi.first + 1;
154 holder.resize(roiLen);
156 std::copy(rawAdcLessPedVec.begin()+binOffset+roi.first, rawAdcLessPedVec.begin()+binOffset+roiLen, holder.begin());
157 if (applyNormFactor)
std::transform(holder.begin(),holder.end(),holder.begin(), std::bind(std::multiplies<float>(),std::placeholders::_1,normFactor));
164 fWaveformTool.getTruncatedMean(holder, truncMean, nTrunc, range);
166 std::transform(holder.begin(),holder.end(),holder.begin(), std::bind(std::minus<float>(),std::placeholders::_1,truncMean));
173 for (
size_t iholder = 0; iholder < holder.size(); ++iholder){
174 holder[iholder] *= constant;
180 ROIVec.
add_range(roi.first, std::move(holder));
const datarange_t & add_range(size_type offset, ITER first, ITER last)
Adds a sequence of elements as a range with specified offset.
std::vector< SigProcPrecision > TimeVec