#include <RawFrameSource.h>
Definition at line 22 of file RawFrameSource.h.
RawFrameSource::RawFrameSource |
( |
| ) |
|
RawFrameSource::~RawFrameSource |
( |
| ) |
|
|
virtual |
void RawFrameSource::configure |
( |
const WireCell::Configuration & |
config | ) |
|
|
virtual |
Definition at line 46 of file RawFrameSource.cxx.
48 const std::string art_tag = cfg[
"art_tag"].asString();
49 if (art_tag.empty()) {
50 THROW(ValueError() << errmsg{
"WireCell::RawFrameSource requires a source_label"});
54 m_tick = cfg[
"tick"].asDouble();
55 for (
auto jtag : cfg[
"frame_tags"]) {
std::vector< std::string > m_frame_tags
WireCell::Configuration RawFrameSource::default_configuration |
( |
| ) |
const |
|
virtual |
IConfigurable.
Definition at line 36 of file RawFrameSource.cxx.
40 cfg[
"tick"] = 0.5*WireCell::units::us;
41 cfg[
"frame_tags"][0] =
"orig";
bool RawFrameSource::operator() |
( |
WireCell::IFrame::pointer & |
frame | ) |
|
|
virtual |
IFrameSource.
Definition at line 147 of file RawFrameSource.cxx.
std::deque< WireCell::IFrame::pointer > m_frames
void RawFrameSource::visit |
( |
art::Event & |
event | ) |
|
|
virtual |
IArtEventVisitor.
Implements wcls::IArtEventVisitor.
Definition at line 102 of file RawFrameSource.cxx.
106 art::Handle< std::vector<raw::RawDigit> > rdvh;
107 bool okay =
event.getByLabel(
m_inputTag, rdvh);
109 std::string
msg =
"WireCell::RawFrameSource failed to get vector<raw::RawDigit>: " +
m_inputTag.encode();
111 THROW(RuntimeError() << errmsg{msg});
113 else if (rdvh->size() == 0)
return;
115 const std::vector<raw::RawDigit>& rdv(*rdvh);
116 const size_t nchannels = rdv.size();
117 std::cerr <<
"RawFrameSource: got " << nchannels <<
" raw::RawDigit objects\n";
120 for (
size_t ind=0; ind<nchannels; ++ind) {
121 auto const& rd = rdv.at(ind);
126 <<
"\tinput nticks=" << rd.ADCs().size() <<
" setting to " <<
m_nticks
131 <<
"\tinput nticks=" << rd.ADCs().size() <<
" keeping as is"
137 const double time =
tdiff(event.getRun().beginTime(),
event.time());
138 auto sframe =
new SimpleFrame(event.event(), time, traces,
tick);
141 sframe->tag_frame(tag);
143 m_frames.push_back(WireCell::IFrame::pointer(sframe));
static SimpleTrace * make_trace(const raw::RawDigit &rd, unsigned int nticks_want)
BEGIN_PROLOG could also be cerr
auto vector(Vector const &v)
Returns a manipulator which will print the specified array.
std::deque< WireCell::IFrame::pointer > m_frames
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
std::vector< std::string > m_frame_tags
static double tdiff(const art::Timestamp &ts1, const art::Timestamp &ts2)
std::vector<std::string> wcls::RawFrameSource::m_frame_tags |
|
private |
std::deque<WireCell::IFrame::pointer> wcls::RawFrameSource::m_frames |
|
private |
art::InputTag wcls::RawFrameSource::m_inputTag |
|
private |
int wcls::RawFrameSource::m_nticks |
|
private |
double wcls::RawFrameSource::m_tick |
|
private |
The documentation for this class was generated from the following files: