44 std::vector<const confmodel::DaqModule*> modules;
47 auto dlhClass = dlhConf->get_template_for();
52 auto destination_class = rule->get_destination_class();
53 auto data_type = rule->get_descriptor()->get_data_type();
54 if (destination_class ==
"DataHandlerModule" || destination_class == dlhClass) {
55 dlhInputQDesc = rule->get_descriptor();
64 auto endpoint_class = rule->get_endpoint_class();
65 auto data_type = rule->get_descriptor()->get_data_type();
67 if (endpoint_class ==
"DataHandlerModule" || endpoint_class == dlhClass) {
68 if (data_type ==
"TimeSync") {
69 tsNetDesc = rule->get_descriptor();
71 if (data_type ==
"DataRequest") {
72 dlhReqInputNetDesc = rule->get_descriptor();
75 if (data_type ==
"HSIEvent") {
76 hsiNetDesc = rule->get_descriptor();
82 throw(BadConf(
ERS_HERE,
"No HSIEventGeneratorModule configuration given"));
84 if (dlhInputQDesc ==
nullptr) {
85 throw(BadConf(
ERS_HERE,
"No DLH data input queue descriptor given"));
87 if (dlhReqInputNetDesc ==
nullptr) {
88 throw(BadConf(
ERS_HERE,
"No DLH request input network descriptor given"));
90 if (hsiNetDesc ==
nullptr) {
91 throw(BadConf(
ERS_HERE,
"No HSIEvent output network descriptor given"));
95 if (idconf ==
nullptr) {
96 throw(BadConf(
ERS_HERE,
"No SourceIDConf given"));
98 auto id = idconf->get_sid();
101 std::string uid(
"DLH-" + std::to_string(
id));
102 TLOG_DEBUG(7) <<
"creating OKS configuration object for Data Link Handler class " << dlhClass <<
", id " << id;
105 dlhObj.
set_by_val<uint32_t>(
"detector_id", det_id);
106 dlhObj.
set_by_val<
bool>(
"post_processing_enabled",
false);
107 dlhObj.
set_obj(
"module_configuration", &dlhConf->config_object());
110 if (dlhConf->get_generate_timesync()) {
112 auto tsNetObj = obj_fac.
create_net_obj(tsNetDesc, std::to_string(
id));
114 dlhObj.
set_objs(
"outputs", { &tsNetObj });
120 dlhObj.
set_objs(
"inputs", { &queueObj, &faNetObj });
127 std::string genuid(
"HSI-" + std::to_string(
id));
129 hsiObj.
set_obj(
"configuration", &rdrConf->config_object());
130 hsiObj.
set_objs(
"outputs", { &queueObj, &hsiNetObj });