Public Member Functions | List of all members
Nfan Class Reference
Inheritance diagram for Nfan:
IdNode WireCell::Pgraph::Node

Public Member Functions

 Nfan (int id, int n)
 
virtual bool operator() ()
 
- Public Member Functions inherited from IdNode
 IdNode (const std::string &name, int id, size_t nin=0, size_t nout=0)
 
int id ()
 
virtual std::string ident ()
 
std::ostream & msg (const std::string s)
 
virtual bool ready ()
 
- 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 ()
 

Additional Inherited Members

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

Detailed Description

Definition at line 154 of file test_pipegraph.cxx.

Constructor & Destructor Documentation

Nfan::Nfan ( int  id,
int  n 
)
inline

Definition at line 156 of file test_pipegraph.cxx.

156 : IdNode("fan", id, 1, n) {}
IdNode(const std::string &name, int id, size_t nin=0, size_t nout=0)
std::size_t n
Definition: format.h:3399

Member Function Documentation

virtual bool Nfan::operator() ( void  )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 157 of file test_pipegraph.cxx.

157  {
158  if (iport().empty()) {
159  return false;
160  }
161  auto obj = iport().get();
162  int d = boost::any_cast<int>(obj);
163  msg("nfan: ") << d << std::endl;
164  for (auto p : output_ports()) {
165  p.put(obj);
166  }
167  return true;
168  }
Data get(bool pop=true)
Definition: Port.cxx:43
Port & iport(size_t ind=0)
Definition: Node.h:22
p
Definition: test.py:223
std::ostream & msg(const std::string s)
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:92
QTextStream & endl(QTextStream &s)
PortList & output_ports()
Definition: Node.h:32

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