45 std::vector<const confmodel::DaqModule*> modules;
51 auto dlhClass = dlhConf->get_template_for();
56 auto destination_class = rule->get_destination_class();
57 auto data_type = rule->get_descriptor()->get_data_type();
58 if (destination_class ==
"DataHandlerModule" || destination_class == dlhClass) {
59 dlhInputQDesc = rule->get_descriptor();
68 auto endpoint_class = rule->get_endpoint_class();
69 auto data_type = rule->get_descriptor()->get_data_type();
71 if (endpoint_class ==
"DataHandlerModule" || endpoint_class == dlhClass) {
72 if (data_type ==
"TimeSync") {
73 tsNetDesc = rule->get_descriptor();
75 if (data_type ==
"DataRequest") {
76 dlhReqInputNetDesc = rule->get_descriptor();
79 if (data_type ==
"HSIEvent") {
80 hsiNetDesc = rule->get_descriptor();
86 throw(BadConf(
ERS_HERE,
"No FakeHSIEventGeneratorModule configuration given"));
88 if (dlhInputQDesc ==
nullptr) {
89 throw(BadConf(
ERS_HERE,
"No DLH data input queue descriptor given"));
91 if (dlhReqInputNetDesc ==
nullptr) {
92 throw(BadConf(
ERS_HERE,
"No DLH request input network descriptor given"));
94 if (hsiNetDesc ==
nullptr) {
95 throw(BadConf(
ERS_HERE,
"No HSIEvent output network descriptor given"));
99 if (idconf ==
nullptr) {
100 throw(BadConf(
ERS_HERE,
"No SourceIDConf given"));
102 auto id = idconf->get_sid();
105 std::string uid(
"DLH-" + std::to_string(
id));
106 TLOG_DEBUG(7) <<
"creating OKS configuration object for Data Link Handler class " << dlhClass <<
", id " << id;
109 dlhObj.
set_by_val<uint32_t>(
"detector_id", det_id);
110 dlhObj.
set_by_val<
bool>(
"post_processing_enabled",
false);
111 dlhObj.
set_obj(
"module_configuration", &dlhConf->config_object());
115 auto sessionApps =
session->get_enabled_applications();
116 std::vector<conffwk::ConfigObject> fragOutObjs;
117 for (
auto app : sessionApps) {
119 if (dfapp ==
nullptr)
123 for (
auto rule : dfNRules) {
124 auto descriptor = rule->get_descriptor();
125 auto data_type = descriptor->get_data_type();
126 if (data_type ==
"Fragment") {
129 fragOutObjs.push_back(frag_conn);
135 std::vector<const conffwk::ConfigObject*> fh_output_objs;
136 for (
auto& fNet : fragOutObjs) {
137 fh_output_objs.push_back(&fNet);
141 if (dlhConf->get_generate_timesync()) {
143 fh_output_objs.push_back(&tsNetObj);
145 dlhObj.
set_objs(
"outputs", fh_output_objs);
150 dlhObj.
set_objs(
"inputs", { &queueObj, &faNetObj });
157 std::string genuid(
"FakeHSI-" + std::to_string(
id));
159 obj_fac.
create(
"FakeHSIEventGeneratorModule", genuid);
160 fakehsiObj.
set_obj(
"configuration", &rdrConf->config_object());
161 fakehsiObj.
set_objs(
"outputs", { &queueObj, &hsiNetObj });