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

#include <tbb_mock.h>

Inheritance diagram for WireCellTbb::MockDepoSource:
WireCell::IDepoSource WireCell::ISourceNode< IDepo > WireCell::ISourceNodeBase WireCell::INode WireCell::IComponent< INode > WireCell::Interface

Public Member Functions

 MockDepoSource (int maxdepos=10000)
 
virtual ~MockDepoSource ()
 
virtual bool operator() (output_pointer &out)
 The calling signature: More...
 
- Public Member Functions inherited from WireCell::IDepoSource
virtual ~IDepoSource ()
 
virtual std::string signature ()
 Set the signature for all subclasses. More...
 
- Public Member Functions inherited from WireCell::ISourceNode< IDepo >
virtual ~ISourceNode ()
 
virtual NodeCategory category ()
 Return the behavior category type. More...
 
virtual bool operator() (boost::any &anyout)
 
virtual std::vector< std::stringoutput_types ()
 
- Public Member Functions inherited from WireCell::ISourceNodeBase
virtual ~ISourceNodeBase ()
 
- Public Member Functions inherited from WireCell::INode
virtual ~INode ()
 
virtual int concurrency ()
 
virtual std::vector< std::stringinput_types ()
 
virtual void reset ()
 
- Public Member Functions inherited from WireCell::IComponent< INode >
virtual ~IComponent ()
 
- Public Member Functions inherited from WireCell::Interface
virtual ~Interface ()
 

Private Attributes

int m_count
 
const int m_maxdepos
 

Additional Inherited Members

- Public Types inherited from WireCell::IDepoSource
typedef std::shared_ptr< IDepoSourcepointer
 
- Public Types inherited from WireCell::ISourceNode< IDepo >
typedef IDepo output_type
 
typedef ISourceNode< IDeposignature_type
 
typedef std::shared_ptr< signature_typepointer
 
typedef std::shared_ptr< const IDepooutput_pointer
 
- Public Types inherited from WireCell::ISourceNodeBase
typedef std::shared_ptr< ISourceNodeBasepointer
 
- 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 15 of file tbb_mock.h.

Constructor & Destructor Documentation

WireCellTbb::MockDepoSource::MockDepoSource ( int  maxdepos = 10000)
inline

Definition at line 19 of file tbb_mock.h.

19 : m_count(0), m_maxdepos(maxdepos) {}
virtual WireCellTbb::MockDepoSource::~MockDepoSource ( )
inlinevirtual

Definition at line 20 of file tbb_mock.h.

20 {}

Member Function Documentation

virtual bool WireCellTbb::MockDepoSource::operator() ( output_pointer out)
inlinevirtual

The calling signature:

Implements WireCell::ISourceNode< IDepo >.

Definition at line 22 of file tbb_mock.h.

22  {
23  if (m_count > m_maxdepos) {
24  return false;
25  }
26  ++m_count;
29  WireCell::Point pos(dist,dist,dist);
31  std::cerr << "Source: " << out->time()/WireCell::units::millimeter << std::endl;
32  return true;
33  }
std::shared_ptr< const IDepo > pointer
Definition: IData.h:19
static const double microsecond
Definition: Units.h:94
static const double millimeter
Definition: Units.h:22
QTextStream & endl(QTextStream &s)

Member Data Documentation

int WireCellTbb::MockDepoSource::m_count
private

Definition at line 16 of file tbb_mock.h.

const int WireCellTbb::MockDepoSource::m_maxdepos
private

Definition at line 17 of file tbb_mock.h.


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