#include <DataFlowGraph.h>
Definition at line 16 of file DataFlowGraph.h.
DataFlowGraph::DataFlowGraph |
( |
int |
max_threads = 0 | ) |
|
Definition at line 19 of file DataFlowGraph.cxx.
20 :
m_sched(max_threads > 0 ? max_threads : tbb::task_scheduler_init::automatic)
tbb::task_scheduler_init m_sched
DataFlowGraph::~DataFlowGraph |
( |
| ) |
|
|
virtual |
Connect two nodes so that data runs from tail to head. Return false on error.
Implements WireCell::IDataFlowGraph.
Definition at line 45 of file DataFlowGraph.cxx.
52 cerr <<
"DFP: failed to get tail node wrapper for " 59 cerr <<
"DFP: failed to get head node wrapper for " 64 auto sports = mytail->sender_ports();
65 if (sport < 0 || sports.size() <= sport) {
66 cerr <<
"DFP: bad sender port number: " << sport <<
endl;
70 auto rports = myhead->receiver_ports();
71 if (rport < 0 || rports.size() <= rport) {
72 cerr <<
"DFP: bad receiver port number: " << rport <<
endl;
79 cerr <<
"DFP: failed to get sender port " << sport <<
endl;
85 cerr <<
"DFP: failed to get receiver port " << rport <<
endl;
std::string demangle(T const *=nullptr)
Outputs a demangled name for type T.
std::shared_ptr< NodeWrapper > Node
tbb::flow::sender< boost::any > sender_type
QTextStream & endl(QTextStream &s)
tbb::flow::receiver< boost::any > receiver_type
Configuration DataFlowGraph::default_configuration |
( |
| ) |
const |
|
virtual |
Optional, override to return a hard-coded default configuration.
Reimplemented from WireCell::IConfigurable.
Definition at line 30 of file DataFlowGraph.cxx.
33 cfg[
"max_threads"] = 1;
Json::Value Configuration
bool DataFlowGraph::run |
( |
| ) |
|
|
virtual |
Run the graph, return false on error.
Implements WireCell::IDataFlowGraph.
Definition at line 96 of file DataFlowGraph.cxx.
99 cerr <<
"Initialize node of type: " <<
demangle(it.first->signature()) <<
endl;
100 it.second->initialize();
std::string demangle(T const *=nullptr)
Outputs a demangled name for type T.
QTextStream & endl(QTextStream &s)
tbb::flow::graph WireCellTbb::DataFlowGraph::m_graph |
|
private |
tbb::task_scheduler_init WireCellTbb::DataFlowGraph::m_sched |
|
private |
The documentation for this class was generated from the following files: