32createSourceModel(
const std::string& conn_uid,
bool callback_mode)
36 if (datatypes.size() != 1) {
38 "Multiple output data types specified! Expected only a single type!"));
40 std::string raw_dt{ *datatypes.begin() };
41 TLOG() <<
"Choosing specializations for SourceModel for output connection "
42 <<
" [uid:" << conn_uid <<
" , data_type:" << raw_dt <<
']';
44 if (raw_dt.find(
"WIBEthFrame") != std::string::npos) {
46 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DUNEWIBEthTypeAdapter>>();
49 source_model->set_sink_name(conn_uid);
52 source_model->set_sink(conn_uid, callback_mode);
57 }
else if (raw_dt.find(
"TDEEthFrame") != std::string::npos) {
60 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::TDEEthTypeAdapter>>();
63 source_model->disable_daq_protocol_checks();
66 source_model->set_sink_name(conn_uid);
69 source_model->set_sink(conn_uid, callback_mode);
73 }
else if (raw_dt.find(
"DAPHNEEthFrame") != std::string::npos) {
75 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DAPHNEEthTypeAdapter>>();
78 source_model->set_sink_name(conn_uid);
81 source_model->set_sink(conn_uid, callback_mode);
84 }
else if (raw_dt.find(
"DAPHNEEthStreamFrame") != std::string::npos) {
86 auto source_model = std::make_shared<SourceModel<fdreadoutlibs::types::DAPHNEEthStreamTypeAdapter>>();
89 source_model->set_sink_name(conn_uid);
92 source_model->set_sink(conn_uid, callback_mode);