#include <CookedFrameSource.h>
Definition at line 22 of file CookedFrameSource.h.
CookedFrameSource::CookedFrameSource |
( |
| ) |
|
CookedFrameSource::~CookedFrameSource |
( |
| ) |
|
|
virtual |
void CookedFrameSource::configure |
( |
const WireCell::Configuration & |
config | ) |
|
|
virtual |
Definition at line 38 of file CookedFrameSource.cxx.
40 const std::string art_tag = cfg[
"art_tag"].asString();
41 if (art_tag.empty()) {
42 THROW(ValueError() << errmsg{
"WireCell::CookedFrameSource requires a source_label"});
46 m_tick = cfg[
"tick"].asDouble();
47 for (
auto jtag : cfg[
"frame_tags"]) {
std::vector< std::string > m_frame_tags
WireCell::Configuration CookedFrameSource::default_configuration |
( |
| ) |
const |
|
virtual |
IConfigurable.
Definition at line 27 of file CookedFrameSource.cxx.
32 cfg[
"frame_tags"][0] =
"orig";
static constexpr double us
bool CookedFrameSource::operator() |
( |
WireCell::IFrame::pointer & |
frame | ) |
|
|
virtual |
void CookedFrameSource::visit |
( |
art::Event & |
event | ) |
|
|
virtual |
IArtEventVisitor.
Implements wcls::IArtEventVisitor.
Definition at line 90 of file CookedFrameSource.cxx.
92 auto const&
event =
e;
96 bool okay =
event.getByLabel(
m_inputTag, rwvh);
99 "WireCell::CookedFrameSource failed to get vector<recob::Wire>: " +
m_inputTag.
encode();
101 THROW(RuntimeError() << errmsg{msg});
103 else if (rwvh->size() == 0)
106 const std::vector<recob::Wire>& rwv(*rwvh);
107 const size_t nchannels = rwv.size();
108 std::cerr <<
"CookedFrameSource: got " << nchannels <<
" recob::Wire objects\n";
111 for (
size_t ind = 0; ind < nchannels; ++ind) {
112 auto const& rw = rwv.at(ind);
116 std::cerr <<
"\tinput nticks=" << rw.NSignal() <<
" setting to " <<
m_nticks <<
std::endl;
119 std::cerr <<
"\tinput nticks=" << rw.NSignal() <<
" keeping as is" <<
std::endl;
125 auto sframe =
new WireCell::SimpleFrame(event.
event(), time, traces,
tick);
128 sframe->tag_frame(
tag);
130 m_frames.push_back(WireCell::IFrame::pointer(sframe));
EventNumber_t event() const
void msg(const char *fmt,...)
std::vector< std::string > m_frame_tags
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
Run const & getRun() const
static SimpleTrace * make_trace(const recob::Wire &rw, unsigned int nticks_want)
static double tdiff(const art::Timestamp &ts1, const art::Timestamp &ts2)
std::deque< WireCell::IFrame::pointer > m_frames
Timestamp const & beginTime() const
QTextStream & endl(QTextStream &s)
std::deque<WireCell::IFrame::pointer> wcls::CookedFrameSource::m_frames |
|
private |
int wcls::CookedFrameSource::m_nticks |
|
private |
double wcls::CookedFrameSource::m_tick |
|
private |
The documentation for this class was generated from the following files: