Public Member Functions | Private Attributes | List of all members
WireCell::Pgraph::PortedNode Class Reference

#include <Wrappers.h>

Inheritance diagram for WireCell::Pgraph::PortedNode:
WireCell::Pgraph::Node WireCell::Pgraph::Function WireCell::Pgraph::Hydra WireCell::Pgraph::JoinFanin< INodeBaseType > WireCell::Pgraph::Queuedout WireCell::Pgraph::Sink WireCell::Pgraph::Source WireCell::Pgraph::SplitFanout< INodeBaseType >

Public Member Functions

 PortedNode (INode::pointer wcnode)
 
virtual std::string ident ()
 
- Public Member Functions inherited from WireCell::Pgraph::Node
 Node ()
 
virtual ~Node ()
 
virtual bool operator() ()=0
 
Portiport (size_t ind=0)
 
Portoport (size_t ind=0)
 
PortListinput_ports ()
 
PortListoutput_ports ()
 
Portport (Port::Type type, size_t ind=0)
 
Portport (Port::Type type, const std::string &name)
 
bool connected ()
 

Private Attributes

INode::pointer m_wcnode
 

Additional Inherited Members

- Protected Attributes inherited from WireCell::Pgraph::Node
PortList m_ports [Port::ntypes]
 

Detailed Description

Definition at line 37 of file Wrappers.h.

Constructor & Destructor Documentation

WireCell::Pgraph::PortedNode::PortedNode ( INode::pointer  wcnode)
inline

Definition at line 40 of file Wrappers.h.

40  : m_wcnode(wcnode) {
41  if (! m_wcnode.get()) {
42  THROW(ValueError() << errmsg{"Pgraph::PortedNode got null INode"});
43  }
44 
45  using Pgraph::Port;
46  for (auto sig : wcnode->input_types()) {
47  m_ports[Port::input].push_back(
48  Pgraph::Port(this, Pgraph::Port::input, sig));
49  }
50  for (auto sig : wcnode->output_types()) {
51  m_ports[Port::output].push_back(
52  Pgraph::Port(this, Pgraph::Port::output, sig));
53  }
54  }
boost::error_info< struct tag_errmsg, std::string > errmsg
Definition: Exceptions.h:54
#define THROW(e)
Definition: Exceptions.h:25
PortList m_ports[Port::ntypes]
Definition: Node.h:68
INode::pointer m_wcnode
Definition: Wrappers.h:76

Member Function Documentation

virtual std::string WireCell::Pgraph::PortedNode::ident ( )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 56 of file Wrappers.h.

56  {
57  std::stringstream ss;
58  ss << "<Node "
59  << " type:" << WireCell::type(*(m_wcnode.get()))
60  << " cat:" << m_wcnode->category()
61  << " sig:" << demangle(m_wcnode->signature());
62  ss << " inputs:[";
63  for (auto t : m_wcnode->input_types()) {
64  ss << " " << demangle(t);
65  }
66  ss << " ]";
67  ss << " outputs:[";
68  for (auto t : m_wcnode->output_types()) {
69  ss << " " << demangle(t);
70  }
71  ss << " ]";
72  return ss.str();
73  }
std::string demangle(const std::string &name)
Definition: Type.cxx:6
std::string type(const T &t)
Definition: Type.h:20
INode::pointer m_wcnode
Definition: Wrappers.h:76

Member Data Documentation

INode::pointer WireCell::Pgraph::PortedNode::m_wcnode
private

Definition at line 76 of file Wrappers.h.


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