Public Member Functions | Private Attributes | List of all members
WireCellTbb::MockDrifter Class Reference

#include <tbb_mock.h>

Inheritance diagram for WireCellTbb::MockDrifter:
WireCell::IDrifter WireCell::IQueuedoutNode< IDepo, IDepo > WireCell::IQueuedoutNodeBase WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

virtual ~MockDrifter ()
 
virtual bool operator() (const input_pointer &in, output_queue &outq)
 The calling signature: More...
 
- Public Member Functions inherited from WireCell::IDrifter
virtual ~IDrifter ()
 
virtual std::string signature ()
 
- Public Member Functions inherited from WireCell::IQueuedoutNode< IDepo, IDepo >
virtual ~IQueuedoutNode ()
 
virtual bool operator() (const boost::any &anyin, queuedany &outanyq)
 The calling signature: More...
 
virtual std::vector< std::stringinput_types ()
 
virtual std::vector< std::stringoutput_types ()
 
- Public Member Functions inherited from WireCell::IQueuedoutNodeBase
virtual ~IQueuedoutNodeBase ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
virtual int concurrency ()
 By default assume all subclasses maintain state. More...
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Private Attributes

std::deque< input_pointerm_depos
 

Additional Inherited Members

- Public Types inherited from WireCell::IDrifter
typedef std::shared_ptr< IDrifterpointer
 
- Public Types inherited from WireCell::IQueuedoutNode< IDepo, IDepo >
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
typedef IDepo input_type
 
typedef IDepo output_type
 
typedef std::shared_ptr< const IDepoinput_pointer
 
typedef std::shared_ptr< const IDepooutput_pointer
 
typedef std::deque< output_pointeroutput_queue
 
- Public Types inherited from WireCell::IQueuedoutNodeBase
typedef std::shared_ptr< IQueuedoutNodeBasepointer
 
typedef std::deque< boost::any > queuedany
 
- 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
 

Detailed Description

Definition at line 36 of file tbb_mock.h.

Constructor & Destructor Documentation

virtual WireCellTbb::MockDrifter::~MockDrifter ( )
inlinevirtual

Definition at line 39 of file tbb_mock.h.

39 {}

Member Function Documentation

virtual bool WireCellTbb::MockDrifter::operator() ( const input_pointer in,
output_queue outq 
)
inlinevirtual

The calling signature:

Implements WireCell::IQueuedoutNode< IDepo, IDepo >.

Definition at line 41 of file tbb_mock.h.

41  {
42  m_depos.push_back(in);
43 
44  // simulate some buffering condition
45  size_t n_to_keep = 2;
46  if (!in) { n_to_keep = 0; }
47 
48  while (m_depos.size() > n_to_keep) {
49  auto depo = m_depos.front();
50  m_depos.pop_front();
51  outq.push_back(depo);
52  std::cerr << "Drift: " << depo->time()/WireCell::units::millimeter << std::endl;
53  }
54 
55  return true;
56  }
static const double millimeter
Definition: Units.h:22
std::deque< input_pointer > m_depos
Definition: tbb_mock.h:37
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::deque<input_pointer> WireCellTbb::MockDrifter::m_depos
private

Definition at line 37 of file tbb_mock.h.


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