31createSourceModel(
const std::string& conn_uid,
bool callback_mode)
35 if (datatypes.size() != 1) {
37 "Multiple output data types specified! Expected only a single type!"));
39 std::string raw_dt{ *datatypes.begin() };
40 TLOG() <<
"Choosing specializations for SourceModel for output connection "
41 <<
" [uid:" << conn_uid <<
" , data_type:" << raw_dt <<
']';
43 if (raw_dt.find(
"WIBEthFrame") != std::string::npos) {
45 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DUNEWIBEthTypeAdapter>>();
48 source_model->set_sink_name(conn_uid);
51 source_model->set_sink(conn_uid, callback_mode);
56 }
else if (raw_dt.find(
"TDEEthFrame") != std::string::npos) {
59 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::TDEEthTypeAdapter>>();
62 source_model->disable_daq_protocol_checks();
65 source_model->set_sink_name(conn_uid);
68 source_model->set_sink(conn_uid, callback_mode);
72 }
else if (raw_dt.find(
"DAPHNEEthFrame") != std::string::npos) {
74 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DAPHNEEthTypeAdapter>>();
77 source_model->set_sink_name(conn_uid);
80 source_model->set_sink(conn_uid, callback_mode);