1 #ifndef WIRECELLTBB_FANINCAT 2 #define WIRECELLTBB_FANINCAT 13 template<
typename TupleType>
27 any_vector in = ih.as_any(tup);
36 template<std::
size_t N>
38 tbb::flow::graph_node*& joiner, tbb::flow::graph_node*& caller)
43 typedef tbb::flow::join_node< TupleType > tbb_join_node_type;
44 tbb_join_node_type* jn =
new tbb_join_node_type(graph);
48 typedef tbb::flow::function_node<TupleType,boost::any> joining_node;
52 tbb::flow::make_edge(*jn, *fn);
67 : m_joiner(0), m_caller(0)
69 int nin = wcnode->input_types().size();
71 Assert (nin > 0 && nin <= 3);
72 if (1 == nin) m_receiver_ports = build_faniner<1>(
graph, wcnode, m_joiner, m_caller);
73 if (2 == nin) m_receiver_ports = build_faniner<2>(
graph, wcnode, m_joiner, m_caller);
74 if (3 == nin) m_receiver_ports = build_faniner<3>(
graph, wcnode, m_joiner, m_caller);
78 return m_receiver_ports;
FaninBody(WireCell::INode::pointer wcnode)
receiver_port_vector m_receiver_ports
receiver_port_vector receiver_ports(tbb::flow::join_node< Tuple > &jn, std::index_sequence< Is... >)
WireCell::IFaninNodeBase::pointer m_wcnode
virtual sender_port_vector sender_ports()
def graph(desc, maker=maker)
receiver_port_vector build_faniner(tbb::flow::graph &graph, WireCell::INode::pointer wcnode, tbb::flow::graph_node *&joiner, tbb::flow::graph_node *&caller)
FaninWrapper(tbb::flow::graph &graph, WireCell::INode::pointer wcnode)
std::shared_ptr< Interface > pointer
WireCell::tuple_helper< TupleType > helper_type
std::vector< receiver_type * > receiver_port_vector
virtual receiver_port_vector receiver_ports()
WireCell::IFaninNodeBase::any_vector any_vector
tbb::flow::sender< boost::any > sender_type
std::vector< boost::any > any_vector
boost::any operator()(const TupleType &tup) const
std::vector< sender_type * > sender_port_vector
tbb::flow::graph_node * m_joiner
std::shared_ptr< IFaninNodeBase > pointer