Public Types | Public Member Functions | List of all members
Sink< InputType > Class Template Referenceabstract
Inheritance diagram for Sink< InputType >:
Hydra IdNode WireCell::Pgraph::Node

Public Types

typedef std::shared_ptr< const InputType > input_pointer
 

Public Member Functions

 Sink (int id)
 
virtual ~Sink ()
 
virtual bool operator() ()
 
virtual ~Sink ()
 
virtual bool extract (AnyPorts &output)
 
virtual bool insert (AnyPorts &input)
 
virtual bool insert (const input_pointer &in)=0
 
- Public Member Functions inherited from Hydra
virtual ~Hydra ()
 
- 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

template<typename InputType>
class Sink< InputType >

Definition at line 78 of file test_pipegraph.cxx.

Member Typedef Documentation

template<typename InputType>
typedef std::shared_ptr<const InputType> Sink< InputType >::input_pointer

Definition at line 38 of file _test_hydra.cxx.

Constructor & Destructor Documentation

template<typename InputType>
Sink< InputType >::Sink ( int  id)
inline

Definition at line 80 of file test_pipegraph.cxx.

80 : IdNode("dst", id, 1, 0) {}
IdNode(const std::string &name, int id, size_t nin=0, size_t nout=0)
template<typename InputType>
virtual Sink< InputType >::~Sink ( )
inlinevirtual

Definition at line 81 of file test_pipegraph.cxx.

81 {}
template<typename InputType>
virtual Sink< InputType >::~Sink ( )
inlinevirtual

Definition at line 36 of file _test_hydra.cxx.

36 {}

Member Function Documentation

template<typename InputType>
virtual bool Sink< InputType >::extract ( AnyPorts output)
inlinevirtual

Implements Hydra.

Definition at line 40 of file _test_hydra.cxx.

40 { return false; }
template<typename InputType>
virtual bool Sink< InputType >::insert ( AnyPorts input)
inlinevirtual

Implements Hydra.

Definition at line 41 of file _test_hydra.cxx.

41  {
42  for (auto anyin : input[0]) {
43  input_pointer in = any_cast<input_pointer>(anyin);
44  bool ok = this->insert(in);
45  if (!ok) return false;
46  }
47  return true;
48  }
static int input(void)
Definition: code.cpp:15695
std::shared_ptr< const InputType > input_pointer
Definition: _test_hydra.cxx:38
virtual bool insert(AnyPorts &input)
Definition: _test_hydra.cxx:41
template<typename InputType>
virtual bool Sink< InputType >::insert ( const input_pointer in)
pure virtual

Implemented in IntSink.

template<typename InputType>
virtual bool Sink< InputType >::operator() ( void  )
inlinevirtual

Implements WireCell::Pgraph::Node.

Definition at line 82 of file test_pipegraph.cxx.

82  {
83  if (iport().empty()) { return false; }
84  int d = boost::any_cast<int>(iport().get());
85  msg("sink: ") << d << std::endl;
86  return true;
87  }
Data get(bool pop=true)
Definition: Port.cxx:43
Port & iport(size_t ind=0)
Definition: Node.h:22
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)

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