41 std::vector<const confmodel::DaqModule*> modules;
46 auto dlhClass = dlhConf->get_template_for();
51 if (dlhConf->get_generate_timesync()) {
52 throw(BadConf(
ERS_HERE,
"TimeSync generation is enabled for a FakeHSIApplication and this is not allowed"));
58 auto destination_class = rule->get_destination_class();
59 auto data_type = rule->get_descriptor()->get_data_type();
60 if (destination_class ==
"DataHandlerModule" || destination_class == dlhClass) {
61 dlhInputQDesc = rule->get_descriptor();
70 auto endpoint_class = rule->get_endpoint_class();
71 auto data_type = rule->get_descriptor()->get_data_type();
73 if (endpoint_class ==
"DataHandlerModule" || endpoint_class == dlhClass) {
74 if (data_type ==
"TimeSync") {
75 tsNetDesc = rule->get_descriptor();
77 if (data_type ==
"DataRequest") {
78 dlhReqInputNetDesc = rule->get_descriptor();
81 if (data_type ==
"HSIEvent") {
82 hsiNetDesc = rule->get_descriptor();
88 throw(BadConf(
ERS_HERE,
"No FakeHSIEventGeneratorModule configuration given"));
90 if (dlhInputQDesc ==
nullptr) {
91 throw(BadConf(
ERS_HERE,
"No DLH data input queue descriptor given"));
93 if (dlhReqInputNetDesc ==
nullptr) {
94 throw(BadConf(
ERS_HERE,
"No DLH request input network descriptor given"));
96 if (hsiNetDesc ==
nullptr) {
97 throw(BadConf(
ERS_HERE,
"No HSIEvent output network descriptor given"));
101 if (idconf ==
nullptr) {
102 throw(BadConf(
ERS_HERE,
"No SourceIDConf given"));
104 auto id = idconf->get_sid();
108 std::string uid(
"DLH-" + std::to_string(
id));
109 TLOG_DEBUG(7) <<
"creating OKS configuration object for Data Link Handler class " << dlhClass <<
", id " << id;
112 dlhObj.
set_by_val<uint32_t>(
"detector_id", det_id);
113 dlhObj.
set_by_val<
bool>(
"post_processing_enabled",
false);
114 dlhObj.
set_obj(
"module_configuration", &dlhConf->config_object());
118 std::vector<conffwk::ConfigObject> fragOutObjs;
119 for (
auto [uid,
descriptor] : helper->get_netdescriptors(
"Fragment",
"DFApplication")) {
124 std::vector<const conffwk::ConfigObject*> fh_output_objs;
125 for (
auto& fNet : fragOutObjs) {
126 fh_output_objs.push_back(&fNet);
130 if (dlhConf->get_generate_timesync()) {
132 fh_output_objs.push_back(&tsNetObj);
134 dlhObj.
set_objs(
"outputs", fh_output_objs);
139 dlhObj.
set_objs(
"inputs", { &queueObj, &faNetObj });
146 std::string genuid(
"FakeHSI-" + std::to_string(
id));
148 fakehsiObj.
set_obj(
"configuration", &rdrConf->config_object());
149 fakehsiObj.
set_objs(
"outputs", { &queueObj, &hsiNetObj });
150 if (tsNetDesc !=
nullptr) {
152 fakehsiObj.
set_objs(
"inputs", { &tsNetObjIn });