27 "dfp": "TbbDataFlowGraph", 38 m_dfp = Factory::lookup<IDataFlowGraph>(
type,
name);
40 m_dfpgraph.configure(cfg[
"graph"]);
44 void TbbFlow::execute()
47 std::cerr <<
"TbbFlow: not configured\n";
51 std::cerr <<
"TbbFlow::Execute\n";
53 for (
auto thc : m_dfpgraph.connections()) {
54 auto tail_tn = get<0>(thc);
55 auto head_tn = get<1>(thc);
56 auto conn = get<2>(thc);
58 std::cerr <<
"TbbFlow: Connect: " 59 << tail_tn.type <<
":" << tail_tn.name
60 <<
" ( " << conn.tail <<
" -> " << conn.head <<
" ) " 61 << head_tn.type <<
":" << head_tn.name <<
"\n";
63 INode::pointer tail_node = WireCell::Factory::lookup<INode>(tail_tn.type, tail_tn.name);
64 INode::pointer head_node = WireCell::Factory::lookup<INode>(head_tn.type, head_tn.name);
66 m_dfp->connect(tail_node, head_node, conn.tail, conn.head);
std::pair< std::string, std::string > parse_pair(const std::string &in, const std::string &delim=":")
std::shared_ptr< Interface > pointer
Json::Value loads(const std::string &text, const externalvars_t &extvar=externalvars_t(), const externalvars_t &extcode=externalvars_t())
WIRECELL_FACTORY(TbbFlow, WireCellTbb::TbbFlow, WireCell::IApplication, WireCell::IConfigurable)
std::string type(const T &t)
Json::Value Configuration