#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 40 of file CookedFrameSource.cxx.
42 const std::string art_tag = cfg[
"art_tag"].asString();
43 if (art_tag.empty()) {
44 THROW(ValueError() << errmsg{
"WireCell::CookedFrameSource requires a source_label"});
48 m_tick = cfg[
"tick"].asDouble();
49 for (
auto jtag : cfg[
"frame_tags"]) {
std::vector< std::string > m_frame_tags
WireCell::Configuration CookedFrameSource::default_configuration |
( |
| ) |
const |
|
virtual |
IConfigurable.
Definition at line 29 of file CookedFrameSource.cxx.
33 cfg[
"tick"] = 0.5 * WireCell::units::us;
34 cfg[
"frame_tags"][0] =
"orig";
bool CookedFrameSource::operator() |
( |
WireCell::IFrame::pointer & |
frame | ) |
|
|
virtual |
IFrameSource.
Definition at line 137 of file CookedFrameSource.cxx.
140 if (
m_frames.empty()) {
return false; }
std::deque< WireCell::IFrame::pointer > m_frames
void CookedFrameSource::visit |
( |
art::Event & |
event | ) |
|
|
virtual |
IArtEventVisitor.
Implements wcls::IArtEventVisitor.
Definition at line 92 of file CookedFrameSource.cxx.
94 auto const&
event =
e;
97 art::Handle<std::vector<recob::Wire>> rwvh;
98 bool okay =
event.getByLabel(
m_inputTag, rwvh);
101 "WireCell::CookedFrameSource failed to get vector<recob::Wire>: " +
m_inputTag.encode();
103 THROW(RuntimeError() << errmsg{msg});
105 else if (rwvh->size() == 0)
108 const std::vector<recob::Wire>& rwv(*rwvh);
109 const size_t nchannels = rwv.size();
110 std::cerr <<
"CookedFrameSource: got " << nchannels <<
" recob::Wire objects\n";
113 for (
size_t ind = 0; ind < nchannels; ++ind) {
114 auto const& rw = rwv.at(ind);
118 std::cerr <<
"\tinput nticks=" << rw.NSignal() <<
" setting to " <<
m_nticks << std::endl;
121 std::cerr <<
"\tinput nticks=" << rw.NSignal() <<
" keeping as is" << std::endl;
126 const double time =
tdiff(event.getRun().beginTime(),
event.time());
127 auto sframe =
new SimpleFrame(event.event(), time, traces,
tick);
130 sframe->tag_frame(tag);
132 m_frames.push_back(WireCell::IFrame::pointer(sframe));
BEGIN_PROLOG could also be cerr
std::vector< std::string > m_frame_tags
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
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
std::vector<std::string> wcls::CookedFrameSource::m_frame_tags |
|
private |
std::deque<WireCell::IFrame::pointer> wcls::CookedFrameSource::m_frames |
|
private |
art::InputTag wcls::CookedFrameSource::m_inputTag |
|
private |
int wcls::CookedFrameSource::m_nticks |
|
private |
double wcls::CookedFrameSource::m_tick |
|
private |
The documentation for this class was generated from the following files: