#include <ChannelSplitter.h>
|
typedef IFrame | input_type |
|
typedef IFrame | output_type |
|
typedef std::shared_ptr< const IFrame > | input_pointer |
|
typedef std::shared_ptr< const IFrame > | output_pointer |
|
typedef std::vector< output_pointer > | output_vector |
|
typedef std::shared_ptr< IFanoutNodeBase > | pointer |
|
typedef std::vector< boost::any > | any_vector |
|
enum | NodeCategory {
unknown,
sourceNode,
sinkNode,
functionNode,
queuedoutNode,
joinNode,
splitNode,
faninNode,
fanoutNode,
multioutNode,
hydraNode
} |
|
typedef std::shared_ptr< INode > | pointer |
| Access subclass facet by pointer. More...
|
|
typedef std::vector< pointer > | vector |
| Vector of shared pointers. More...
|
|
typedef std::shared_ptr< Interface > | pointer |
|
typedef std::shared_ptr< IConfigurable > | pointer |
| Access subclass facet by pointer. More...
|
|
typedef std::vector< pointer > | vector |
| Vector of shared pointers. More...
|
|
Definition at line 21 of file ChannelSplitter.h.
SigProc::ChannelSplitter::ChannelSplitter |
( |
size_t |
multiplicity = 0 | ) |
|
SigProc::ChannelSplitter::~ChannelSplitter |
( |
| ) |
|
|
virtual |
Accept a configuration.
Implements WireCell::IConfigurable.
Definition at line 38 of file ChannelSplitter.cxx.
42 for (
auto janode :
cfg[
"anodes"]) {
43 auto anode = Factory::find_tn<IAnodePlane>(janode.asString());
44 for (
auto c : anode->channels()) {
50 THROW(ValueError() <<
errmsg{
"ChannelSplitter must have at least one annode"});
boost::error_info< struct tag_errmsg, std::string > errmsg
std::unordered_map< int, int > m_c2p
void configure(const Configuration &cfg)
Optional, override to return a hard-coded default configuration.
Reimplemented from WireCell::IConfigurable.
Definition at line 23 of file ChannelSplitter.cxx.
28 cfg[
"anodes"] = Json::arrayValue;
34 cfg[
"tag_rules"] = Json::arrayValue;
Json::Value Configuration
Implements WireCell::IFanoutNode< IFrame, IFrame, 0 >.
Definition at line 64 of file ChannelSplitter.cxx.
72 log->debug(
"ChannelSplitter: see EOS");
76 std::vector<ITrace::vector> port_traces(m_multiplicity);
78 for (
const auto& itrace : *(in->traces())) {
79 int chan = itrace->channel();
80 const auto& it =
m_c2p.find(chan);
81 if (it ==
m_c2p.end()) {
82 log->debug(
"ChannelSplitter: no port for channel {}, dropping", chan);
85 const int port = it->second;
86 port_traces[port].push_back(itrace);
89 auto fintags = in->frame_tags();
90 std::stringstream taginfo;
94 auto sfout =
new SimpleFrame(in->ident(), in->time(), port_traces[iport], in->tick());
99 for (
auto ftag : fouttags) {
100 sfout->tag_frame(ftag);
101 taginfo <<
" ftag:" << ftag;
104 for (
auto inttag : in->trace_tags()) {
106 if (touttags.empty()) {
109 const auto& traces = in->tagged_traces(inttag);
110 const auto&
summary = in->trace_summary(inttag);
111 for (
auto otag : touttags) {
112 sfout->tag_traces(otag, traces,
summary);
113 taginfo <<
" " << inttag <<
"->" << otag;
121 if (!tagmsg.empty()) {
122 log->debug(
"ChannelSplitter: tagnifo:{}", taginfo.str());
std::shared_ptr< const IFrame > pointer
std::unordered_set< tag_t > tagset_t
tagset_t transform(size_t ind, const std::string &name, const tag_t &tag)
std::unordered_map< int, int > m_c2p
std::unordered_map<int, int> WireCell::SigProc::ChannelSplitter::m_c2p |
|
private |
size_t WireCell::SigProc::ChannelSplitter::m_multiplicity |
|
private |
The documentation for this class was generated from the following files: