DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::appmodel::ReadoutApplication Class Reference

#include <ReadoutApplication.hpp>

Inheritance diagram for dunedaq::appmodel::ReadoutApplication:
[legend]
Collaboration diagram for dunedaq::appmodel::ReadoutApplication:
[legend]

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the ReadoutApplication object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_application_name () const
 Get "application_name" attribute value.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value.
 
bool get_tp_generation_enabled () const
 Get "tp_generation_enabled" attribute value.
 
void set_tp_generation_enabled (bool value)
 Set "tp_generation_enabled" attribute value.
 
bool get_ta_generation_enabled () const
 Get "ta_generation_enabled" attribute value.
 
void set_ta_generation_enabled (bool value)
 Set "ta_generation_enabled" attribute value.
 
const std::vector< const dunedaq::appmodel::SourceIDConf * > & get_tp_source_ids () const
 Get "tp_source_ids" relationship value.
 
void set_tp_source_ids (const std::vector< const dunedaq::appmodel::SourceIDConf * > &value)
 Set "tp_source_ids" relationship value.
 
const dunedaq::appmodel::RoHwConfigget_uses () const
 Get "uses" relationship value. Configuration of the host hardware resources used by this application.
 
void set_uses (const dunedaq::appmodel::RoHwConfig *value)
 Set "uses" relationship value. Configuration of the host hardware resources used by this application.
 
const dunedaq::appmodel::DataHandlerConfget_link_handler () const
 Get "link_handler" relationship value.
 
void set_link_handler (const dunedaq::appmodel::DataHandlerConf *value)
 Set "link_handler" relationship value.
 
const dunedaq::appmodel::DataHandlerConfget_tp_handler () const
 Get "tp_handler" relationship value.
 
void set_tp_handler (const dunedaq::appmodel::DataHandlerConf *value)
 Set "tp_handler" relationship value.
 
const dunedaq::appmodel::DataReaderConfget_data_reader () const
 Get "data_reader" relationship value.
 
void set_data_reader (const dunedaq::appmodel::DataReaderConf *value)
 Set "data_reader" relationship value.
 
const dunedaq::appmodel::DataRecorderConfget_data_recorder () const
 Get "data_recorder" relationship value.
 
void set_data_recorder (const dunedaq::appmodel::DataRecorderConf *value)
 Set "data_recorder" relationship value.
 
const dunedaq::appmodel::FragmentAggregatorConfget_fragment_aggregator () const
 Get "fragment_aggregator" relationship value.
 
void set_fragment_aggregator (const dunedaq::appmodel::FragmentAggregatorConf *value)
 Set "fragment_aggregator" relationship value.
 
const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & get_detector_connections () const
 Get "detector_connections" relationship value. The list of detector channels to be read out by this readout application.
 
void set_detector_connections (const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > &value)
 Set "detector_connections" relationship value. The list of detector channels to be read out by this readout application.
 
void generate_modules (const confmodel::Session *) const override
 
virtual std::vector< const Resource * > contained_resources () const override
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the ReadoutApplication object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_application_name () const
 Get "application_name" attribute value.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value.
 
bool get_tp_generation_enabled () const
 Get "tp_generation_enabled" attribute value.
 
void set_tp_generation_enabled (bool value)
 Set "tp_generation_enabled" attribute value.
 
bool get_ta_generation_enabled () const
 Get "ta_generation_enabled" attribute value.
 
void set_ta_generation_enabled (bool value)
 Set "ta_generation_enabled" attribute value.
 
const std::vector< const dunedaq::appmodel::SourceIDConf * > & get_tp_source_ids () const
 Get "tp_source_ids" relationship value.
 
void set_tp_source_ids (const std::vector< const dunedaq::appmodel::SourceIDConf * > &value)
 Set "tp_source_ids" relationship value.
 
const dunedaq::appmodel::RoHwConfigget_uses () const
 Get "uses" relationship value. Configuration of the host hardware resources used by this application.
 
void set_uses (const dunedaq::appmodel::RoHwConfig *value)
 Set "uses" relationship value. Configuration of the host hardware resources used by this application.
 
const dunedaq::appmodel::DataHandlerConfget_link_handler () const
 Get "link_handler" relationship value.
 
void set_link_handler (const dunedaq::appmodel::DataHandlerConf *value)
 Set "link_handler" relationship value.
 
const dunedaq::appmodel::DataHandlerConfget_tp_handler () const
 Get "tp_handler" relationship value.
 
void set_tp_handler (const dunedaq::appmodel::DataHandlerConf *value)
 Set "tp_handler" relationship value.
 
const dunedaq::appmodel::DataReaderConfget_data_reader () const
 Get "data_reader" relationship value.
 
void set_data_reader (const dunedaq::appmodel::DataReaderConf *value)
 Set "data_reader" relationship value.
 
const dunedaq::appmodel::DataRecorderConfget_data_recorder () const
 Get "data_recorder" relationship value.
 
void set_data_recorder (const dunedaq::appmodel::DataRecorderConf *value)
 Set "data_recorder" relationship value.
 
const dunedaq::appmodel::FragmentAggregatorConfget_fragment_aggregator () const
 Get "fragment_aggregator" relationship value.
 
void set_fragment_aggregator (const dunedaq::appmodel::FragmentAggregatorConf *value)
 Set "fragment_aggregator" relationship value.
 
const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & get_detector_connections () const
 Get "detector_connections" relationship value. The list of detector channels to be read out by this readout application.
 
void set_detector_connections (const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > &value)
 Set "detector_connections" relationship value. The list of detector channels to be read out by this readout application.
 
void generate_modules (const confmodel::Session *) const override
 
virtual std::vector< const Resource * > contained_resources () const override
 
- Public Member Functions inherited from dunedaq::appmodel::SmartDaqApplication
const dunedaq::appmodel::SourceIDConfget_source_id () const
 Get "source_id" relationship value.
 
void set_source_id (const dunedaq::appmodel::SourceIDConf *value)
 Set "source_id" relationship value.
 
const std::vector< const dunedaq::appmodel::QueueConnectionRule * > & get_queue_rules () const
 Get "queue_rules" relationship value.
 
void set_queue_rules (const std::vector< const dunedaq::appmodel::QueueConnectionRule * > &value)
 Set "queue_rules" relationship value.
 
const std::vector< const dunedaq::appmodel::NetworkConnectionRule * > & get_network_rules () const
 Get "network_rules" relationship value.
 
void set_network_rules (const std::vector< const dunedaq::appmodel::NetworkConnectionRule * > &value)
 Set "network_rules" relationship value.
 
const dunedaq::appmodel::SourceIDConfget_source_id () const
 Get "source_id" relationship value.
 
void set_source_id (const dunedaq::appmodel::SourceIDConf *value)
 Set "source_id" relationship value.
 
const std::vector< const dunedaq::appmodel::QueueConnectionRule * > & get_queue_rules () const
 Get "queue_rules" relationship value.
 
void set_queue_rules (const std::vector< const dunedaq::appmodel::QueueConnectionRule * > &value)
 Set "queue_rules" relationship value.
 
const std::vector< const dunedaq::appmodel::NetworkConnectionRule * > & get_network_rules () const
 Get "network_rules" relationship value.
 
void set_network_rules (const std::vector< const dunedaq::appmodel::NetworkConnectionRule * > &value)
 Set "network_rules" relationship value.
 
- Public Member Functions inherited from dunedaq::confmodel::DaqApplication
const std::string & get_application_name () const
 Get "application_name" attribute value. Name of the application binary to run.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value. Name of the application binary to run.
 
const std::vector< const dunedaq::confmodel::DaqModule * > & get_modules () const
 Get "modules" relationship value.
 
void set_modules (const std::vector< const dunedaq::confmodel::DaqModule * > &value)
 Set "modules" relationship value.
 
const std::vector< const dunedaq::confmodel::ActionPlan * > & get_action_plans () const
 Get "action_plans" relationship value.
 
void set_action_plans (const std::vector< const dunedaq::confmodel::ActionPlan * > &value)
 Set "action_plans" relationship value.
 
std::set< const dunedaq::confmodel::HostComponent * > get_used_hostresources () const
 
const std::vector< std::string > construct_commandline_parameters (const conffwk::Configuration &confdb, const dunedaq::confmodel::Session *session) const
 
const std::string & get_application_name () const
 Get "application_name" attribute value. Name of the application binary to run.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value. Name of the application binary to run.
 
const std::vector< const dunedaq::confmodel::DaqModule * > & get_modules () const
 Get "modules" relationship value.
 
void set_modules (const std::vector< const dunedaq::confmodel::DaqModule * > &value)
 Set "modules" relationship value.
 
const std::vector< const dunedaq::confmodel::ActionPlan * > & get_action_plans () const
 Get "action_plans" relationship value.
 
void set_action_plans (const std::vector< const dunedaq::confmodel::ActionPlan * > &value)
 Set "action_plans" relationship value.
 
std::set< const dunedaq::confmodel::HostComponent * > get_used_hostresources () const
 
const std::vector< std::string > construct_commandline_parameters (const conffwk::Configuration &confdb, const dunedaq::confmodel::Session *session) const
 
