Public Types | Public Member Functions | List of all members
WireCell::IHydraNode< InputTuple, OutputTuple > Class Template Referenceabstract

#include <IHydraNode.h>

Inheritance diagram for WireCell::IHydraNode< InputTuple, OutputTuple >:
WireCell::IHydraNodeBase WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Types

typedef InputTuple input_tuple_type
 
typedef OutputTuple output_tuple_type
 
typedef shared_queued< InputTuple > input_shqed
 
typedef shared_queued< OutputTuple > output_shqed
 
typedef input_shqed::shared_queued_tuple_type input_queues_type
 
typedef output_shqed::shared_queued_tuple_type output_queues_type
 
- Public Types inherited from WireCell::IHydraNodeBase
typedef std::shared_ptr< IHydraNodeBasepointer
 
typedef std::deque< boost::any > any_queue
 
typedef std::vector< any_queueany_queue_vector
 
- Public Types inherited from WireCell::INode
enum  NodeCategory {
  unknown, sourceNode, sinkNode, functionNode,
  queuedoutNode, joinNode, splitNode, faninNode,
  fanoutNode, multioutNode, hydraNode
}
 
- Public Types inherited from WireCell::IComponent< INode >
typedef std::shared_ptr< INodepointer
 Access subclass facet by pointer. More...
 
typedef std::vector< pointervector
 Vector of shared pointers. More...
 
- Public Types inherited from WireCell::Interface
typedef std::shared_ptr< Interfacepointer
 

Public Member Functions

virtual ~IHydraNode ()
 
virtual bool operator() (any_queue_vector &anyinq, any_queue_vector &anyoutq)
 Translate call from any to types and back. More...
 
virtual bool operator() (input_queues_type &inqs, output_queues_type &outqs)=0
 Typed interface for subclass to implement. More...
 
virtual std::vector< std::stringinput_types ()
 
virtual std::vector< std::stringoutput_types ()
 
- Public Member Functions inherited from WireCell::IHydraNodeBase
virtual ~IHydraNodeBase ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
virtual int concurrency ()
 By default assume hydra nodes can do their thing stateless. More...
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual std::string signature ()=0
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Detailed Description

template<typename InputTuple, typename OutputTuple>
class WireCell::IHydraNode< InputTuple, OutputTuple >

A hydra with input and output fixed at compile-time with tuples.

Definition at line 50 of file IHydraNode.h.

Member Typedef Documentation

template<typename InputTuple, typename OutputTuple>
typedef input_shqed::shared_queued_tuple_type WireCell::IHydraNode< InputTuple, OutputTuple >::input_queues_type

Definition at line 59 of file IHydraNode.h.

template<typename InputTuple, typename OutputTuple>
typedef shared_queued<InputTuple> WireCell::IHydraNode< InputTuple, OutputTuple >::input_shqed

Definition at line 56 of file IHydraNode.h.

template<typename InputTuple, typename OutputTuple>
typedef InputTuple WireCell::IHydraNode< InputTuple, OutputTuple >::input_tuple_type

Definition at line 53 of file IHydraNode.h.

template<typename InputTuple, typename OutputTuple>
typedef output_shqed::shared_queued_tuple_type WireCell::IHydraNode< InputTuple, OutputTuple >::output_queues_type

Definition at line 60 of file IHydraNode.h.

template<typename InputTuple, typename OutputTuple>
typedef shared_queued<OutputTuple> WireCell::IHydraNode< InputTuple, OutputTuple >::output_shqed

Definition at line 57 of file IHydraNode.h.

template<typename InputTuple, typename OutputTuple>
typedef OutputTuple WireCell::IHydraNode< InputTuple, OutputTuple >::output_tuple_type

Definition at line 54 of file IHydraNode.h.

Constructor & Destructor Documentation

template<typename InputTuple, typename OutputTuple>
virtual WireCell::IHydraNode< InputTuple, OutputTuple >::~IHydraNode ( )
inlinevirtual

Definition at line 62 of file IHydraNode.h.

62 {}

Member Function Documentation

template<typename InputTuple, typename OutputTuple>
virtual std::vector<std::string> WireCell::IHydraNode< InputTuple, OutputTuple >::input_types ( )
inlinevirtual

Reimplemented from WireCell::INode.

Definition at line 88 of file IHydraNode.h.

88  {
89  tuple_helper<input_tuple_type> ih;
90  return ih.type_names();
91  }
template<typename InputTuple, typename OutputTuple>
virtual bool WireCell::IHydraNode< InputTuple, OutputTuple >::operator() ( any_queue_vector anyinq,
any_queue_vector anyoutq 
)
inlinevirtual

Translate call from any to types and back.

Implements WireCell::IHydraNodeBase.

Definition at line 65 of file IHydraNode.h.

66  {
67  input_shqed ih;
68  output_shqed oh;
69 
70  auto inq = ih.from_any_queue(anyinq);
71  output_queues_type outq;
72 
73  bool ok = (*this)(inq, outq);
74  if (ok) {
75  anyoutq = oh.as_any_queue(outq);
76  }
77 
78  // (re)set input queue
79  anyinq = ih.as_any_queue(inq);
80  return ok;
81  }
shared_queued< InputTuple > input_shqed
Definition: IHydraNode.h:56
output_shqed::shared_queued_tuple_type output_queues_type
Definition: IHydraNode.h:60
shared_queued< OutputTuple > output_shqed
Definition: IHydraNode.h:57
template<typename InputTuple, typename OutputTuple>
virtual bool WireCell::IHydraNode< InputTuple, OutputTuple >::operator() ( input_queues_type inqs,
output_queues_type outqs 
)
pure virtual

Typed interface for subclass to implement.

Implemented in MyHydra, and WireCell::Gen::DepoMerger.

template<typename InputTuple, typename OutputTuple>
virtual std::vector<std::string> WireCell::IHydraNode< InputTuple, OutputTuple >::output_types ( )
inlinevirtual

Reimplemented from WireCell::INode.

Definition at line 93 of file IHydraNode.h.

93  {
94  tuple_helper<output_tuple_type> oh;
95  return oh.type_names();
96  }

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