37std::vector<const confmodel::DaqModule*>
42 std::vector<const confmodel::DaqModule*> modules;
45 auto dlhClass = dlhConf->get_template_for();
50 auto destination_class = rule->get_destination_class();
51 auto data_type = rule->get_descriptor()->get_data_type();
52 if (destination_class ==
"DataHandlerModule" || destination_class == dlhClass) {
53 dlhInputQDesc = rule->get_descriptor();
62 auto endpoint_class = rule->get_endpoint_class();
63 auto data_type = rule->get_descriptor()->get_data_type();
65 if (endpoint_class ==
"DataHandlerModule" || endpoint_class == dlhClass) {
66 if (data_type ==
"TimeSync") {
67 tsNetDesc = rule->get_descriptor();
69 if (data_type ==
"DataRequest") {
70 dlhReqInputNetDesc = rule->get_descriptor();
73 if (data_type ==
"HSIEvent") {
74 hsiNetDesc = rule->get_descriptor();
80 throw(BadConf(
ERS_HERE,
"No HSIEventGeneratorModule configuration given"));
82 if (dlhInputQDesc ==
nullptr) {
83 throw(BadConf(
ERS_HERE,
"No DLH data input queue descriptor given"));
85 if (dlhReqInputNetDesc ==
nullptr) {
86 throw(BadConf(
ERS_HERE,
"No DLH request input network descriptor given"));
88 if (hsiNetDesc ==
nullptr) {
89 throw(BadConf(
ERS_HERE,
"No HSIEvent output network descriptor given"));
93 if (idconf ==
nullptr) {
94 throw(BadConf(
ERS_HERE,
"No SourceIDConf given"));
96 auto id = idconf->get_sid();
99 std::string uid(
"DLH-" + std::to_string(
id));
100 TLOG_DEBUG(7) <<
"creating OKS configuration object for Data Link Handler class " << dlhClass <<
", id " << id;
103 dlhObj.
set_by_val<uint32_t>(
"detector_id", det_id);
104 dlhObj.
set_by_val<
bool>(
"post_processing_enabled",
false);
105 dlhObj.
set_obj(
"module_configuration", &dlhConf->config_object());
108 if (dlhConf->get_generate_timesync()) {
110 auto tsNetObj = obj_fac.
create_net_obj(tsNetDesc, std::to_string(
id));
112 dlhObj.
set_objs(
"outputs", { &tsNetObj });
118 dlhObj.
set_objs(
"inputs", { &queueObj, &faNetObj });
125 std::string genuid(
"HSI-" + std::to_string(
id));
127 hsiObj.
set_obj(
"configuration", &rdrConf->config_object());
128 hsiObj.
set_objs(
"outputs", { &queueObj, &hsiNetObj });
conffwk::ConfigObject create_queue_sid_obj(const QueueDescriptor *qdesc, uint32_t src_id) const
conffwk::ConfigObject create_net_obj(const NetworkConnectionDescriptor *ndesc, std::string uid) const
Helper function that gets a network connection config.
const T * get_dal(std::string uid) const
conffwk::ConfigObject create(const std::string &class_name, const std::string &id) const
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) const override
const dunedaq::appmodel::DataHandlerConf * get_link_handler() const
Get "link_handler" relationship value.
const dunedaq::appmodel::HSIReadoutConf * get_generator() const
Get "generator" relationship value.
const dunedaq::confmodel::Service * get_associated_service() const
Get "associated_service" relationship value. Service provided by this connection.
const std::vector< const dunedaq::appmodel::NetworkConnectionRule * > & get_network_rules() const
Get "network_rules" relationship value.
const std::vector< const dunedaq::appmodel::QueueConnectionRule * > & get_queue_rules() const
Get "queue_rules" relationship value.
const dunedaq::appmodel::SourceIDConf * get_source_id() const
Get "source_id" relationship value.
void set_by_val(const std::string &name, T value)
Set attribute value.
void set_objs(const std::string &name, const std::vector< const ConfigObject * > &o, bool skip_non_null_check=false)
Set relationship multi-value.
void set_obj(const std::string &name, const ConfigObject *o, bool skip_non_null_check=false)
Set relationship single-value.
const ConfigObject & config_object() const
const std::string & UID() const noexcept
#define TLOG_DEBUG(lvl,...)