- Public Member Functions inherited from dunedaq::confmodel::Application
const std::string & get_application_name () const
 Get "application_name" attribute value. Name of the application binary to run.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value. Name of the application binary to run.
 
const std::vector< std::string > & get_commandline_parameters () const
 Get "commandline_parameters" attribute value. command line parameters to add when starting the application.
 
void set_commandline_parameters (const std::vector< std::string > &value)
 Set "commandline_parameters" attribute value. command line parameters to add when starting the application.
 
const std::string & get_log_path () const
 Get "log_path" attribute value. Where the applications, controllers and infrastructure applications stdout/err go. This take precedence over the Session's log_path. If none of them is set, PWD is used.
 
void set_log_path (const std::string &value)
 Set "log_path" attribute value. Where the applications, controllers and infrastructure applications stdout/err go. This take precedence over the Session's log_path. If none of them is set, PWD is used.
 
const std::vector< const dunedaq::confmodel::VariableBase * > & get_application_environment () const
 Get "application_environment" relationship value. Define process environment for this application.
 
void set_application_environment (const std::vector< const dunedaq::confmodel::VariableBase * > &value)
 Set "application_environment" relationship value. Define process environment for this application.
 
const dunedaq::confmodel::VirtualHostget_runs_on () const
 Get "runs_on" relationship value. VirtualHost to run this application on.
 
void set_runs_on (const dunedaq::confmodel::VirtualHost *value)
 Set "runs_on" relationship value. VirtualHost to run this application on.
 
const std::vector< const dunedaq::confmodel::Service * > & get_exposes_service () const
 Get "exposes_service" relationship value. Services exposed i.e. provided by this application.
 
void set_exposes_service (const std::vector< const dunedaq::confmodel::Service * > &value)
 Set "exposes_service" relationship value. Services exposed i.e. provided by this application.
 
const dunedaq::confmodel::OpMonConfget_opmon_conf () const
 Get "opmon_conf" relationship value. description of the monitoring behaviour in the application.
 
void set_opmon_conf (const dunedaq::confmodel::OpMonConf *value)
 Set "opmon_conf" relationship value. description of the monitoring behaviour in the application.
 
const std::vector< std::string > parse_commandline_parameters () const
 
const std::string & get_application_name () const
 Get "application_name" attribute value. Name of the application binary to run.
 
void set_application_name (const std::string &value)
 Set "application_name" attribute value. Name of the application binary to run.
 
const std::vector< std::string > & get_commandline_parameters () const
 Get "commandline_parameters" attribute value. command line parameters to add when starting the application.
 
void set_commandline_parameters (const std::vector< std::string > &value)
 Set "commandline_parameters" attribute value. command line parameters to add when starting the application.
 
const std::string & get_log_path () const
 Get "log_path" attribute value. Where the applications, controllers and infrastructure applications stdout/err go. This take precedence over the Session's log_path. If none of them is set, PWD is used.
 
void set_log_path (const std::string &value)
 Set "log_path" attribute value. Where the applications, controllers and infrastructure applications stdout/err go. This take precedence over the Session's log_path. If none of them is set, PWD is used.
 
const std::vector< const dunedaq::confmodel::VariableBase * > & get_application_environment () const
 Get "application_environment" relationship value. Define process environment for this application.
 
void set_application_environment (const std::vector< const dunedaq::confmodel::VariableBase * > &value)
 Set "application_environment" relationship value. Define process environment for this application.
 
const dunedaq::confmodel::VirtualHostget_runs_on () const
 Get "runs_on" relationship value. VirtualHost to run this application on.
 
void set_runs_on (const dunedaq::confmodel::VirtualHost *value)
 Set "runs_on" relationship value. VirtualHost to run this application on.
 
const std::vector< const dunedaq::confmodel::Service * > & get_exposes_service () const
 Get "exposes_service" relationship value. Services exposed i.e. provided by this application.
 
void set_exposes_service (const std::vector< const dunedaq::confmodel::Service * > &value)
 Set "exposes_service" relationship value. Services exposed i.e. provided by this application.
 
const dunedaq::confmodel::OpMonConfget_opmon_conf () const
 Get "opmon_conf" relationship value. description of the monitoring behaviour in the application.
 
void set_opmon_conf (const dunedaq::confmodel::OpMonConf *value)
 Set "opmon_conf" relationship value. description of the monitoring behaviour in the application.
 
const std::vector< std::string > parse_commandline_parameters () const
 
- Public Member Functions inherited from dunedaq::conffwk::DalObject
const std::string & UID () const noexcept
 
const std::string & class_name () const noexcept
 
bool castable (const std::string &target) const noexcept
 
bool castable (const std::string *target) const noexcept
 
template<class TARGET >
const TARGET * cast () const noexcept
 Casts object to different class.
 
std::string full_name () const noexcept
 
const ConfigObjectconfig_object () const
 
DalRegistryregistry () const noexcept
 
Configurationconfiguration () const noexcept
 
void unread ()
 
void set (const ConfigObject &o) noexcept
 
void move (const std::string &at)
 
void rename (const std::string &new_id)
 
