Public Member Functions | Private Attributes | List of all members
IdNode Class Reference
Inheritance diagram for IdNode:
WireCell::Pgraph::Node Func Nfan Njoin Sink< InputType > Sink< int > Source< OutputType > Source< int > SplitQueueBuffer

Public Member Functions

 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 ()
 
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

std::string m_name
 
int m_id
 

Additional Inherited Members

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

Detailed Description

Definition at line 16 of file test_pipegraph.cxx.

Constructor & Destructor Documentation

IdNode::IdNode ( const std::string name,
int  id,
size_t  nin = 0,
size_t  nout = 0 
)
inline

Definition at line 19 of file test_pipegraph.cxx.

20  : m_name(name), m_id(id) {
21  using Pgraph::Port;
22  for (size_t ind=0; ind<nin; ++ind) {
23  m_ports[Port::input].push_back(
24  Pgraph::Port(this, Pgraph::Port::input, "int"));
25  }
26  for (size_t ind=0; ind<nout; ++ind) {
27  m_ports[Port::output].push_back(
28  Pgraph::Port(this, Pgraph::Port::output, "int"));
29  }
30  }
static QCString name
Definition: declinfo.cpp:673
static int input(void)
Definition: code.cpp:15695
std::string m_name
PortList m_ports[Port::ntypes]
Definition: Node.h:68

Member Function Documentation

int IdNode::id ( )
inline

Definition at line 31 of file test_pipegraph.cxx.

31 { return m_id; }
virtual std::string IdNode::ident ( )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 33 of file test_pipegraph.cxx.

33  {
34  stringstream ss;
35  ss << m_name << "[" << m_id << "]";
36  return ss.str();
37  }
std::string m_name
std::ostream& IdNode::msg ( const std::string  s)
inline

Definition at line 38 of file test_pipegraph.cxx.

38  {
39  std::cerr << ident() << ":\t" << s;
40  return std::cerr;
41  }
virtual std::string ident()
static QCString * s
Definition: config.cpp:1042
virtual bool IdNode::ready ( )
inlinevirtual

Reimplemented in Njoin, Source< OutputType >, and Source< int >.

Definition at line 43 of file test_pipegraph.cxx.

43  {
44  using Pgraph::Port;
45  for (auto& p : m_ports[Port::input]) {
46  if (p.empty()) return false;
47  }
48  return true;
49  }
static int input(void)
Definition: code.cpp:15695
p
Definition: test.py:223
PortList m_ports[Port::ntypes]
Definition: Node.h:68

Member Data Documentation

int IdNode::m_id
private

Definition at line 54 of file test_pipegraph.cxx.

std::string IdNode::m_name
private

Definition at line 53 of file test_pipegraph.cxx.


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