46std::vector<const confmodel::Resource*>
56 std::vector<const confmodel::DaqModule*> modules;
66 auto destination_class = rule->get_destination_class();
67 auto data_type = rule->get_descriptor()->get_data_type();
68 if (destination_class ==
"FakeDataProdModule") {
69 if (data_type ==
"DataRequest") {
70 dlhReqInputQDesc = rule->get_descriptor();
72 }
else if (destination_class ==
"FragmentAggregatorModule") {
73 faOutputQDesc = rule->get_descriptor();
76 if (faOutputQDesc ==
nullptr) {
77 throw(BadConf(
ERS_HERE,
"No fragment output queue descriptor given"));
79 if (dlhReqInputQDesc ==
nullptr) {
80 throw(BadConf(
ERS_HERE,
"No DLH request input queue descriptor given"));
86 auto endpoint_class = rule->get_endpoint_class();
87 if (endpoint_class ==
"FragmentAggregatorModule") {
88 faNetDesc = rule->get_descriptor();
89 }
else if (endpoint_class ==
"FakeDataProdModule") {
90 tsNetDesc = rule->get_descriptor();
93 if (faNetDesc ==
nullptr) {
94 throw(BadConf(
ERS_HERE,
"No Fragment output network descriptor given"));
96 if (tsNetDesc ==
nullptr) {
97 throw(BadConf(
ERS_HERE,
"No TimeSync output network descriptor given"));
103 std::vector<const confmodel::Connection*> faOutputQueues;
109 if (fdpConf->is_disabled(*
session)) {
110 TLOG_DEBUG(7) <<
"Ignoring disabled FakeDataProdConf " << fdpConf->UID();
115 if (stream ==
nullptr) {
116 throw(BadConf(
ERS_HERE,
"ReadoutGroup contains something other than FakeDataProdConf"));
120 std::string uid(
"FakeDataProdModule-" + std::to_string(
id));
121 TLOG_DEBUG(7) <<
"creating OKS configuration object for FakeDataProdModule";
123 dlhObj.
set_obj(
"configuration", &stream->config_object());
126 auto tsNetObj = obj_fac.
create_net_obj(tsNetDesc, std::to_string(
id));
128 dlhObj.
set_objs(
"outputs", { &faQueueObj, &tsNetObj });
134 dlhReqInputQDesc->
get_uid_base() + std::to_string(
id)));
136 dlhObj.
set_objs(
"inputs", { &reqQueueObj });
143 if (aggregator_conf == 0) {
144 throw(BadConf(
ERS_HERE,
"No FragmentAggregatorModule configuration given"));
146 std::string faUid(
"fragmentaggregator-" +
UID());
147 TLOG_DEBUG(7) <<
"creating OKS configuration object for Fragment Aggregator class ";
154 std::vector<const conffwk::ConfigObject*> qObjs;
155 for (
auto q : faOutputQueues) {
156 qObjs.push_back(&q->config_object());
158 faObj.
set_obj(
"configuration", &aggregator_conf->config_object());
159 faObj.
set_objs(
"inputs", { &faNetObj, &faQueueObj });
void update_modules(const std::vector< const confmodel::DaqModule * > &modules)
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_queue_obj(const QueueDescriptor *qdesc, std::string uid="") const
conffwk::ConfigObject create(const std::string &class_name, const std::string &id) const
const dunedaq::appmodel::FragmentAggregatorConf * get_fragment_aggregator() const
Get "fragment_aggregator" relationship value.
const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & get_producers() const
Get "producers" relationship value. List of configurations of fake data producer modules to be used b...
void generate_modules(const confmodel::Session *) const override
virtual std::vector< const Resource * > contained_resources() const override
uint32_t get_source_id() const
Get "source_id" attribute value. The SourceID of this link.
const std::string & get_uid_base() const
Get "uid_base" attribute value. Base for UID string. May be combined with a source id.
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.
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 std::string & UID() const noexcept
std::vector< const dunedaq::confmodel::Resource * > to_resources(const std::vector< T * > &vector_of_children)
#define TLOG_DEBUG(lvl,...)