Public Types | Public Member Functions | Private Attributes | List of all members
WireCell::Pgraph::JoinFanin< INodeBaseType > Class Template Reference

#include <Wrappers.h>

Inheritance diagram for WireCell::Pgraph::JoinFanin< INodeBaseType >:
WireCell::Pgraph::PortedNode WireCell::Pgraph::Node

Public Types

typedef INodeBaseType inode_type
 
typedef INodeBaseType::any_vector any_vector
 
typedef INodeBaseType::pointer pointer
 

Public Member Functions

 JoinFanin (INode::pointer wcnode)
 
virtual ~JoinFanin ()
 
virtual bool operator() ()
 
- Public Member Functions inherited from WireCell::Pgraph::PortedNode
 PortedNode (INode::pointer wcnode)
 
virtual std::string ident ()
 
- Public Member Functions inherited from WireCell::Pgraph::Node
 Node ()
 
virtual ~Node ()
 
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

pointer m_wcnode
 

Additional Inherited Members

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

Detailed Description

template<class INodeBaseType>
class WireCell::Pgraph::JoinFanin< INodeBaseType >

Definition at line 173 of file Wrappers.h.

Member Typedef Documentation

template<class INodeBaseType >
typedef INodeBaseType::any_vector WireCell::Pgraph::JoinFanin< INodeBaseType >::any_vector

Definition at line 176 of file Wrappers.h.

template<class INodeBaseType >
typedef INodeBaseType WireCell::Pgraph::JoinFanin< INodeBaseType >::inode_type

Definition at line 175 of file Wrappers.h.

template<class INodeBaseType >
typedef INodeBaseType::pointer WireCell::Pgraph::JoinFanin< INodeBaseType >::pointer

Definition at line 177 of file Wrappers.h.

Constructor & Destructor Documentation

template<class INodeBaseType >
WireCell::Pgraph::JoinFanin< INodeBaseType >::JoinFanin ( INode::pointer  wcnode)
inline

Definition at line 179 of file Wrappers.h.

179  : PortedNode(wcnode) {
180  m_wcnode = std::dynamic_pointer_cast<INodeBaseType>(wcnode);
181  }
PortedNode(INode::pointer wcnode)
Definition: Wrappers.h:40
template<class INodeBaseType >
virtual WireCell::Pgraph::JoinFanin< INodeBaseType >::~JoinFanin ( )
inlinevirtual

Definition at line 182 of file Wrappers.h.

182 {}

Member Function Documentation

template<class INodeBaseType >
virtual bool WireCell::Pgraph::JoinFanin< INodeBaseType >::operator() ( void  )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 183 of file Wrappers.h.

183  {
184  Port& op = oport();
185  if (!op.empty()) {
186  return false; // don't call me if I've got existing output waiting
187  }
188 
189  auto& iports = input_ports();
190  size_t nin = iports.size();
191  for (size_t ind=0; ind<nin; ++ind) {
192  if (iports[ind].empty()) {
193  return false;
194  }
195  }
196  any_vector inv(nin);
197  for (size_t ind=0; ind<nin; ++ind) {
198  inv[ind] = iports[ind].get();
199  }
200  boost::any out;
201  bool ok = (*m_wcnode)(inv, out);
202  if (!ok) {
203  return false;
204  }
205  op.put(out);
206  return true;
207  }
PortList & input_ports()
Definition: Node.h:29
INodeBaseType::any_vector any_vector
Definition: Wrappers.h:176
virtual bool put(const port_type &in)
Definition: test_typeid.cxx:41
Port & oport(size_t ind=0)
Definition: Node.h:25
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:92

Member Data Documentation

template<class INodeBaseType >
pointer WireCell::Pgraph::JoinFanin< INodeBaseType >::m_wcnode
private

Definition at line 209 of file Wrappers.h.


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