16 : m_LogLevel(ps.
get<
int>(
"LogLevel")) {
17 const string myname =
"AcdWireReader::ctor: ";
26 const string myname =
"AcdWireReader::update: ";
29 if ( pwir ==
nullptr ) {
30 cout << myname <<
"ERROR: Wire is null." <<
endl;
33 const Wire& wir = *pwir;
36 cout << myname <<
"ERROR: ADC channel has prepared data." <<
endl;
41 cout << myname <<
"ERROR: ADC channel has signal flags." <<
endl;
45 if ( acd.
rois.size() ) {
46 cout << myname <<
"ERROR: ADC channel has ROIs." <<
endl;
51 cout << myname <<
"ERROR: ADC channel has a wire index." <<
endl;
59 cout << myname <<
"ERROR: Wire has inconsistent channel number." <<
endl;
64 unsigned int nsig = pwir->
NSignal();
67 acd.
signal.resize(nsig,
false);
70 unsigned int isig1 = range.begin_index();
71 unsigned int isig2 = isig1 + range.
size();
72 for (
unsigned int isig=isig1; isig<isig2; ++isig ) {
73 acd.
samples[isig] = inRois[isig];
Collection of charge vs time digitized from a single readout channel.
size_type size() const
Returns the size of the vector.
const range_list_t & get_ranges() const
Returns the internal list of non-void ranges.
DataMap update(AdcChannelData &acd) const override
void setChannelInfo(ChannelInfoPtr pchi)
raw::ChannelID_t Channel() const
Returns the ID of the channel (or InvalidChannelID)
const RegionsOfInterest_t & SignalROI() const
Returns the list of regions of interest.
static constexpr double ps
Class holding the regions of interest of signal from a channel.
Range class, with range and data.
Declaration of basic channel signal object.
static Index badChannel()
auto const & get(AssnsNode< L, R, D > const &r)
QTextStream & endl(QTextStream &s)
AcdWireReader(fhicl::ParameterSet const &ps)
std::size_t NSignal() const
Returns the number of time ticks, or samples, in the channel.