43std::vector<const confmodel::DaqModule*>
48 std::vector<const confmodel::DaqModule*> modules;
58 auto destination_class = rule->get_destination_class();
59 auto data_type = rule->get_descriptor()->get_data_type();
60 if (destination_class ==
"FakeDataProdModule") {
61 if (data_type ==
"DataRequest") {
62 dlhReqInputQDesc = rule->get_descriptor();
64 }
else if (destination_class ==
"FragmentAggregatorModule") {
65 faOutputQDesc = rule->get_descriptor();
68 if (faOutputQDesc ==
nullptr) {
69 throw(BadConf(
ERS_HERE,
"No fragment output queue descriptor given"));
71 if (dlhReqInputQDesc ==
nullptr) {
72 throw(BadConf(
ERS_HERE,
"No DLH request input queue descriptor given"));
78 auto endpoint_class = rule->get_endpoint_class();
79 if (endpoint_class ==
"FragmentAggregatorModule") {
80 faNetDesc = rule->get_descriptor();
81 }
else if (endpoint_class ==
"FakeDataProdModule") {
82 tsNetDesc = rule->get_descriptor();
85 if (faNetDesc ==
nullptr) {
86 throw(BadConf(
ERS_HERE,
"No Fragment output network descriptor given"));
88 if (tsNetDesc ==
nullptr) {
89 throw(BadConf(
ERS_HERE,
"No TimeSync output network descriptor given"));
95 std::vector<const confmodel::Connection*> faOutputQueues;
101 if (fdpConf->disabled(*
session)) {
102 TLOG_DEBUG(7) <<
"Ignoring disabled FakeDataProdConf " << fdpConf->UID();
107 if (stream ==
nullptr) {
108 throw(BadConf(
ERS_HERE,
"ReadoutGroup contains something other than FakeDataProdConf"));
112 std::string uid(
"FakeDataProdModule-" + std::to_string(
id));
113 TLOG_DEBUG(7) <<
"creating OKS configuration object for FakeDataProdModule";
115 dlhObj.
set_obj(
"configuration", &stream->config_object());
118 auto tsNetObj = obj_fac.
create_net_obj(tsNetDesc, std::to_string(
id));
120 dlhObj.
set_objs(
"outputs", { &faQueueObj, &tsNetObj });
126 dlhReqInputQDesc->
get_uid_base() + std::to_string(
id)));
128 dlhObj.
set_objs(
"inputs", { &reqQueueObj });
134 std::string faUid(
"fragmentaggregator-" +
UID());
135 TLOG_DEBUG(7) <<
"creating OKS configuration object for Fragment Aggregator class ";
142 std::vector<const conffwk::ConfigObject*> qObjs;
143 for (
auto q : faOutputQueues) {
144 qObjs.push_back(&q->config_object());
146 faObj.
set_objs(
"inputs", { &faNetObj, &faQueueObj });
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
std::vector< const dunedaq::confmodel::DaqModule * > generate_modules(const confmodel::Session *) 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
const std::vector< const dunedaq::confmodel::ResourceBase * > & get_contains() const
Get "contains" relationship value. A resource set is a container of resources to easily implement gro...
#define TLOG_DEBUG(lvl,...)