50 TLOG_DEBUG(6) <<
"Generating modules for application " << this->
UID();
52 std::vector<const confmodel::DaqModule*> modules;
62 if (det_frame_builder_conf ==
nullptr) {
63 throw(BadConf(
ERS_HERE,
"No DetectorFrameBuilderModule configuration given"));
65 const std::string builder_class = det_frame_builder_conf->get_template_for();
69 if (writer_conf ==
nullptr) {
70 throw(BadConf(
ERS_HERE,
"No DataWriterModule configuration given"));
72 const std::string writer_class = writer_conf->get_template_for();
79 if (queue_rules.size() != 1) {
80 throw(BadConf(
ERS_HERE,
"Strictly 1 queue rule is expected"));
82 crtframebuilder_output_qdesc = queue_rules[0]->get_descriptor();
95 auto d2d_conn_uid = d2d_conn->UID();
98 if (helper->is_excluded(d2d_conn)) {
99 TLOG_DEBUG(7) <<
"Ignoring excluded DetectorToDaqConnection " << d2d_conn_uid;
103 TLOG_DEBUG(6) <<
"Processing DetectorToDaqConnection " << d2d_conn_uid;
105 auto receiver = d2d_conn->receiver();
107 uint16_t sender_idx = 0;
110 for (
auto sender : d2d_conn->senders()) {
113 if (helper->is_excluded(sender)) {
114 TLOG_DEBUG(7) <<
"Ignoring excluded DataSender " << sender->UID();
118 bool has_included_det_stream =
false;
120 for (
auto stream : sender->get_streams()) {
123 if (helper->is_excluded(stream)) {
124 TLOG_DEBUG(7) <<
"Ignoring excluded DetectorStream " << stream->UID();
128 has_included_det_stream =
true;
132 if (!has_included_det_stream) {
136 const auto sender_idx_str = std::to_string(sender_idx);
139 std::string sender_conn_uid(d2d_conn_uid + sender_idx_str);
140 auto sender_conn_obj = obj_fac.
create(
"SocketDetectorToDaqConnection", sender_conn_uid);
141 sender_conn_obj.
set_objs(
"net_senders", { &sender->config_object() });
142 sender_conn_obj.set_obj(
"net_receiver", &receiver->config_object());
144 const auto* sender_conn_conf_obj = &sender_conn->config_object();
149 const auto* queue_conf_obj = &queue->config_object();
162 std::string builder_uid(fmt::format(
"crt-frame-builder-{}-{}", this->
UID(), sender_idx_str));
164 "creating OKS configuration object for detector frame builder class {} with id {}", builder_class, builder_uid);
165 auto builder_obj = obj_fac.
create(builder_class, builder_uid);
168 builder_obj.
set_obj(
"configuration", &det_frame_builder_conf->config_object());
169 builder_obj.set_obj(
"connection", sender_conn_conf_obj);
170 builder_obj.set_objs(
"outputs", { queue_conf_obj });
185 std::string writer_uid(fmt::format(
"socket-writer-{}-{}", this->
UID(), sender_idx_str));
187 "Creating OKS configuration object for socket writer class {} with id {}", writer_class, writer_uid);
188 auto writer_obj = obj_fac.
create(writer_class, writer_uid);
191 writer_obj.
set_obj(
"configuration", &writer_conf->config_object());
192 writer_obj.set_obj(
"connection", sender_conn_conf_obj);
193 writer_obj.set_objs(
"inputs", { queue_conf_obj });