void p_hdr (std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
 print object headers
 
std::ostream & print_object (std::ostream &s) const
 print object details
 
void throw_init_ex (dunedaq::conffwk::Exception &ex)
 throw object initialisation exception (i.e.
 
- Public Member Functions inherited from dunedaq::confmodel::ResourceSetDisableAND
bool compute_disabled_state (const std::set< std::string > &disabled) const final
 
bool compute_disabled_state (const std::set< std::string > &disabled) const final
 
- Public Member Functions inherited from dunedaq::confmodel::ResourceSet
- Public Member Functions inherited from dunedaq::confmodel::Resource
void parents (const dunedaq::confmodel::Session &session, std::list< std::vector< const dunedaq::confmodel::Resource * > > &parents) const
 
bool is_disabled (const dunedaq::confmodel::ResourceTree &session) const
 
void parents (const dunedaq::confmodel::Session &session, std::list< std::vector< const dunedaq::confmodel::Resource * > > &parents) const
 
bool is_disabled (const dunedaq::confmodel::ResourceTree &session) const
 

Static Public Member Functions

static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_tp_generation_enabled_str () noexcept
 
static const std::string & __get_ta_generation_enabled_str () noexcept
 
static const std::string & __get_tp_source_ids_str () noexcept
 
static const std::string & __get_uses_str () noexcept
 
static const std::string & __get_link_handler_str () noexcept
 
static const std::string & __get_tp_handler_str () noexcept
 
static const std::string & __get_data_reader_str () noexcept
 
static const std::string & __get_data_recorder_str () noexcept
 
static const std::string & __get_fragment_aggregator_str () noexcept
 
static const std::string & __get_detector_connections_str () noexcept
 
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_tp_generation_enabled_str () noexcept
 
static const std::string & __get_ta_generation_enabled_str () noexcept
 
static const std::string & __get_tp_source_ids_str () noexcept
 
static const std::string & __get_uses_str () noexcept
 
static const std::string & __get_link_handler_str () noexcept
 
static const std::string & __get_tp_handler_str () noexcept
 
static const std::string & __get_data_reader_str () noexcept
 
static const std::string & __get_data_recorder_str () noexcept
 
static const std::string & __get_fragment_aggregator_str () noexcept
 
static const std::string & __get_detector_connections_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::appmodel::SmartDaqApplication
static const std::string & __get_source_id_str () noexcept
 
static const std::string & __get_queue_rules_str () noexcept
 
static const std::string & __get_network_rules_str () noexcept
 
static const std::string & __get_source_id_str () noexcept
 
static const std::string & __get_queue_rules_str () noexcept
 
static const std::string & __get_network_rules_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::confmodel::DaqApplication
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_modules_str () noexcept
 
static const std::string & __get_action_plans_str () noexcept
 
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_modules_str () noexcept
 
static const std::string & __get_action_plans_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::confmodel::Application
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_commandline_parameters_str () noexcept
 
static const std::string & __get_log_path_str () noexcept
 
static const std::string & __get_application_environment_str () noexcept
 
static const std::string & __get_runs_on_str () noexcept
 
static const std::string & __get_exposes_service_str () noexcept
 
static const std::string & __get_opmon_conf_str () noexcept
 
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_commandline_parameters_str () noexcept
 
static const std::string & __get_log_path_str () noexcept
 
static const std::string & __get_application_environment_str () noexcept
 
static const std::string & __get_runs_on_str () noexcept
 
static const std::string & __get_exposes_service_str () noexcept
 
static const std::string & __get_opmon_conf_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::conffwk::DalObject
static void p_null (std::ostream &s)
 print "(null)"
 
static void p_rm (std::ostream &s)
 print "(deleted object)"
 
static void p_error (std::ostream &s, dunedaq::conffwk::Exception &ex)
 print error text
 
static void throw_get_ex (const std::string &what, const std::string &class_name, const DalObject *obj)
 throw exception in generated get method (i.e.
 
static bool is_null (const DalObject *ref) noexcept
 check a pointer on DAL object is null
 

Static Public Attributes

static const std::string & s_class_name
 
static const std::string s_application_name = "application_name"
 
static const std::string s_tp_generation_enabled = "tp_generation_enabled"
 
static const std::string s_ta_generation_enabled = "ta_generation_enabled"
 
static const std::string s_tp_source_ids = "tp_source_ids"
 
static const std::string s_uses = "uses"
 
static const std::string s_link_handler = "link_handler"
 
static const std::string s_tp_handler = "tp_handler"
 
static const std::string s_data_reader = "data_reader"
 
static const std::string s_data_recorder = "data_recorder"
 
static const std::string s_fragment_aggregator = "fragment_aggregator"
 
static const std::string s_detector_connections = "detector_connections"
 
- Static Public Attributes inherited from dunedaq::appmodel::SmartDaqApplication
static const std::string & s_class_name
 
static const std::string s_source_id = "source_id"
 
static const std::string s_queue_rules = "queue_rules"
 
static const std::string s_network_rules = "network_rules"
 
- Static Public Attributes inherited from dunedaq::confmodel::DaqApplication
static const std::string & s_class_name
 
static const std::string s_application_name = "application_name"
 
static const std::string s_modules = "modules"
 
static const std::string s_action_plans = "action_plans"
 
- Static Public Attributes inherited from dunedaq::confmodel::Application
static const std::string & s_class_name
 
static const std::string s_application_name = "application_name"
 
static const std::string s_commandline_parameters = "commandline_parameters"
 
static const std::string s_log_path = "log_path"
 
static const std::string s_application_environment = "application_environment"
 
static const std::string s_runs_on = "runs_on"
 
static const std::string s_exposes_service = "exposes_service"
 
static const std::string s_opmon_conf = "opmon_conf"
 
- Static Public Attributes inherited from dunedaq::confmodel::ResourceSetDisableAND
static const std::string & s_class_name
 
- Static Public Attributes inherited from dunedaq::confmodel::ResourceSet
static const std::string & s_class_name
 
- Static Public Attributes inherited from dunedaq::confmodel::Resource
static const std::string & s_class_name
 

Protected Member Functions

 ReadoutApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ReadoutApplication () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 ReadoutApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ReadoutApplication () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::appmodel::SmartDaqApplication
 SmartDaqApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~SmartDaqApplication () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 SmartDaqApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~SmartDaqApplication () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::confmodel::DaqApplication
 DaqApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DaqApplication () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 DaqApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DaqApplication () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::confmodel::Application
 Application (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~Application () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 Application (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~Application () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::conffwk::DalObject
 DalObject (DalRegistry &db, const ConfigObject &o) noexcept
 
virtual ~DalObject ()
 
void clear () noexcept
 
void check () const
 
bool is_deleted () const
 
void increment_created () noexcept
 
void increment_read () noexcept
 
void check_init () const
 Check and initialize object if necessary.
 
template<typename T >
void _set_object (const std::string &name, const T *value)
 Helper method for generated set single-value relationship methods.
 
template<typename T >
void _set_objects (const std::string &name, const std::vector< const T * > &value)
 Helper method for generated set multi-value relationship methods.
 
bool get_rel_objects (const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
 Read relationship values as DAL objects using DAL factory.
 
bool get_algo_objects (const std::string &name, std::vector< const DalObject * > &objs) const
 Run algorithm and return result as DAL objects using DAL factory.
 
- Protected Member Functions inherited from dunedaq::confmodel::ResourceSetDisableAND
 ResourceSetDisableAND (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ResourceSetDisableAND () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 ResourceSetDisableAND (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ResourceSetDisableAND () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::confmodel::ResourceSet
 ResourceSet (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ResourceSet () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 ResourceSet (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ResourceSet () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::confmodel::Resource
 Resource (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~Resource () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 Resource (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~Resource () noexcept
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 

Private Attributes

std::string m_application_name
 
bool m_tp_generation_enabled
 
bool m_ta_generation_enabled
 
std::vector< const dunedaq::appmodel::SourceIDConf * > m_tp_source_ids
 
const dunedaq::appmodel::RoHwConfigm_uses
 
const dunedaq::appmodel::DataHandlerConfm_link_handler
 
const dunedaq::appmodel::DataHandlerConfm_tp_handler
 
const dunedaq::appmodel::DataReaderConfm_data_reader
 
const dunedaq::appmodel::DataRecorderConfm_data_recorder
 
const dunedaq::appmodel::FragmentAggregatorConfm_fragment_aggregator
 
std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > m_detector_connections
 

Friends

class conffwk::Configuration
 
class conffwk::DalObject
 
class conffwk::DalFactory
 
class conffwk::DalRegistry
 

Additional Inherited Members

- Protected Attributes inherited from dunedaq::conffwk::DalObject
std::mutex m_mutex
 Used to protect changes of DAL object.
 
bool p_was_read
 is true, if the object was read
 
DalRegistryp_registry
 Configuration object.
 
ConfigObject p_obj
 Config object used by given template object.
 
std::string p_UID
 Is used for template objects (see dqm_conffwk)
 

Detailed Description

Definition at line 42 of file ReadoutApplication.hpp.

Constructor & Destructor Documentation

◆ ReadoutApplication() [1/2]

dunedaq::appmodel::ReadoutApplication::ReadoutApplication ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

Definition at line 37 of file ReadoutApplication.cpp.

37 :
41 m_uses (nullptr),
42 m_link_handler (nullptr),
43 m_tp_handler (nullptr),
44 m_data_reader (nullptr),
45 m_data_recorder (nullptr),
46 m_fragment_aggregator (nullptr)
47
48 {
49 ;
50 }
const dunedaq::appmodel::RoHwConfig * m_uses
const dunedaq::appmodel::DataHandlerConf * m_tp_handler
const dunedaq::appmodel::DataReaderConf * m_data_reader
const dunedaq::appmodel::FragmentAggregatorConf * m_fragment_aggregator
const dunedaq::appmodel::DataRecorderConf * m_data_recorder
const dunedaq::appmodel::DataHandlerConf * m_link_handler
SmartDaqApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~ReadoutApplication() [1/2]

dunedaq::appmodel::ReadoutApplication::~ReadoutApplication ( )
protectedvirtualnoexcept

Definition at line 119 of file ReadoutApplication.cpp.

120 {
121 }

◆ ReadoutApplication() [2/2]

dunedaq::appmodel::ReadoutApplication::ReadoutApplication ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

◆ ~ReadoutApplication() [2/2]

virtual dunedaq::appmodel::ReadoutApplication::~ReadoutApplication ( )
protectedvirtualnoexcept

Member Function Documentation

◆ __get_application_name_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_application_name_str ( )
inlinestaticnoexcept

Definition at line 114 of file ReadoutApplication.hpp.

114{ return s_application_name; }

◆ __get_application_name_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_application_name_str ( )
inlinestaticnoexcept

Definition at line 114 of file ReadoutApplication.hpp.

114{ return s_application_name; }

◆ __get_data_reader_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_data_reader_str ( )
inlinestaticnoexcept

Definition at line 227 of file ReadoutApplication.hpp.

227{ return s_data_reader; }

◆ __get_data_reader_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_data_reader_str ( )
inlinestaticnoexcept

Definition at line 227 of file ReadoutApplication.hpp.

227{ return s_data_reader; }

◆ __get_data_recorder_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_data_recorder_str ( )
inlinestaticnoexcept

Definition at line 228 of file ReadoutApplication.hpp.

228{ return s_data_recorder; }

◆ __get_data_recorder_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_data_recorder_str ( )
inlinestaticnoexcept

Definition at line 228 of file ReadoutApplication.hpp.

228{ return s_data_recorder; }

◆ __get_detector_connections_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_detector_connections_str ( )
inlinestaticnoexcept

Definition at line 230 of file ReadoutApplication.hpp.

230{ return s_detector_connections; }
static const std::string s_detector_connections

◆ __get_detector_connections_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_detector_connections_str ( )
inlinestaticnoexcept

Definition at line 230 of file ReadoutApplication.hpp.

230{ return s_detector_connections; }

◆ __get_fragment_aggregator_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_fragment_aggregator_str ( )
inlinestaticnoexcept

Definition at line 229 of file ReadoutApplication.hpp.

229{ return s_fragment_aggregator; }

◆ __get_fragment_aggregator_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_fragment_aggregator_str ( )
inlinestaticnoexcept

Definition at line 229 of file ReadoutApplication.hpp.

229{ return s_fragment_aggregator; }

◆ __get_link_handler_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_link_handler_str ( )
inlinestaticnoexcept

Definition at line 225 of file ReadoutApplication.hpp.

225{ return s_link_handler; }

◆ __get_link_handler_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_link_handler_str ( )
inlinestaticnoexcept

Definition at line 225 of file ReadoutApplication.hpp.

225{ return s_link_handler; }

◆ __get_ta_generation_enabled_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_ta_generation_enabled_str ( )
inlinestaticnoexcept

Definition at line 116 of file ReadoutApplication.hpp.

116{ return s_ta_generation_enabled; }
static const std::string s_ta_generation_enabled

◆ __get_ta_generation_enabled_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_ta_generation_enabled_str ( )
inlinestaticnoexcept

Definition at line 116 of file ReadoutApplication.hpp.

116{ return s_ta_generation_enabled; }

◆ __get_tp_generation_enabled_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_generation_enabled_str ( )
inlinestaticnoexcept

Definition at line 115 of file ReadoutApplication.hpp.

115{ return s_tp_generation_enabled; }
static const std::string s_tp_generation_enabled

◆ __get_tp_generation_enabled_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_generation_enabled_str ( )
inlinestaticnoexcept

Definition at line 115 of file ReadoutApplication.hpp.

115{ return s_tp_generation_enabled; }

◆ __get_tp_handler_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_handler_str ( )
inlinestaticnoexcept

Definition at line 226 of file ReadoutApplication.hpp.

226{ return s_tp_handler; }

◆ __get_tp_handler_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_handler_str ( )
inlinestaticnoexcept

Definition at line 226 of file ReadoutApplication.hpp.

226{ return s_tp_handler; }

◆ __get_tp_source_ids_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_source_ids_str ( )
inlinestaticnoexcept

Definition at line 223 of file ReadoutApplication.hpp.

223{ return s_tp_source_ids; }

◆ __get_tp_source_ids_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_tp_source_ids_str ( )
inlinestaticnoexcept

Definition at line 223 of file ReadoutApplication.hpp.

223{ return s_tp_source_ids; }

◆ __get_uses_str() [1/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_uses_str ( )
inlinestaticnoexcept

Definition at line 224 of file ReadoutApplication.hpp.

224{ return s_uses; }

◆ __get_uses_str() [2/2]

static const std::string & dunedaq::appmodel::ReadoutApplication::__get_uses_str ( )
inlinestaticnoexcept

Definition at line 224 of file ReadoutApplication.hpp.

224{ return s_uses; }

◆ contained_resources() [1/2]

std::vector< const confmodel::Resource * > dunedaq::appmodel::ReadoutApplication::contained_resources ( ) const
overridevirtual

Virtual method to obtain the list of all contained Resources. Used internally by the core disabled logic. Not intended to be used in application code as that should be using individual relationships of the derived classes.

Implements dunedaq::confmodel::ResourceSet.

Definition at line 73 of file ReadoutApplication.cpp.

73 {
75}
const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & get_detector_connections() const
Get "detector_connections" relationship value. The list of detector channels to be read out by this r...
std::vector< const dunedaq::confmodel::Resource * > to_resources(const std::vector< T * > &vector_of_children)

◆ contained_resources() [2/2]

virtual std::vector< const Resource * > dunedaq::appmodel::ReadoutApplication::contained_resources ( ) const
overridevirtual

Virtual method to obtain the list of all contained Resources. Used internally by the core disabled logic. Not intended to be used in application code as that should be using individual relationships of the derived classes.

Implements dunedaq::confmodel::ResourceSet.

◆ generate_modules() [1/2]

void dunedaq::appmodel::ReadoutApplication::generate_modules ( const confmodel::Session * session) const
overridevirtual

Generate daq module dal objects for streams of thie ReadoutApplication on the fly

Implements dunedaq::appmodel::SmartDaqApplication.

Definition at line 78 of file ReadoutApplication.cpp.

79{
80
81 TLOG_DEBUG(6) << "Generating modules for application " << this->UID();
82
83 ConfigObjectFactory obj_fac(this);
84 // conffwk::Configuration& confdb = this->configuration();
85
86 //
87 // Extract basic configuration objects
88 //
89
90 // Data reader
91 auto reader_conf = get_data_reader();
92 if (reader_conf == 0) {
93 throw(BadConf(ERS_HERE, "No DataReaderModule configuration given"));
94 }
95 std::string reader_class = reader_conf->get_template_for();
96
97 // Link handler
98 auto dlh_conf = get_link_handler();
99 // What is template for?
100 auto dlh_class = dlh_conf->get_template_for();
101
102 auto tph_conf = get_tp_handler();
103 if (tph_conf==nullptr && get_tp_generation_enabled()) {
104 throw(BadConf(ERS_HERE, "TP generation is enabled but there is no TP data handler configuration"));
105 }
106
107 std::string tph_class = "";
108 if (tph_conf != nullptr && get_tp_generation_enabled()) {
109 tph_class = tph_conf->get_template_for();
110 }
111
112 //
113 // Process the queue rules looking for inputs to our DL/TP handler modules
114 //
115 const QueueDescriptor* dlh_input_qdesc = nullptr;
116 const QueueDescriptor* dlh_reqinput_qdesc = nullptr;
117 const QueueDescriptor* tp_input_qdesc = nullptr;
118 // const QueueDescriptor* tpReqInputQDesc = nullptr;
119 const QueueDescriptor* fa_output_qdesc = nullptr;
120
121 for (auto rule : get_queue_rules()) {
122 auto destination_class = rule->get_destination_class();
123 auto data_type = rule->get_descriptor()->get_data_type();
124 // Why datahander here? It is the base class for several DataHandler types (e.g. FDDataHandlerModule, SNBDataHandlerModule)
125 if (destination_class == "DataHandlerModule" || destination_class == dlh_class || destination_class == tph_class) {
126 if (data_type == "DataRequest") {
127 dlh_reqinput_qdesc = rule->get_descriptor();
128 } else if ((data_type == "TriggerPrimitive" || data_type == "TriggerPrimitiveVector") && get_tp_generation_enabled()) {
129 tp_input_qdesc = rule->get_descriptor();
130 } else {
131 dlh_input_qdesc = rule->get_descriptor();
132 }
133 } else if (destination_class == "FragmentAggregatorModule") {
134 fa_output_qdesc = rule->get_descriptor();
135 }
136 }
137
138 if (dlh_input_qdesc == nullptr) {
139 throw(BadConf(ERS_HERE, "No data link handler input queue descriptor given"));
140 }
141 if (dlh_reqinput_qdesc == nullptr) {
142 throw(BadConf(ERS_HERE, "No data link handler request input queue descriptor given"));
143 }
144
145 //
146 // Process the network rules looking for the Fragment Aggregator and TP handler data reuest inputs
147 //
148 const NetworkConnectionDescriptor* fa_net_desc = nullptr;
149 const NetworkConnectionDescriptor* tp_net_desc = nullptr;
150 const NetworkConnectionDescriptor* ta_net_desc = nullptr;
151 const NetworkConnectionDescriptor* ts_net_desc = nullptr;
152 for (auto rule : get_network_rules()) {
153 auto endpoint_class = rule->get_endpoint_class();
154 auto data_type = rule->get_descriptor()->get_data_type();
155
156 if (endpoint_class == "FragmentAggregatorModule") {
157 fa_net_desc = rule->get_descriptor();
158 } else if (data_type == "TPSet") {
159 tp_net_desc = rule->get_descriptor();
160 } else if (data_type == "TriggerActivity") {
161 ta_net_desc = rule->get_descriptor();
162 } else if (data_type == "TimeSync") {
163 ts_net_desc = rule->get_descriptor();
164 }
165 }
166
167 if (fa_net_desc == nullptr) {
168 throw(BadConf(ERS_HERE, "No Fragment Aggregator network descriptor given"));
169 }
170 if (ts_net_desc == nullptr && dlh_conf->get_generate_timesync()) {
171 throw(BadConf(ERS_HERE, "No Time Sync network descriptor given but time sync generation is enabled"));
172 }
173
174 // Create here the Queue on which all data fragments are forwarded to the fragment aggregator
175 // and a container for the queues of data request to TP handler and DLH
176 if (fa_output_qdesc == nullptr) {
177 throw(BadConf(ERS_HERE, "No fragment output queue descriptor given"));
178 }
179 std::vector<const confmodel::Connection*> req_queues;
180 conffwk::ConfigObject frag_queue_obj = obj_fac.create_queue_obj(fa_output_qdesc);
181
182 //
183 // Scan Detector 2 DAQ connections to extract sender, receiver and stream information
184 //
185
186 std::vector<const confmodel::DaqModule*> modules;
187
188 // Loop over the detector to daq connections and generate one data reader per connection
189 // and the cooresponding datalink handlers
190
191 // Collect all streams
192 std::vector<const confmodel::DetectorStream*> all_enabled_det_streams;
193 std::map<uint32_t, const confmodel::Connection*> data_queues_by_sid;
194
195 // std::vector<const conffwk::ConfigObject*> d2d_conn_objs;
196 uint16_t conn_idx = 0;
197
198 for (auto d2d_conn : get_detector_connections()) {
199 if (d2d_conn->is_disabled(*session)) {
200 TLOG_DEBUG(7) << "Ignoring disabled DetectorToDaqConnection " << d2d_conn->UID();
201 continue;
202 }
203
204 TLOG_DEBUG(6) << "Processing DetectorToDaqConnection " << d2d_conn->UID();
205
206 // Are these tests necessary? Schema does not allow 0 cardinality
207 // for these relationships!! TODO
208 if (d2d_conn->senders().empty()) {
209 throw(BadConf(ERS_HERE, "DetectorToDaqConnection does not contain senders"));
210 }
211 if (d2d_conn->receiver() == nullptr) {
212 throw(BadConf(ERS_HERE, "DetectorToDaqConnection does not contain a receiver"));
213 }
214
215 // Find senders and receiver
216 auto det_senders = d2d_conn->senders();
217 auto det_receiver = d2d_conn->receiver();
218
219 std::vector<const confmodel::DetectorStream*> enabled_det_streams;
220 // Loop over streams
221 for (auto stream : d2d_conn->streams()) {
222
223 // Are we sure?
224 if (stream->is_disabled(*session)) {
225 TLOG_DEBUG(7) << "Ignoring disabled DetectorStream " << stream->UID();
226 continue;
227 }
228
229 all_enabled_det_streams.push_back(stream);
230 enabled_det_streams.push_back(stream);
231 }
232
233
234 // Here I want to resolve the type of connection (network, felix, or?)
235 // Rules of engagement: if the receiver interface is network or felix, the receivers should be castable to the counterpart
236 if (reader_class == "DPDKReaderModule" || reader_class == "SocketReaderModule") {
237 if (!d2d_conn->castable("NetworkDetectorToDaqConnection")) {
238 throw(BadConf(ERS_HERE, fmt::format("{} requires NetworkDetectorToDaqConnection, found {} of class {}", reader_class, d2d_conn->UID(), d2d_conn->class_name())));
239 }
240 if ((reader_class == "DPDKReaderModule" && !det_receiver->cast<appmodel::DPDKReceiver>()) ||
241 (reader_class == "SocketReaderModule" && !det_receiver->cast<appmodel::SocketReceiver>())) {
242 throw(BadConf(ERS_HERE, fmt::format("{} requires NWDetDataReceiver, found {} of class {}", reader_class, det_receiver->UID(), det_receiver->class_name())));
243 }
244 }
245 else if (reader_class == "FelixReaderModule") {
246 if (!d2d_conn->castable("FelixDetectorToDaqConnection")) {
247 throw(BadConf(ERS_HERE, fmt::format("{} requires FelixDetectorToDaqConnection, found {} of class {}", reader_class, d2d_conn->UID(), d2d_conn->class_name())));
248 }
249 if (!det_receiver->cast<appmodel::FelixDataReceiver>()) {
250 throw(BadConf(ERS_HERE, fmt::format("FelixReaderModule requires FelixDataReceiver, found {} of class {}", det_receiver->UID(), det_receiver->class_name())));
251 }
252 }
253 // }
254
255 //-----------------------------------------------------------------
256 //
257 // Create DataReaderModule object
258 //
259
260 //
261 // Instantiate DataReaderModule of type DPDKReaderModule
262 //
263
264 // Create the Data reader object
265
266 std::string reader_uid(fmt::format("datareader-{}-{}", this->UID(), std::to_string(conn_idx++)));
267 TLOG_DEBUG(6) << fmt::format("creating OKS configuration object for Data reader class {} with id {}", reader_class, reader_uid);
268 auto reader_obj = obj_fac.create(reader_class, reader_uid);
269
270 // Populate configuration and interfaces (leave output queues for later)
271 reader_obj.set_obj("configuration", &reader_conf->config_object());
272 reader_obj.set_objs("connections", {&d2d_conn->config_object()});
273
274 // Create the raw data queues
275 std::vector<const conffwk::ConfigObject*> data_queue_objs;
276 // keep a map for convenience
277
278 // Create data queues
279 for (auto ds : enabled_det_streams) {
280 conffwk::ConfigObject queue_obj = obj_fac.create_queue_sid_obj(dlh_input_qdesc, ds);
281 const auto* data_queue = obj_fac.get_dal<confmodel::Connection>(queue_obj.UID());
282 data_queue_objs.push_back(&data_queue->config_object());
283 data_queues_by_sid[ds->get_source_id()] = data_queue;
284 }
285
286 reader_obj.set_objs("outputs", data_queue_objs);
287
288 modules.push_back(obj_fac.get_dal<confmodel::DaqModule>(reader_obj.UID()));
289 }
290
291
292 //-----------------------------------------------------------------
293 //
294 // Prepare the tp handlers and related queues
295 //
296 std::vector<const confmodel::Connection*> tp_queues;
298 if (tp_input_qdesc == nullptr) {
299 throw(BadConf(ERS_HERE, "TP generation is enabled but no TP input queue descriptor given"));
300 }
301 if (tp_net_desc == nullptr) {
302 throw(BadConf(ERS_HERE, "TP generation is enabled but no TPSet network descriptor given"));
303 }
304 if (ta_net_desc == nullptr) {
305 throw(BadConf(ERS_HERE, "TP generation is enabled but no TriggerActivity network descriptor given"));
306 }
307 // Create TP handler object
308 auto tph_conf_obj = tph_conf->config_object();
309 auto tpsrc_ids = get_tp_source_ids();
310
311 for (auto sid : tpsrc_ids) {
312 conffwk::ConfigObject tp_queue_obj;
313 conffwk::ConfigObject tpreq_queue_obj;
314 std::string tp_uid("tphandler-" + std::to_string(sid->get_sid()));
315 auto tph_obj = obj_fac.create(tph_class, tp_uid);
316 tph_obj.set_by_val<uint32_t>("source_id", sid->get_sid());
317 tph_obj.set_by_val<uint32_t>("detector_id", 1); // 1 == kDAQ
318 tph_obj.set_by_val<bool>("post_processing_enabled", get_ta_generation_enabled());
319 tph_obj.set_obj("module_configuration", &tph_conf_obj);
320
321 // Create the TPs aggregator queue (from RawData Handlers to TP handlers)
322 tp_queue_obj = obj_fac.create_queue_sid_obj(tp_input_qdesc, sid->get_sid());
323 tp_queue_obj.set_by_val<uint32_t>("recv_timeout_ms", 50);
324 tp_queue_obj.set_by_val<uint32_t>("send_timeout_ms", 1);
325
326 tp_queues.push_back(obj_fac.get_dal<confmodel::Connection>(tp_queue_obj.UID()));
327 // Create tp data requests queue from Fragment Aggregator
328 tpreq_queue_obj = obj_fac.create_queue_sid_obj(dlh_reqinput_qdesc, sid->get_sid());
329 req_queues.push_back(obj_fac.get_dal<confmodel::Connection>(tpreq_queue_obj.UID()));
330
331 // Create the tp(set) publishing service
332 conffwk::ConfigObject tp_net_obj = obj_fac.create_net_obj(tp_net_desc, tp_uid);
333
334 // Create the ta(set) publishing service
335 conffwk::ConfigObject ta_net_obj = obj_fac.create_net_obj(ta_net_desc, tp_uid);
336
337 // Register queues with tp hankder
338 tph_obj.set_objs("inputs", { &tp_queue_obj, &tpreq_queue_obj });
339 tph_obj.set_objs("outputs", { &tp_net_obj, &ta_net_obj, &frag_queue_obj });
340
341 modules.push_back(obj_fac.get_dal<confmodel::DaqModule>(tph_obj.UID()));
342 }
343 }
344
345 // Add output queueus of tps
346 std::vector<const conffwk::ConfigObject*> tp_queue_objs;
347 for (auto q : tp_queues) {
348 tp_queue_objs.push_back(&q->config_object());
349 }
350
351 //-----------------------------------------------------------------
352 //
353 // Create datalink handlers
354 //
355 // Recover the emulation flag
356 auto emulation_mode = reader_conf->get_emulation_mode();
357 for (auto ds : all_enabled_det_streams) {
358
359 uint32_t sid = ds->get_source_id();
360 TLOG_DEBUG(6) << fmt::format("Processing stream {}, id {}, det id {}", ds->UID(), ds->get_source_id(), ds->get_geo_id()->get_detector_id());
361 std::string uid(fmt::format("DLH-{}", sid));
362 TLOG_DEBUG(6) << fmt::format("creating OKS configuration object for Data Link Handler class {}, if {}", dlh_class, sid);
363 auto dlh_obj = obj_fac.create(dlh_class, uid);
364 dlh_obj.set_by_val<uint32_t>("source_id", sid);
365 dlh_obj.set_by_val<uint32_t>("detector_id", ds->get_geo_id()->get_detector_id());
366 dlh_obj.set_by_val<bool>("post_processing_enabled", get_tp_generation_enabled());
367 dlh_obj.set_by_val<bool>("emulation_mode", emulation_mode);
368 dlh_obj.set_obj("geo_id", &ds->get_geo_id()->config_object());
369 dlh_obj.set_obj("module_configuration", &dlh_conf->config_object());
370
371 std::vector<const conffwk::ConfigObject*> dlh_ins, dlh_outs;
372
373 // Add datalink-handler queue to the inputs
374 dlh_ins.push_back(&data_queues_by_sid.at(sid)->config_object());
375
376 // Create request queue
377 conffwk::ConfigObject req_queue_obj = obj_fac.create_queue_sid_obj(dlh_reqinput_qdesc, ds);
378
379
380 // Add the requessts queue dal pointer to the outputs of the FragmentAggregatorModule
381 req_queues.push_back(obj_fac.get_dal<confmodel::Connection>(req_queue_obj.UID()));
382 dlh_ins.push_back(&req_queue_obj);
383 dlh_outs.push_back(&frag_queue_obj);
384
385
386 // Time Sync network connection
387 if (dlh_conf->get_generate_timesync()) {
388 // Add timestamp endpoint
389 conffwk::ConfigObject ts_net_obj = obj_fac.create_net_obj(ts_net_desc, std::to_string(sid));
390 dlh_outs.push_back(&ts_net_obj);
391 }
392
393 for (auto tpq : tp_queue_objs) {
394 dlh_outs.push_back(tpq);
395 }
396 dlh_obj.set_objs("inputs", dlh_ins);
397 dlh_obj.set_objs("outputs", dlh_outs);
398
399 modules.push_back(obj_fac.get_dal<confmodel::DaqModule>(dlh_obj.UID()));
400 }
401
402 // Finally create Fragment Aggregator
403 auto aggregator_conf = get_fragment_aggregator();
404 if (aggregator_conf == 0) {
405 throw(BadConf(ERS_HERE, "No FragmentAggregatorModule configuration given"));
406 }
407 std::string faUid("fragmentaggregator-" + UID());
408 // conffwk::ConfigObject frag_aggr;
409 TLOG_DEBUG(7) << "creating OKS configuration object for Fragment Aggregator class ";
410 auto frag_aggr = obj_fac.create("FragmentAggregatorModule", faUid);
411 conffwk::ConfigObject fa_net_obj = obj_fac.create_net_obj(fa_net_desc);
412
413 // Process special Network rules!
414 // Looking for Fragment rules from DFAppplications in current Session
415 auto sessionApps = session->enabled_applications();
416 std::vector<conffwk::ConfigObject> fragOutObjs;
417 for (auto app : sessionApps) {
418 auto dfapp = app->cast<appmodel::DFApplication>();
419 if (dfapp == nullptr)
420 continue;
421
422 auto dfNRules = dfapp->get_network_rules();
423 for (auto rule : dfNRules) {
424 auto descriptor = rule->get_descriptor();
425 auto data_type = descriptor->get_data_type();
426 if (data_type == "Fragment") {
427 std::string dreqNetUid(descriptor->get_uid_base() + dfapp->UID());
428 // conffwk::ConfigObject frag_conn;
429 // confdb.create(dbfile, "NetworkConnection", dreqNetUid, frag_conn);
430 auto frag_conn = obj_fac.create("NetworkConnection", dreqNetUid);
431
432 frag_conn.set_by_val<std::string>("data_type", descriptor->get_data_type());
433
434 // Override capacity, set to 2x expected number of Fragments
435 frag_conn.set_by_val<int>("capacity", all_enabled_det_streams.size() * 2);
436 frag_conn.set_by_val<std::string>("connection_type", descriptor->get_connection_type());
437
438 auto serviceObj = descriptor->get_associated_service()->config_object();
439 frag_conn.set_obj("associated_service", &serviceObj);
440 fragOutObjs.push_back(frag_conn);
441 } // If network rule has TriggerDecision type of data
442 } // Loop over Apps network rules
443 } // loop over Session specific Apps
444
445 // Add output queueus of data requests and Fragments
446 std::vector<const conffwk::ConfigObject*> fa_output_objs;
447 for (auto& fNet : fragOutObjs) {
448 fa_output_objs.push_back(&fNet);
449 }
450
451 for (auto& q : req_queues) {
452 fa_output_objs.push_back(&q->config_object());
453 }
454
455 frag_aggr.set_obj("configuration", &aggregator_conf->config_object());
456 frag_aggr.set_objs("inputs", { &fa_net_obj, &frag_queue_obj });
457 frag_aggr.set_objs("outputs", fa_output_objs);
458 modules.push_back(obj_fac.get_dal<confmodel::DaqModule>(frag_aggr.UID()));
459
460 obj_fac.update_modules(modules);
461}
#define ERS_HERE
const dunedaq::appmodel::DataHandlerConf * get_tp_handler() const
Get "tp_handler" relationship value.
bool get_ta_generation_enabled() const
Get "ta_generation_enabled" attribute value.
const dunedaq::appmodel::FragmentAggregatorConf * get_fragment_aggregator() const
Get "fragment_aggregator" relationship value.
const std::vector< const dunedaq::appmodel::SourceIDConf * > & get_tp_source_ids() const
Get "tp_source_ids" relationship value.
const dunedaq::appmodel::DataHandlerConf * get_link_handler() const
Get "link_handler" relationship value.
const dunedaq::appmodel::DataReaderConf * get_data_reader() const
Get "data_reader" relationship value.
bool get_tp_generation_enabled() const
Get "tp_generation_enabled" attribute value.
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 std::string & UID() const noexcept
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ generate_modules() [2/2]

void dunedaq::appmodel::ReadoutApplication::generate_modules ( const confmodel::Session * ) const
overridevirtual

Generate daq module dal objects for streams of thie ReadoutApplication on the fly

Implements dunedaq::appmodel::SmartDaqApplication.

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::ReadoutApplication::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

Definition at line 123 of file ReadoutApplication.cpp.

124 {
125 std::vector<const dunedaq::conffwk::DalObject *> vec;
126
127 if (!get(name, vec, upcast_unregistered, true))
128 throw_get_ex(name, s_class_name, this);
129
130 return vec;
131 }
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
static void throw_get_ex(const std::string &what, const std::string &class_name, const DalObject *obj)
throw exception in generated get method (i.e.
Definition DalObject.cpp:82

◆ get() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::ReadoutApplication::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

◆ get() [3/4]

bool dunedaq::appmodel::ReadoutApplication::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 133 of file ReadoutApplication.cpp.

134 {
135 if (first_call)
136 {
137 std::lock_guard scoped_lock(m_mutex);
138
139 check();
140 check_init();
141
142 if (get_rel_objects(name, upcast_unregistered, vec))
143 return true;
144 }
145
146 if (SmartDaqApplication::get(name, vec, upcast_unregistered, false)) return true;
147 if (ResourceSetDisableAND::get(name, vec, upcast_unregistered, false)) return true;
148
149 if (first_call)
150 return get_algo_objects(name, vec);
151
152 return false;
153 }
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
bool get_rel_objects(const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
Read relationship values as DAL objects using DAL factory.
Definition DalObject.cpp:8
std::mutex m_mutex
Used to protect changes of DAL object.
bool get_algo_objects(const std::string &name, std::vector< const DalObject * > &objs) const
Run algorithm and return result as DAL objects using DAL factory.
Definition DalObject.cpp:25
void check_init() const
Check and initialize object if necessary.

◆ get() [4/4]

bool dunedaq::appmodel::ReadoutApplication::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_application_name() [1/2]

const std::string & dunedaq::appmodel::ReadoutApplication::get_application_name ( ) const
inline

Get "application_name" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 126 of file ReadoutApplication.hpp.

127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 check_init();
131 return m_application_name;
132 }

◆ get_application_name() [2/2]

const std::string & dunedaq::appmodel::ReadoutApplication::get_application_name ( ) const
inline

Get "application_name" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 126 of file ReadoutApplication.hpp.

127 {
128 std::lock_guard scoped_lock(m_mutex);
129 check();
130 check_init();
131 return m_application_name;
132 }

◆ get_data_reader() [1/2]

const dunedaq::appmodel::DataReaderConf * dunedaq::appmodel::ReadoutApplication::get_data_reader ( ) const
inline

Get "data_reader" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 354 of file ReadoutApplication.hpp.

355 {
356 std::lock_guard scoped_lock(m_mutex);
357 check();
358 check_init();
359 if (!m_data_reader)
360 {
361 std::ostringstream text;
362 text << "relationship \"" << s_data_reader << "\" of object " << this << " is not set";
363 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
364 }
365 return m_data_reader;
366 }
Generic configuration exception.

◆ get_data_reader() [2/2]

const dunedaq::appmodel::DataReaderConf * dunedaq::appmodel::ReadoutApplication::get_data_reader ( ) const
inline

Get "data_reader" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 354 of file ReadoutApplication.hpp.

355 {
356 std::lock_guard scoped_lock(m_mutex);
357 check();
358 check_init();
359 if (!m_data_reader)
360 {
361 std::ostringstream text;
362 text << "relationship \"" << s_data_reader << "\" of object " << this << " is not set";
363 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
364 }
365 return m_data_reader;
366 }

◆ get_data_recorder() [1/2]

const dunedaq::appmodel::DataRecorderConf * dunedaq::appmodel::ReadoutApplication::get_data_recorder ( ) const
inline

Get "data_recorder" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 385 of file ReadoutApplication.hpp.

386 {
387 std::lock_guard scoped_lock(m_mutex);
388 check();
389 check_init();
390 return m_data_recorder;
391 }

◆ get_data_recorder() [2/2]

const dunedaq::appmodel::DataRecorderConf * dunedaq::appmodel::ReadoutApplication::get_data_recorder ( ) const
inline

Get "data_recorder" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 385 of file ReadoutApplication.hpp.

386 {
387 std::lock_guard scoped_lock(m_mutex);
388 check();
389 check_init();
390 return m_data_recorder;
391 }

◆ get_detector_connections() [1/2]

const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & dunedaq::appmodel::ReadoutApplication::get_detector_connections ( ) const
inline

Get "detector_connections" relationship value. The list of detector channels to be read out by this readout application.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 442 of file ReadoutApplication.hpp.

443 {
444 std::lock_guard scoped_lock(m_mutex);
445 check();
446 check_init();
448 }
std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > m_detector_connections

◆ get_detector_connections() [2/2]

const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & dunedaq::appmodel::ReadoutApplication::get_detector_connections ( ) const
inline

Get "detector_connections" relationship value. The list of detector channels to be read out by this readout application.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 442 of file ReadoutApplication.hpp.

443 {
444 std::lock_guard scoped_lock(m_mutex);
445 check();
446 check_init();
448 }

◆ get_fragment_aggregator() [1/2]

const dunedaq::appmodel::FragmentAggregatorConf * dunedaq::appmodel::ReadoutApplication::get_fragment_aggregator ( ) const
inline

Get "fragment_aggregator" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 410 of file ReadoutApplication.hpp.

411 {
412 std::lock_guard scoped_lock(m_mutex);
413 check();
414 check_init();
416 {
417 std::ostringstream text;
418 text << "relationship \"" << s_fragment_aggregator << "\" of object " << this << " is not set";
419 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
420 }
422 }

◆ get_fragment_aggregator() [2/2]

const dunedaq::appmodel::FragmentAggregatorConf * dunedaq::appmodel::ReadoutApplication::get_fragment_aggregator ( ) const
inline

Get "fragment_aggregator" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 410 of file ReadoutApplication.hpp.

411 {
412 std::lock_guard scoped_lock(m_mutex);
413 check();
414 check_init();
416 {
417 std::ostringstream text;
418 text << "relationship \"" << s_fragment_aggregator << "\" of object " << this << " is not set";
419 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
420 }
422 }

◆ get_link_handler() [1/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::get_link_handler ( ) const
inline

Get "link_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 298 of file ReadoutApplication.hpp.

299 {
300 std::lock_guard scoped_lock(m_mutex);
301 check();
302 check_init();
303 if (!m_link_handler)
304 {
305 std::ostringstream text;
306 text << "relationship \"" << s_link_handler << "\" of object " << this << " is not set";
307 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
308 }
309 return m_link_handler;
310 }

◆ get_link_handler() [2/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::get_link_handler ( ) const
inline

Get "link_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 298 of file ReadoutApplication.hpp.

299 {
300 std::lock_guard scoped_lock(m_mutex);
301 check();
302 check_init();
303 if (!m_link_handler)
304 {
305 std::ostringstream text;
306 text << "relationship \"" << s_link_handler << "\" of object " << this << " is not set";
307 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
308 }
309 return m_link_handler;
310 }

◆ get_ta_generation_enabled() [1/2]

bool dunedaq::appmodel::ReadoutApplication::get_ta_generation_enabled ( ) const
inline

Get "ta_generation_enabled" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 188 of file ReadoutApplication.hpp.

189 {
190 std::lock_guard scoped_lock(m_mutex);
191 check();
192 check_init();
194 }

◆ get_ta_generation_enabled() [2/2]

bool dunedaq::appmodel::ReadoutApplication::get_ta_generation_enabled ( ) const
inline

Get "ta_generation_enabled" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 188 of file ReadoutApplication.hpp.

189 {
190 std::lock_guard scoped_lock(m_mutex);
191 check();
192 check_init();
194 }

◆ get_tp_generation_enabled() [1/2]

bool dunedaq::appmodel::ReadoutApplication::get_tp_generation_enabled ( ) const
inline

Get "tp_generation_enabled" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 157 of file ReadoutApplication.hpp.

158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 check_init();
163 }

◆ get_tp_generation_enabled() [2/2]

bool dunedaq::appmodel::ReadoutApplication::get_tp_generation_enabled ( ) const
inline

Get "tp_generation_enabled" attribute value.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 157 of file ReadoutApplication.hpp.

158 {
159 std::lock_guard scoped_lock(m_mutex);
160 check();
161 check_init();
163 }

◆ get_tp_handler() [1/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::get_tp_handler ( ) const
inline

Get "tp_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 329 of file ReadoutApplication.hpp.

330 {
331 std::lock_guard scoped_lock(m_mutex);
332 check();
333 check_init();
334 return m_tp_handler;
335 }

◆ get_tp_handler() [2/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::get_tp_handler ( ) const
inline

Get "tp_handler" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 329 of file ReadoutApplication.hpp.

330 {
331 std::lock_guard scoped_lock(m_mutex);
332 check();
333 check_init();
334 return m_tp_handler;
335 }

◆ get_tp_source_ids() [1/2]

const std::vector< const dunedaq::appmodel::SourceIDConf * > & dunedaq::appmodel::ReadoutApplication::get_tp_source_ids ( ) const
inline

Get "tp_source_ids" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 240 of file ReadoutApplication.hpp.

241 {
242 std::lock_guard scoped_lock(m_mutex);
243 check();
244 check_init();
245 return m_tp_source_ids;
246 }
std::vector< const dunedaq::appmodel::SourceIDConf * > m_tp_source_ids

◆ get_tp_source_ids() [2/2]

const std::vector< const dunedaq::appmodel::SourceIDConf * > & dunedaq::appmodel::ReadoutApplication::get_tp_source_ids ( ) const
inline

Get "tp_source_ids" relationship value.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 240 of file ReadoutApplication.hpp.

241 {
242 std::lock_guard scoped_lock(m_mutex);
243 check();
244 check_init();
245 return m_tp_source_ids;
246 }

◆ get_uses() [1/2]

const dunedaq::appmodel::RoHwConfig * dunedaq::appmodel::ReadoutApplication::get_uses ( ) const
inline

Get "uses" relationship value. Configuration of the host hardware resources used by this application.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 266 of file ReadoutApplication.hpp.

267 {
268 std::lock_guard scoped_lock(m_mutex);
269 check();
270 check_init();
271 if (!m_uses)
272 {
273 std::ostringstream text;
274 text << "relationship \"" << s_uses << "\" of object " << this << " is not set";
275 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
276 }
277 return m_uses;
278 }

◆ get_uses() [2/2]

const dunedaq::appmodel::RoHwConfig * dunedaq::appmodel::ReadoutApplication::get_uses ( ) const
inline

Get "uses" relationship value. Configuration of the host hardware resources used by this application.

Returns
the relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 266 of file ReadoutApplication.hpp.

267 {
268 std::lock_guard scoped_lock(m_mutex);
269 check();
270 check_init();
271 if (!m_uses)
272 {
273 std::ostringstream text;
274 text << "relationship \"" << s_uses << "\" of object " << this << " is not set";
275 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
276 }
277 return m_uses;
278 }

◆ init() [1/2]

void dunedaq::appmodel::ReadoutApplication::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

Definition at line 94 of file ReadoutApplication.cpp.

95 {
96 SmartDaqApplication::init(init_children);
97 ResourceSetDisableAND::init(init_children);
98
99 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
100
101 try {
113 }
114 catch (dunedaq::conffwk::Exception & ex) {
115 throw_init_ex(ex);
116 }
117 }
virtual void init(bool init_children)
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.
void throw_init_ex(dunedaq::conffwk::Exception &ex)
throw object initialisation exception (i.e.
Definition DalObject.cpp:74
DalRegistry & p_registry
Configuration object.
ConfigObject p_obj
Config object used by given template object.
const T * _ref(ConfigObject &obj, const std::string &name, bool read_children)
Get signle value of object's relation and instantiate result with it (multi-thread safe).

◆ init() [2/2]

virtual void dunedaq::appmodel::ReadoutApplication::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

◆ print() [1/2]

void dunedaq::appmodel::ReadoutApplication::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the ReadoutApplication object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

Definition at line 53 of file ReadoutApplication.cpp.

54 {
55 check_init();
56
57 try {
58 const std::string str(indent+2, ' ');
59
60 if (print_header)
61 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
62
63
64 // print direct super-classes
65
68
69
70 // print direct attributes
71
75
76
77 // print direct relationships
78
87 }
88 catch (dunedaq::conffwk::Exception & ex) {
90 }
91 }
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the SmartDaqApplication object.
void p_hdr(std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
print object headers
Definition DalObject.cpp:65
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
Definition DalObject.cpp:59
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the ResourceSetDisableAND object.
void p_sv_rel(std::ostream &s, const std::string &str, const std::string &name, const DalObject *obj)
print weak single-value relationship
void p_mv_rel(std::ostream &s, const std::string &str, const std::string &name, const T &objs) noexcept
print weak multi-value relationship
void p_sv_attr(std::ostream &s, const std::string &str, const std::string &name, const T &val) noexcept
print single-value attribute

◆ print() [2/2]

virtual void dunedaq::appmodel::ReadoutApplication::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the ReadoutApplication object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Reimplemented from dunedaq::appmodel::SmartDaqApplication.

Reimplemented in dunedaq::appmodel::NP02ReadoutApplication, and dunedaq::appmodel::NP02ReadoutApplication.

◆ set_application_name() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_application_name ( const std::string & value)
inline

Set "application_name" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 141 of file ReadoutApplication.hpp.

142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 clear();
147 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_application_name() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_application_name ( const std::string & value)
inline

Set "application_name" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 141 of file ReadoutApplication.hpp.

142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 clear();
147 }

◆ set_data_reader() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_data_reader ( const dunedaq::appmodel::DataReaderConf * value)

Set "data_reader" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 175 of file ReadoutApplication.cpp.

176 {
178 }
void _set_object(const std::string &name, const T *value)
Helper method for generated set single-value relationship methods.

◆ set_data_reader() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_data_reader ( const dunedaq::appmodel::DataReaderConf * value)

Set "data_reader" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_data_recorder() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_data_recorder ( const dunedaq::appmodel::DataRecorderConf * value)

Set "data_recorder" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 180 of file ReadoutApplication.cpp.

181 {
183 }

◆ set_data_recorder() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_data_recorder ( const dunedaq::appmodel::DataRecorderConf * value)

Set "data_recorder" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_detector_connections() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_detector_connections ( const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & value)

Set "detector_connections" relationship value. The list of detector channels to be read out by this readout application.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 190 of file ReadoutApplication.cpp.

191 {
193 }
void _set_objects(const std::string &name, const std::vector< const T * > &value)
Helper method for generated set multi-value relationship methods.

◆ set_detector_connections() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_detector_connections ( const std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > & value)

Set "detector_connections" relationship value. The list of detector channels to be read out by this readout application.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_fragment_aggregator() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_fragment_aggregator ( const dunedaq::appmodel::FragmentAggregatorConf * value)

Set "fragment_aggregator" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 185 of file ReadoutApplication.cpp.

186 {
188 }

◆ set_fragment_aggregator() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_fragment_aggregator ( const dunedaq::appmodel::FragmentAggregatorConf * value)

Set "fragment_aggregator" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_link_handler() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_link_handler ( const dunedaq::appmodel::DataHandlerConf * value)

Set "link_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 165 of file ReadoutApplication.cpp.

166 {
168 }

◆ set_link_handler() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_link_handler ( const dunedaq::appmodel::DataHandlerConf * value)

Set "link_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_ta_generation_enabled() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_ta_generation_enabled ( bool value)
inline

Set "ta_generation_enabled" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 203 of file ReadoutApplication.hpp.

204 {
205 std::lock_guard scoped_lock(m_mutex);
206 check();
207 clear();
209 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_ta_generation_enabled() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_ta_generation_enabled ( bool value)
inline

Set "ta_generation_enabled" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 203 of file ReadoutApplication.hpp.

204 {
205 std::lock_guard scoped_lock(m_mutex);
206 check();
207 clear();
209 }

◆ set_tp_generation_enabled() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_generation_enabled ( bool value)
inline

Set "tp_generation_enabled" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 172 of file ReadoutApplication.hpp.

173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 clear();
178 }

◆ set_tp_generation_enabled() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_generation_enabled ( bool value)
inline

Set "tp_generation_enabled" attribute value.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 172 of file ReadoutApplication.hpp.

173 {
174 std::lock_guard scoped_lock(m_mutex);
175 check();
176 clear();
178 }

◆ set_tp_handler() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_handler ( const dunedaq::appmodel::DataHandlerConf * value)

Set "tp_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 170 of file ReadoutApplication.cpp.

171 {
173 }

◆ set_tp_handler() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_handler ( const dunedaq::appmodel::DataHandlerConf * value)

Set "tp_handler" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_tp_source_ids() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_source_ids ( const std::vector< const dunedaq::appmodel::SourceIDConf * > & value)

Set "tp_source_ids" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 155 of file ReadoutApplication.cpp.

156 {
158 }

◆ set_tp_source_ids() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_tp_source_ids ( const std::vector< const dunedaq::appmodel::SourceIDConf * > & value)

Set "tp_source_ids" relationship value.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

◆ set_uses() [1/2]

void dunedaq::appmodel::ReadoutApplication::set_uses ( const dunedaq::appmodel::RoHwConfig * value)

Set "uses" relationship value. Configuration of the host hardware resources used by this application.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 160 of file ReadoutApplication.cpp.

161 {
162 _set_object(s_uses, value);
163 }

◆ set_uses() [2/2]

void dunedaq::appmodel::ReadoutApplication::set_uses ( const dunedaq::appmodel::RoHwConfig * value)

Set "uses" relationship value. Configuration of the host hardware resources used by this application.

Parameters
valuenew relationship value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 44 of file ReadoutApplication.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 46 of file ReadoutApplication.hpp.

◆ conffwk::DalObject

Definition at line 45 of file ReadoutApplication.hpp.

◆ conffwk::DalRegistry

Definition at line 47 of file ReadoutApplication.hpp.

Member Data Documentation

◆ m_application_name

std::string dunedaq::appmodel::ReadoutApplication::m_application_name
private

Definition at line 93 of file ReadoutApplication.hpp.

◆ m_data_reader

const dunedaq::appmodel::DataReaderConf * dunedaq::appmodel::ReadoutApplication::m_data_reader
private

Definition at line 100 of file ReadoutApplication.hpp.

◆ m_data_recorder

const dunedaq::appmodel::DataRecorderConf * dunedaq::appmodel::ReadoutApplication::m_data_recorder
private

Definition at line 101 of file ReadoutApplication.hpp.

◆ m_detector_connections

std::vector< const dunedaq::confmodel::DetectorToDaqConnection * > dunedaq::appmodel::ReadoutApplication::m_detector_connections
private

Definition at line 103 of file ReadoutApplication.hpp.

◆ m_fragment_aggregator

const dunedaq::appmodel::FragmentAggregatorConf * dunedaq::appmodel::ReadoutApplication::m_fragment_aggregator
private

Definition at line 102 of file ReadoutApplication.hpp.

◆ m_link_handler

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::m_link_handler
private

Definition at line 98 of file ReadoutApplication.hpp.

◆ m_ta_generation_enabled

bool dunedaq::appmodel::ReadoutApplication::m_ta_generation_enabled
private

Definition at line 95 of file ReadoutApplication.hpp.

◆ m_tp_generation_enabled

bool dunedaq::appmodel::ReadoutApplication::m_tp_generation_enabled
private

Definition at line 94 of file ReadoutApplication.hpp.

◆ m_tp_handler

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::ReadoutApplication::m_tp_handler
private

Definition at line 99 of file ReadoutApplication.hpp.

◆ m_tp_source_ids

std::vector< const dunedaq::appmodel::SourceIDConf * > dunedaq::appmodel::ReadoutApplication::m_tp_source_ids
private

Definition at line 96 of file ReadoutApplication.hpp.

◆ m_uses

const dunedaq::appmodel::RoHwConfig * dunedaq::appmodel::ReadoutApplication::m_uses
private

Definition at line 97 of file ReadoutApplication.hpp.

◆ s_application_name

static const std::string dunedaq::appmodel::ReadoutApplication::s_application_name = "application_name"
inlinestatic

Definition at line 110 of file ReadoutApplication.hpp.

◆ s_class_name

static const std::string & dunedaq::appmodel::ReadoutApplication::s_class_name
static

The name of the configuration class.

Definition at line 59 of file ReadoutApplication.hpp.

◆ s_data_reader

static const std::string dunedaq::appmodel::ReadoutApplication::s_data_reader = "data_reader"
inlinestatic

Definition at line 218 of file ReadoutApplication.hpp.

◆ s_data_recorder

static const std::string dunedaq::appmodel::ReadoutApplication::s_data_recorder = "data_recorder"
inlinestatic

Definition at line 219 of file ReadoutApplication.hpp.

◆ s_detector_connections

static const std::string dunedaq::appmodel::ReadoutApplication::s_detector_connections = "detector_connections"
inlinestatic

Definition at line 221 of file ReadoutApplication.hpp.

◆ s_fragment_aggregator

static const std::string dunedaq::appmodel::ReadoutApplication::s_fragment_aggregator = "fragment_aggregator"
inlinestatic

Definition at line 220 of file ReadoutApplication.hpp.

◆ s_link_handler

static const std::string dunedaq::appmodel::ReadoutApplication::s_link_handler = "link_handler"
inlinestatic

Definition at line 216 of file ReadoutApplication.hpp.

◆ s_ta_generation_enabled

static const std::string dunedaq::appmodel::ReadoutApplication::s_ta_generation_enabled = "ta_generation_enabled"
inlinestatic

Definition at line 112 of file ReadoutApplication.hpp.

◆ s_tp_generation_enabled

static const std::string dunedaq::appmodel::ReadoutApplication::s_tp_generation_enabled = "tp_generation_enabled"
inlinestatic

Definition at line 111 of file ReadoutApplication.hpp.

◆ s_tp_handler

static const std::string dunedaq::appmodel::ReadoutApplication::s_tp_handler = "tp_handler"
inlinestatic

Definition at line 217 of file ReadoutApplication.hpp.

◆ s_tp_source_ids

static const std::string dunedaq::appmodel::ReadoutApplication::s_tp_source_ids = "tp_source_ids"
inlinestatic

Definition at line 214 of file ReadoutApplication.hpp.

◆ s_uses

static const std::string dunedaq::appmodel::ReadoutApplication::s_uses = "uses"
inlinestatic

Definition at line 215 of file ReadoutApplication.hpp.


The documentation for this class was generated from the following files: