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

#include <NP02ReadoutApplication.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the NP02ReadoutApplication 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.
 
void generate_modules (std::shared_ptr< appmodel::ConfigurationHelper >) const override
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the NP02ReadoutApplication 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.
 
void generate_modules (std::shared_ptr< appmodel::ConfigurationHelper >) const override
 
- Public Member Functions inherited from dunedaq::appmodel::ReadoutApplication
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.
 
const dunedaq::appmodel::DataMoveCallbackDescriptorget_callback_desc () const
 Get "callback_desc" relationship value.
 
void set_callback_desc (const dunedaq::appmodel::DataMoveCallbackDescriptor *value)
 Set "callback_desc" relationship value.
 
void generate_modules (std::shared_ptr< appmodel::ConfigurationHelper >) const override
 
virtual std::vector< const Resource * > contained_resources () const override
 
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.
 
const dunedaq::appmodel::DataMoveCallbackDescriptorget_callback_desc () const
 Get "callback_desc" relationship value.
 
void set_callback_desc (const dunedaq::appmodel::DataMoveCallbackDescriptor *value)
 Set "callback_desc" relationship value.
 
void generate_modules (std::shared_ptr< appmodel::ConfigurationHelper >) 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 Attributes

static const std::string & s_class_name
 
- Static Public Attributes inherited from dunedaq::appmodel::ReadoutApplication
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 const std::string s_callback_desc = "callback_desc"
 
- 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

 NP02ReadoutApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~NP02ReadoutApplication () 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
 
 NP02ReadoutApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~NP02ReadoutApplication () 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::ReadoutApplication
 ReadoutApplication (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~ReadoutApplication () noexcept
 
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
 
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
 

Friends

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

Additional Inherited Members

- Static Public Member Functions inherited from dunedaq::appmodel::ReadoutApplication
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_callback_desc_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 const std::string & __get_callback_desc_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
 
- 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 23 of file NP02ReadoutApplication.hpp.

Constructor & Destructor Documentation

◆ NP02ReadoutApplication() [1/2]

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

Definition at line 26 of file NP02ReadoutApplication.cpp.

26 :
29
30 {
31 ;
32 }
ReadoutApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~NP02ReadoutApplication() [1/2]

dunedaq::appmodel::NP02ReadoutApplication::~NP02ReadoutApplication ( )
protectedvirtualnoexcept

Definition at line 62 of file NP02ReadoutApplication.cpp.

63 {
64 }

◆ NP02ReadoutApplication() [2/2]

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

◆ ~NP02ReadoutApplication() [2/2]

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

Member Function Documentation

◆ generate_modules() [1/2]

void dunedaq::appmodel::NP02ReadoutApplication::generate_modules ( std::shared_ptr< appmodel::ConfigurationHelper > helper) const
overridevirtual

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

Implements dunedaq::appmodel::SmartDaqApplication.

Definition at line 73 of file NP02ReadoutApplication.cpp.

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

◆ generate_modules() [2/2]

void dunedaq::appmodel::NP02ReadoutApplication::generate_modules ( std::shared_ptr< appmodel::ConfigurationHelper > ) 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::NP02ReadoutApplication::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::ReadoutApplication.

Definition at line 66 of file NP02ReadoutApplication.cpp.

67 {
68 std::vector<const dunedaq::conffwk::DalObject *> vec;
69
70 if (!get(name, vec, upcast_unregistered, true))
71 throw_get_ex(name, s_class_name, this);
72
73 return vec;
74 }
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::NP02ReadoutApplication::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::ReadoutApplication.

◆ get() [3/4]

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

Definition at line 76 of file NP02ReadoutApplication.cpp.

77 {
78 if (first_call)
79 {
80 std::lock_guard scoped_lock(m_mutex);
81
82 check();
83 check_init();
84
85 if (get_rel_objects(name, upcast_unregistered, vec))
86 return true;
87 }
88
89 if (ReadoutApplication::get(name, vec, upcast_unregistered, false)) return true;
90
91 if (first_call)
92 return get_algo_objects(name, vec);
93
94 return false;
95 }
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::NP02ReadoutApplication::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::ReadoutApplication.

Definition at line 55 of file NP02ReadoutApplication.cpp.

56 {
57 ReadoutApplication::init(init_children);
58
59 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
60 }
virtual void init(bool init_children)

◆ init() [2/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::appmodel::ReadoutApplication.

◆ print() [1/2]

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

Print details of the NP02ReadoutApplication 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::ReadoutApplication.

Definition at line 35 of file NP02ReadoutApplication.cpp.

36 {
37 check_init();
38
39 try {
40
41 if (print_header)
42 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
43
44
45 // print direct super-classes
46
48 }
49 catch (dunedaq::conffwk::Exception & ex) {
51 }
52 }
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the ReadoutApplication 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

◆ print() [2/2]

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

Print details of the NP02ReadoutApplication 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::ReadoutApplication.

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 25 of file NP02ReadoutApplication.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 27 of file NP02ReadoutApplication.hpp.

◆ conffwk::DalObject

Definition at line 26 of file NP02ReadoutApplication.hpp.

◆ conffwk::DalRegistry

Definition at line 28 of file NP02ReadoutApplication.hpp.

Member Data Documentation

◆ s_class_name

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

The name of the configuration class.

Definition at line 40 of file NP02ReadoutApplication.hpp.


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