#include <Roi2dToAdc.h>
|
using | Index = unsigned int |
|
Definition at line 33 of file Roi2dToAdc.h.
Definition at line 19 of file Roi2dToAdc_tool.cc.
21 const string myname =
"Roi2dToAdc::ctor: ";
static constexpr double ps
QTextStream & endl(QTextStream &s)
Roi2dToAdc::~Roi2dToAdc |
( |
| ) |
|
|
override |
Reimplemented from TpcDataTool.
Definition at line 34 of file Roi2dToAdc_tool.cc.
35 const string myname =
"Roi2dToAdc::updateTpcData: ";
37 const float zero = 0.0;
45 if (
m_LogLevel >= 4 ) cout << myname <<
" Skipping null map." <<
endl;
48 if (
m_LogLevel >= 4 ) cout << myname <<
" Processing map with channel count " 49 << pacm->size() <<
endl;
50 for (
auto& iacd : *(pacm) ) {
54 <<
" with sample count " << nsam <<
endl;
71 if (
m_LogLevel >= 4 ) cout << myname <<
" Processing ROI " << iroi <<
" with " 72 << roi.channelSize() <<
" channels and " 73 << roi.sampleSize() <<
" samples." <<
endl;
74 Index nsamRoi = roi.sampleSize();
77 Index& kcha = idxs[0];
78 Index& ksamRoi = idxs[1];
79 for ( kcha=0; kcha<roi.channelSize(); ++kcha ) {
80 Index icha = kcha + roi.channelOffset();
81 Index foundChannel = 0;
83 if ( pacm && pacm->count(icha) ) {
84 ++foundChannel =
true;
88 <<
" from ROI sample count " << nsamRoi
89 <<
" to ADC sample count " << nsamAdc <<
endl;
91 bool agr = ioffAdc > ioffRoi;
92 Index isamAdc = agr ? 0 :
Index(ioffRoi - ioffAdc);
93 ksamRoi = agr ?
Index(ioffAdc - ioffRoi) : 0;
94 while ( ksamRoi < nsamRoi && isamAdc < nsamAdc ) {
95 acd.
samples[isamAdc] = roi.data().value(idxs);
96 acd.
signal[isamAdc] =
true;
103 if ( foundChannel ) ++nchaFilled;
109 if ( ! pacm )
continue;
110 for (
auto& iacd : *(pacm) ) {
118 ret.
setInt(
"r2a_nchaZeroed", nchaZeroed);
119 ret.
setInt(
"r2a_nsamZeroed", nsamZeroed);
120 ret.
setInt(
"r2a_nchaFilled", nchaFilled);
121 ret.
setInt(
"r2a_nsamFilled", nsamFilled);
DataMap & setStatus(int stat)
std::shared_ptr< AdcChannelDataMap > AdcDataPtr
DftData::IndexArray IndexArray
AdcDataVector & getAdcData()
AdcLongIndex tickOffset() const
void setInt(Name name, int val)
AdcSignalVector dftphases
Tpc2dRoiVector & get2dRois()
QTextStream & endl(QTextStream &s)
int Roi2dToAdc::m_LogLevel |
|
private |
The documentation for this class was generated from the following files: