#include "RawFrameSource.h"
#include "art/Framework/Principal/Handle.h"
#include "lardataobj/RawData/RawDigit.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Run.h"
#include "TTimeStamp.h"
#include "WireCellIface/SimpleFrame.h"
#include "WireCellIface/SimpleTrace.h"
#include "WireCellUtil/NamedFactory.h"
Go to the source code of this file.
static SimpleTrace* make_trace |
( |
const raw::RawDigit & |
rd, |
|
|
unsigned int |
nticks_want |
|
) |
| |
|
static |
Definition at line 72 of file RawFrameSource.cxx.
79 unsigned int nadcs = adcv.size();
80 if (nticks_want > 0) {
81 if (nticks_want > nadcs) {
82 baseline = Waveform::most_frequent(adcv);
84 nadcs =
std::min(nadcs, nticks_want);
90 auto strace =
new SimpleTrace(chid, tbin, nticks_want);
91 for (
unsigned int itick=0; itick < nadcs; ++ itick) {
92 strace->charge()[itick] = adcv[itick];
94 for (
unsigned int itick = nadcs; itick < nticks_want; ++itick) {
95 strace->charge()[itick] = baseline;
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition at line 63 of file RawFrameSource.cxx.
67 return tts2.AsDouble() - tts1.AsDouble();
constexpr std::uint32_t timeLow() const
constexpr std::uint32_t timeHigh() const