#include <Omnibus.h>
Definition at line 20 of file Omnibus.h.
SigProc::Omnibus::Omnibus |
( |
| ) |
|
SigProc::Omnibus::~Omnibus |
( |
| ) |
|
|
virtual |
Accept a configuration.
Implements WireCell::IConfigurable.
Definition at line 35 of file Omnibus.cxx.
41 if (m_output_tn.empty()) {
42 std::cerr <<
"Omnibus has no final frame sink component.\n";
50 auto jffl =
cfg[
"filters"];
51 for (
auto jff : jffl) {
53 std::cerr <<
"Omnibus adding frame filter: \"" << fftn <<
"\"\n";
54 auto ff = Factory::find_tn<IFrameFilter>(fftn);
std::vector< std::string > m_filters_tn
IFrameSource::pointer m_input
IFrameSink::pointer m_output
std::vector< IFrameFilter::pointer > m_filters
Optional, override to return a hard-coded default configuration.
Reimplemented from WireCell::IConfigurable.
Definition at line 26 of file Omnibus.cxx.
30 cfg[
"filters"] = Json::arrayValue;
Json::Value Configuration
void SigProc::Omnibus::execute |
( |
| ) |
|
|
virtual |
Implement to run something.
Implements WireCell::IApplication.
Definition at line 61 of file Omnibus.cxx.
67 std::cerr <<
"Omnibus: failed to get input frame from " <<
m_input_tn <<
"\n";
68 THROW(RuntimeError() <<
errmsg{
"Omnibus: failed to get input frame"});
71 std::cerr <<
"Omnibus: got null frame, forwarding, assuming we have reached EOS\n";
74 if (!frame->traces()->size()) {
75 std::cerr <<
"Omnibus: got empty input frame, something is busted\n";
76 THROW(RuntimeError() <<
errmsg{
"Omnibus: got empty input frame, something is busted"});
79 std::cerr <<
"Omnibus: got input frame from "<<m_input_tn<<
" with " << frame->traces()->size() <<
" traces\n";
90 if (!(*ff)(frame, nextframe)) {
91 std::cerr <<
"Failed to filter frame from "<<tn<<
"\n";
92 THROW(RuntimeError() <<
errmsg{
"failed to filter frame"});
94 if (!nextframe && !frame) {
98 std::cerr <<
"Omnibus: filter "<<tn<<
" returned a null frame\n";
99 THROW(RuntimeError() <<
errmsg{
"filter returned a null frame"});
108 std::cerr <<
"Omnibus: got frame from "<<tn<<
" with " << frame->traces()->size() <<
" traces\n";
115 std::cerr <<
"Omnibus: failed to send output frame to "<<
m_output_tn<<
"\n";
116 THROW(RuntimeError() <<
errmsg{
"failed to send output frame"});
std::shared_ptr< const IFrame > pointer
boost::error_info< struct tag_errmsg, std::string > errmsg
std::vector< std::string > m_filters_tn
void dump_frame(WireCell::IFrame::pointer frame)
IFrameSource::pointer m_input
IFrameSink::pointer m_output
std::vector< IFrameFilter::pointer > m_filters
The documentation for this class was generated from the following files: