Public Member Functions | Private Attributes | List of all members
WireCellTbb::FaninWrapper Class Reference

#include <FaninCat.h>

Inheritance diagram for WireCellTbb::FaninWrapper:
WireCellTbb::NodeWrapper

Public Member Functions

 FaninWrapper (tbb::flow::graph &graph, WireCell::INode::pointer wcnode)
 
virtual receiver_port_vector receiver_ports ()
 
virtual sender_port_vector sender_ports ()
 
- Public Member Functions inherited from WireCellTbb::NodeWrapper
virtual ~NodeWrapper ()
 
virtual void initialize ()
 

Private Attributes

tbb::flow::graph_node * m_joiner
 
tbb::flow::graph_node * m_caller
 
receiver_port_vector m_receiver_ports
 

Detailed Description

Definition at line 60 of file FaninCat.h.

Constructor & Destructor Documentation

WireCellTbb::FaninWrapper::FaninWrapper ( tbb::flow::graph &  graph,
WireCell::INode::pointer  wcnode 
)
inline

Definition at line 66 of file FaninCat.h.

67  : m_joiner(0), m_caller(0)
68  {
69  int nin = wcnode->input_types().size();
70  // an exhaustive switch to convert from run-time to compile-time types and enumerations.
71  Assert (nin > 0 && nin <= 3); // fixme: exception instead?
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);
75  }
receiver_port_vector m_receiver_ports
Definition: FaninCat.h:62
def graph(desc, maker=maker)
Definition: apa.py:294
#define Assert
Definition: Testing.h:7
tbb::flow::graph_node * m_caller
Definition: FaninCat.h:61
tbb::flow::graph_node * m_joiner
Definition: FaninCat.h:61

Member Function Documentation

virtual receiver_port_vector WireCellTbb::FaninWrapper::receiver_ports ( )
inlinevirtual

Reimplemented from WireCellTbb::NodeWrapper.

Definition at line 77 of file FaninCat.h.

77  {
78  return m_receiver_ports;
79  }
receiver_port_vector m_receiver_ports
Definition: FaninCat.h:62
virtual sender_port_vector WireCellTbb::FaninWrapper::sender_ports ( )
inlinevirtual

Reimplemented from WireCellTbb::NodeWrapper.

Definition at line 81 of file FaninCat.h.

81  {
82  auto ptr = dynamic_cast< sender_type* >(m_caller);
83  return sender_port_vector{ptr};
84  }
std::vector< sender_port_pointer > sender_port_vector
tbb::flow::graph_node * m_caller
Definition: FaninCat.h:61
const void * ptr(const T *p)
Definition: format.h:3138
tbb::flow::sender< boost::any > sender_type

Member Data Documentation

tbb::flow::graph_node * WireCellTbb::FaninWrapper::m_caller
private

Definition at line 61 of file FaninCat.h.

tbb::flow::graph_node* WireCellTbb::FaninWrapper::m_joiner
private

Definition at line 61 of file FaninCat.h.

receiver_port_vector WireCellTbb::FaninWrapper::m_receiver_ports
private

Definition at line 62 of file FaninCat.h.


The documentation for this class was generated from the following file: