#include <AdcRegularSignalFinder.h>
Definition at line 40 of file AdcRegularSignalFinder.h.
AdcRegularSignalFinder::AdcRegularSignalFinder |
( |
AdcIndex |
per, |
|
|
AdcIndex |
len, |
|
|
int |
lev |
|
) |
| |
Definition at line 17 of file AdcRegularSignalFinder_tool.cc.
21 const string myname =
"AdcRegularSignalFinder::ctor: ";
23 cout << myname <<
"Configuration parameters:" <<
endl;
QTextStream & endl(QTextStream &s)
Definition at line 33 of file AdcRegularSignalFinder_tool.cc.
35 ps.get<
unsigned int>(
"Period"),
36 ps.get<
unsigned int>(
"Length"),
37 ps.get<
int>(
"LogLevel")
static constexpr double ps
AdcRegularSignalFinder(AdcIndex per, AdcIndex len, int lev)
Reimplemented from AdcChannelTool.
Definition at line 42 of file AdcRegularSignalFinder_tool.cc.
43 const string myname =
"AdcRegularSignalFinder::update: ";
48 if ( acd.
rois.size() > 0 ) {
52 if ( itck2 > itck1 ) {
55 if ( acd.
rois.size() > 1 ) {
58 itck2 = roi.second + 1;
59 if ( itck2 > itck1 ) nlen = itck2 - itck1;
62 cout << myname <<
"WARNING: Input ROI does not specify a valid period." <<
endl;
65 cout << myname <<
"WARNING: Input ROI to specify period is not present." <<
endl;
70 if ( nsam > 0 && nper > 0 ) {
71 acd.
signal.resize(nsam,
true);
72 Index nrem = nsam % nper;
73 nroi = nsam/nper + (nrem>0);
74 for (
Index iroi=0; iroi<nroi; ++iroi ) {
75 Index isam1 = nper*iroi;
76 Index isam2 = isam1 + nlen;
77 Index isam3 = isam1 + nper;
78 if ( isam2 > nsam ) isam2 = nsam;
79 if ( isam3 > nsam ) isam3 = nsam;
80 for (
Index isam=isam2; isam<isam3; ++isam ) {
83 acd.
rois.emplace_back(isam1, isam2-1);
86 acd.
signal.resize(nsam,
false);
89 res.setInt(
"roiPeriod", nper);
90 res.setInt(
"roiLength", nlen);
91 res.setInt(
"roiCount", nroi);
std::pair< AdcIndex, AdcIndex > AdcRoi
QTextStream & endl(QTextStream &s)
AdcIndex AdcRegularSignalFinder::m_Length |
|
private |
int AdcRegularSignalFinder::m_LogLevel |
|
private |
AdcIndex AdcRegularSignalFinder::m_Period |
|
private |
The documentation for this class was generated from the following files: