34std::vector<std::pair<std::string, const appmodel::NetworkConnectionDescriptor*>>
37 std::vector<std::pair<std::string, const appmodel::NetworkConnectionDescriptor*>> result;
39 if (app_class.empty() || app->castable(app_class)) {
41 if (smart_app ==
nullptr) {
45 for (
auto rule : smart_app->get_network_rules()) {
46 auto desc = rule->get_descriptor();
47 if (desc->get_data_type() == data_type) {
48 result.emplace_back(std::pair{ app->UID(), desc });
56std::vector<const confmodel::Service*>
59 std::vector<const confmodel::Service*> result;
61 if (app->castable(app_class)) {
63 if (smart_app ==
nullptr) {
64 throw(NotSmart(
ERS_HERE, app->full_name()));
66 for (
auto rule : smart_app->get_network_rules()) {
67 if (rule->get_descriptor()->get_data_type() == data_type) {
68 result.push_back(rule->get_descriptor()->get_associated_service());
76std::map<std::string, std::vector<uint32_t>>
79 std::map<std::string, std::vector<uint32_t>> result;
82 if (ro_app !=
nullptr) {
83 std::vector<uint32_t> streams;
84 for (
auto res : ro_app->contained_excludable_entities()) {
88 throw(BadD2d(
ERS_HERE, app->full_name(), res->full_name()));
90 for (
auto stream : d2d->streams()) {
92 streams.push_back(stream->get_source_id());
97 result.insert(std::pair{ app->UID(), streams });
100 if (fake_app !=
nullptr) {
101 std::vector<uint32_t> streams;
102 for (
auto res : fake_app->contained_excludable_entities()) {
105 if (fdpc !=
nullptr && !fdpc->is_excluded(*
m_session)) {
106 streams.push_back(fdpc->get_source_id());
110 result.insert(std::pair(app->UID(), streams));
117std::map<std::string, std::vector<const SourceIDConf*>>
120 std::map<std::string, std::vector<const SourceIDConf*>> result;
123 if (ro_app !=
nullptr) {
124 if (ro_app->get_tp_generation_enabled()) {
125 result.insert(std::pair(app->UID(), ro_app->get_tp_source_ids()));
127 result.insert({ app->UID(), std::vector<const SourceIDConf*>() });
131 if (replay_app !=
nullptr) {
132 result.insert(std::pair(app->UID(), replay_app->get_tp_source_ids()));
138std::vector<std::string>
141 std::vector<std::string> result;
143 if (app_class.empty() || app->castable(app_class)) {
144 result.push_back(app->UID());
150std::map<std::string, const SourceIDConf*>
153 std::map<std::string, const SourceIDConf*> result;
155 if (app_class.empty() || app->castable(app_class)) {
157 if (smart_app !=
nullptr && smart_app->get_source_id() !=
nullptr) {
158 result.insert({ app->UID(), smart_app->get_source_id() });
165std::map<std::string, std::map<std::string, const SourceIDConf*>>
168 std::map<std::string, std::map<std::string, const SourceIDConf*>> result;
170 if (app_class.empty() || app->castable(app_class)) {
171 auto class_info = app->configuration().get_class_info(app->class_name());
172 auto obj = app->config_object();
173 for (
auto rel : class_info.p_relationships) {
174 if (rel.p_type ==
"SourceIDConf") {
178 obj.get(rel.p_name, rel_obj);
180 if (!result.contains(app->UID())) {
181 result.insert({ app->UID(), {} });
183 const auto srcid = app->configuration().get<
SourceIDConf>(rel_obj);
184 result.at(app->UID()).insert({ rel.p_name, srcid });
199 if (res ==
nullptr) {
bool is_excluded(const conffwk::DalObject *item)
Check the include/exclude state of the given item.
std::vector< std::string > get_app_uids(std::string app_class="")
Get list of uids of applications that match given type.
std::map< std::string, const SourceIDConf * > get_app_source_ids(std::string app_class="")
Get list of source ids for applications that match given type.
const confmodel::Session * m_session
std::map< std::string, std::map< std::string, const SourceIDConf * > > get_all_app_source_ids(std::string app_class="")
Get list of all source ids for applications that match given type. Follows any single value SourceIDC...
std::map< std::string, std::vector< uint32_t > > get_stream_source_ids()
Get the source ids of all DetectorStreams in the Session.
std::map< std::string, std::vector< const SourceIDConf * > > get_tp_source_ids()
Get the source ids of all the TP streams in all ReadoutApplications and TriggerApplications.
std::vector< const confmodel::Service * > get_services(std::string app_class, std::string data_type)
Get the exposed Services of all network connections with given data_type from all smart daq applicati...
std::vector< std::pair< std::string, const appmodel::NetworkConnectionDescriptor * > > get_netdescriptors(const std::string &data_type, const std::string &app_class="")
Get all NetworkConnectionDescriptors with given data_type from all applications of given type.
Represents database objects.
bool is_null() const noexcept
Check if object's implementation points to null.
The base class for any generated DAL object.
const TARGET * cast() const noexcept
Casts object to different class.
bool is_excluded(const dunedaq::confmodel::ExcludableEntityTree &session) const
std::vector< const dunedaq::confmodel::Application * > included_applications() const