|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <ConfigurationHelper.hpp>
Public Member Functions | |
| ConfigurationHelper (const confmodel::Session *ses) | |
| 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 applications of given class. | |
| 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. | |
| 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< 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. | |
| 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 SourceIDConf relationship. | |
| bool | is_enabled (const conffwk::DalObject *item) |
| Check the enabled state of the given item. | |
| bool | is_disabled (const conffwk::DalObject *item) |
| Check the enabled state of the given item. | |
Private Attributes | |
| const confmodel::Session * | m_session |
Helper class to extract information from Session object without exposing the Session to user code
Provides methods that loop over all applications in the session to get source IDs etc. avoiding the need for individual application's code to access configuration objects of other applications.
Definition at line 38 of file ConfigurationHelper.hpp.
|
inlineexplicit |
Definition at line 40 of file ConfigurationHelper.hpp.
| std::map< std::string, std::map< std::string, const SourceIDConf * > > ConfigurationHelper::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 SourceIDConf relationship.
Examine all relationships of applications checking for type SourceIDConf generating a map of relationship name to SourceIDConf object pointers
NB: Does not look at multi-value SourceIDConf relationships
| app_class | Class name to select applications by. Empty string implies no selection by class |
Definition at line 169 of file ConfigurationHelper.cpp.
| std::map< std::string, const SourceIDConf * > ConfigurationHelper::get_app_source_ids | ( | std::string | app_class = "" | ) |
Get list of source ids for applications that match given type.
Gather the content of the SmartDaqApplication::source_id relationship for all enabled SmartDaqApplications (or those that match the given class)
| app_class | Class name to select applications by. Empty string implies no selection by class |
Definition at line 154 of file ConfigurationHelper.cpp.
| std::vector< std::string > ConfigurationHelper::get_app_uids | ( | std::string | app_class = "" | ) |
Get list of uids of applications that match given type.
| app_class | Class name to select applications by. Empty string implies no selection by class |
Definition at line 142 of file ConfigurationHelper.cpp.
| std::vector< std::pair< std::string, const appmodel::NetworkConnectionDescriptor * > > ConfigurationHelper::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.
| data_type | Data type to match in network descriptor |
| app_class | Optional dal class name to match |
Definition at line 35 of file ConfigurationHelper.cpp.
| std::vector< const confmodel::Service * > ConfigurationHelper::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 applications of given class.
| app_class | Dal class of applications to match |
| data_type | Data type of network descriptor to match |
Definition at line 59 of file ConfigurationHelper.cpp.
| std::map< std::string, std::vector< uint32_t > > ConfigurationHelper::get_stream_source_ids | ( | ) |
Get the source ids of all DetectorStreams in the Session.
Definition at line 81 of file ConfigurationHelper.cpp.
| std::map< std::string, std::vector< const SourceIDConf * > > ConfigurationHelper::get_tp_source_ids | ( | ) |
Get the source ids of all the TP streams in all ReadoutApplications and TriggerApplications.
Definition at line 122 of file ConfigurationHelper.cpp.
| bool ConfigurationHelper::is_disabled | ( | const conffwk::DalObject * | item | ) |
Check the enabled state of the given item.
| item | The item to be checked. |
Definition at line 197 of file ConfigurationHelper.cpp.
|
inline |
Check the enabled state of the given item.
| item | The item to be checked. |
Definition at line 132 of file ConfigurationHelper.hpp.
|
private |
Definition at line 144 of file ConfigurationHelper.hpp.