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

#include <FakeDataApplication.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the FakeDataApplication 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.
 
const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & get_producers () const
 Get "producers" relationship value. List of configurations of fake data producer modules to be used by this application.
 
void set_producers (const std::vector< const dunedaq::appmodel::FakeDataProdConf * > &value)
 Set "producers" relationship value. List of configurations of fake data producer modules to be used by this application.
 
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.
 
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 FakeDataApplication 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.
 
const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & get_producers () const
 Get "producers" relationship value. List of configurations of fake data producer modules to be used by this application.
 
void set_producers (const std::vector< const dunedaq::appmodel::FakeDataProdConf * > &value)
 Set "producers" relationship value. List of configurations of fake data producer modules to be used by this application.
 
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.
 
void generate_modules (const confmodel::Session *) const override
 
virtual std::vector< const Resource * > contained_resources () const override
 
- 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
 
- 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::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
 

Static Public Member Functions

static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_producers_str () noexcept
 
static const std::string & __get_fragment_aggregator_str () noexcept
 
static const std::string & __get_application_name_str () noexcept
 
static const std::string & __get_producers_str () noexcept
 
static const std::string & __get_fragment_aggregator_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 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 Attributes

static const std::string & s_class_name
 
static const std::string s_application_name = "application_name"
 
static const std::string s_producers = "producers"
 
static const std::string s_fragment_aggregator = "fragment_aggregator"
 
- 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
 
- 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"
 

Protected Member Functions

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

Private Attributes

std::string m_application_name
 
std::vector< const dunedaq::appmodel::FakeDataProdConf * > m_producers
 
const dunedaq::appmodel::FragmentAggregatorConfm_fragment_aggregator
 

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 37 of file FakeDataApplication.hpp.

Constructor & Destructor Documentation

◆ FakeDataApplication() [1/2]

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

Definition at line 32 of file FakeDataApplication.cpp.

32 :
36 m_fragment_aggregator (nullptr)
37
38 {
39 ;
40 }
const dunedaq::appmodel::FragmentAggregatorConf * m_fragment_aggregator
SmartDaqApplication(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~FakeDataApplication() [1/2]

dunedaq::appmodel::FakeDataApplication::~FakeDataApplication ( )
protectedvirtualnoexcept

Definition at line 93 of file FakeDataApplication.cpp.

94 {
95 }

◆ FakeDataApplication() [2/2]

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

◆ ~FakeDataApplication() [2/2]

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

Member Function Documentation

◆ __get_application_name_str() [1/2]

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

Definition at line 99 of file FakeDataApplication.hpp.

99{ return s_application_name; }

◆ __get_application_name_str() [2/2]

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

Definition at line 99 of file FakeDataApplication.hpp.

99{ return s_application_name; }

◆ __get_fragment_aggregator_str() [1/2]

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

Definition at line 139 of file FakeDataApplication.hpp.

139{ return s_fragment_aggregator; }

◆ __get_fragment_aggregator_str() [2/2]

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

Definition at line 139 of file FakeDataApplication.hpp.

139{ return s_fragment_aggregator; }

◆ __get_producers_str() [1/2]

static const std::string & dunedaq::appmodel::FakeDataApplication::__get_producers_str ( )
inlinestaticnoexcept

Definition at line 138 of file FakeDataApplication.hpp.

138{ return s_producers; }

◆ __get_producers_str() [2/2]

static const std::string & dunedaq::appmodel::FakeDataApplication::__get_producers_str ( )
inlinestaticnoexcept

Definition at line 138 of file FakeDataApplication.hpp.

138{ return s_producers; }

◆ contained_resources() [1/2]

std::vector< const confmodel::Resource * > dunedaq::appmodel::FakeDataApplication::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 47 of file FakeDataApplication.cpp.

47 {
49}
const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & get_producers() const
Get "producers" relationship value. List of configurations of fake data producer modules to be used b...
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::FakeDataApplication::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::FakeDataApplication::generate_modules ( const confmodel::Session * session) const
overridevirtual

Generate daq module dal objects for streams of the FakeDataApplication on the fly

Implements dunedaq::appmodel::SmartDaqApplication.

Definition at line 52 of file FakeDataApplication.cpp.

53{
54 // oks::OksFile::set_nolock_mode(true);
55
56 std::vector<const confmodel::DaqModule*> modules;
57
58 ConfigObjectFactory obj_fac(this);
59
60
61 // Process the queue rules looking for inputs to our DL/TP handler modules
62 const QueueDescriptor* dlhReqInputQDesc = nullptr;
63 const QueueDescriptor* faOutputQDesc = nullptr;
64
65 for (auto rule : get_queue_rules()) {
66 auto destination_class = rule->get_destination_class();
67 auto data_type = rule->get_descriptor()->get_data_type();
68 if (destination_class == "FakeDataProdModule") {
69 if (data_type == "DataRequest") {
70 dlhReqInputQDesc = rule->get_descriptor();
71 }
72 } else if (destination_class == "FragmentAggregatorModule") {
73 faOutputQDesc = rule->get_descriptor();
74 }
75 }
76 if (faOutputQDesc == nullptr) {
77 throw(BadConf(ERS_HERE, "No fragment output queue descriptor given"));
78 }
79 if (dlhReqInputQDesc == nullptr) {
80 throw(BadConf(ERS_HERE, "No DLH request input queue descriptor given"));
81 }
82 // Process the network rules looking for the Fragment Aggregator and TP handler data reuest inputs
83 const NetworkConnectionDescriptor* faNetDesc = nullptr;
84 const NetworkConnectionDescriptor* tsNetDesc = nullptr;
85 for (auto rule : get_network_rules()) {
86 auto endpoint_class = rule->get_endpoint_class();
87 if (endpoint_class == "FragmentAggregatorModule") {
88 faNetDesc = rule->get_descriptor();
89 } else if (endpoint_class == "FakeDataProdModule") {
90 tsNetDesc = rule->get_descriptor();
91 }
92 }
93 if (faNetDesc == nullptr) {
94 throw(BadConf(ERS_HERE, "No Fragment output network descriptor given"));
95 }
96 if (tsNetDesc == nullptr) {
97 throw(BadConf(ERS_HERE, "No TimeSync output network descriptor given"));
98 }
99
100 // Create here the Queue on which all data fragments are forwarded to the fragment aggregator
101 // and a container for the queues of data request to TP handler and DLH
102
103 std::vector<const confmodel::Connection*> faOutputQueues;
104
105 conffwk::ConfigObject faQueueObj = obj_fac.create_queue_obj(faOutputQDesc, UID());
106
107 // Create a FakeDataProdModule for each stream of this Readout Group
108 for (auto fdpConf : get_producers()) {
109 if (fdpConf->is_disabled(*session)) {
110 TLOG_DEBUG(7) << "Ignoring disabled FakeDataProdConf " << fdpConf->UID();
111 continue;
112 }
113
114 auto stream = fdpConf->cast<appmodel::FakeDataProdConf>();
115 if (stream == nullptr) {
116 throw(BadConf(ERS_HERE, "ReadoutGroup contains something other than FakeDataProdConf"));
117 }
118
119 auto id = stream->get_source_id();
120 std::string uid("FakeDataProdModule-" + std::to_string(id));
121 TLOG_DEBUG(7) << "creating OKS configuration object for FakeDataProdModule";
122 conffwk::ConfigObject dlhObj = obj_fac.create("FakeDataProdModule", uid);
123 dlhObj.set_obj("configuration", &stream->config_object());
124
125 // Time Sync network connection
126 auto tsNetObj = obj_fac.create_net_obj(tsNetDesc, std::to_string(id));
127
128 dlhObj.set_objs("outputs", { &faQueueObj, &tsNetObj });
129
130 auto reqQueueObj = obj_fac.create_queue_sid_obj(dlhReqInputQDesc, id);
131
132 // Add the requessts queue dal pointer to the outputs of the FragmentAggregatorModule
133 faOutputQueues.push_back(obj_fac.get_dal<confmodel::Connection>(
134 dlhReqInputQDesc->get_uid_base() + std::to_string(id)));
135
136 dlhObj.set_objs("inputs", { &reqQueueObj });
137
138 modules.push_back(obj_fac.get_dal<FakeDataProdModule>(uid));
139 }
140
141 // Finally create Fragment Aggregator
142 auto aggregator_conf = get_fragment_aggregator();
143 if (aggregator_conf == 0) {
144 throw(BadConf(ERS_HERE, "No FragmentAggregatorModule configuration given"));
145 }
146 std::string faUid("fragmentaggregator-" + UID());
147 TLOG_DEBUG(7) << "creating OKS configuration object for Fragment Aggregator class ";
148 conffwk::ConfigObject faObj = obj_fac.create("FragmentAggregatorModule", faUid);
149
150 // Add network connection to TRBs
151 conffwk::ConfigObject faNetObj = obj_fac.create_net_obj(faNetDesc, UID());
152
153 // Add output queueus of data requests
154 std::vector<const conffwk::ConfigObject*> qObjs;
155 for (auto q : faOutputQueues) {
156 qObjs.push_back(&q->config_object());
157 }
158 faObj.set_obj("configuration", &aggregator_conf->config_object());
159 faObj.set_objs("inputs", { &faNetObj, &faQueueObj });
160 faObj.set_objs("outputs", qObjs);
161
162 modules.push_back(obj_fac.get_dal<FragmentAggregatorModule>(faUid));
163
164 obj_fac.update_modules(modules);
165}
#define ERS_HERE
const dunedaq::appmodel::FragmentAggregatorConf * get_fragment_aggregator() const
Get "fragment_aggregator" relationship 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::FakeDataApplication::generate_modules ( const confmodel::Session * ) const
overridevirtual

Generate daq module dal objects for streams of the FakeDataApplication on the fly

Implements dunedaq::appmodel::SmartDaqApplication.

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::FakeDataApplication::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::confmodel::ResourceSetDisableAND.

Definition at line 97 of file FakeDataApplication.cpp.

98 {
99 std::vector<const dunedaq::conffwk::DalObject *> vec;
100
101 if (!get(name, vec, upcast_unregistered, true))
102 throw_get_ex(name, s_class_name, this);
103
104 return vec;
105 }
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::FakeDataApplication::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::confmodel::ResourceSetDisableAND.

◆ get() [3/4]

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

Definition at line 107 of file FakeDataApplication.cpp.

108 {
109 if (first_call)
110 {
111 std::lock_guard scoped_lock(m_mutex);
112
113 check();
114 check_init();
115
116 if (get_rel_objects(name, upcast_unregistered, vec))
117 return true;
118 }
119
120 if (ResourceSetDisableAND::get(name, vec, upcast_unregistered, false)) return true;
121 if (SmartDaqApplication::get(name, vec, upcast_unregistered, false)) return true;
122
123 if (first_call)
124 return get_algo_objects(name, vec);
125
126 return false;
127 }
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::FakeDataApplication::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::FakeDataApplication::get_application_name ( ) const
inline

Get "application_name" attribute value.

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

Definition at line 109 of file FakeDataApplication.hpp.

110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_application_name;
115 }

◆ get_application_name() [2/2]

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

Get "application_name" attribute value.

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

Definition at line 109 of file FakeDataApplication.hpp.

110 {
111 std::lock_guard scoped_lock(m_mutex);
112 check();
113 check_init();
114 return m_application_name;
115 }

◆ get_fragment_aggregator() [1/2]

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

Get "fragment_aggregator" relationship value.

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

Definition at line 182 of file FakeDataApplication.hpp.

183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 check_init();
188 {
189 std::ostringstream text;
190 text << "relationship \"" << s_fragment_aggregator << "\" of object " << this << " is not set";
191 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
192 }
194 }
Generic configuration exception.

◆ get_fragment_aggregator() [2/2]

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

Get "fragment_aggregator" relationship value.

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

Definition at line 182 of file FakeDataApplication.hpp.

183 {
184 std::lock_guard scoped_lock(m_mutex);
185 check();
186 check_init();
188 {
189 std::ostringstream text;
190 text << "relationship \"" << s_fragment_aggregator << "\" of object " << this << " is not set";
191 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
192 }
194 }

◆ get_producers() [1/2]

const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & dunedaq::appmodel::FakeDataApplication::get_producers ( ) const
inline

Get "producers" relationship value. List of configurations of fake data producer modules to be used by this application.

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

Definition at line 150 of file FakeDataApplication.hpp.

151 {
152 std::lock_guard scoped_lock(m_mutex);
153 check();
154 check_init();
155 if (m_producers.empty())
156 {
157 std::ostringstream text;
158 text << "relationship \"" << s_producers << "\" of object " << this << " is empty";
159 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
160 }
161 return m_producers;
162 }
std::vector< const dunedaq::appmodel::FakeDataProdConf * > m_producers

◆ get_producers() [2/2]

const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & dunedaq::appmodel::FakeDataApplication::get_producers ( ) const
inline

Get "producers" relationship value. List of configurations of fake data producer modules to be used by this application.

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

Definition at line 150 of file FakeDataApplication.hpp.

151 {
152 std::lock_guard scoped_lock(m_mutex);
153 check();
154 check_init();
155 if (m_producers.empty())
156 {
157 std::ostringstream text;
158 text << "relationship \"" << s_producers << "\" of object " << this << " is empty";
159 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
160 }
161 return m_producers;
162 }

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::ResourceSetDisableAND.

Definition at line 76 of file FakeDataApplication.cpp.

77 {
78 ResourceSetDisableAND::init(init_children);
79 SmartDaqApplication::init(init_children);
80
81 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
82
83 try {
87 }
88 catch (dunedaq::conffwk::Exception & ex) {
89 throw_init_ex(ex);
90 }
91 }
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::FakeDataApplication::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::ResourceSetDisableAND.

◆ print() [1/2]

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

Print details of the FakeDataApplication 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::confmodel::ResourceSetDisableAND.

Definition at line 43 of file FakeDataApplication.cpp.

44 {
45 check_init();
46
47 try {
48 const std::string str(indent+2, ' ');
49
50 if (print_header)
51 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
52
53
54 // print direct super-classes
55
58
59
60 // print direct attributes
61
63
64
65 // print direct relationships
66
69 }
70 catch (dunedaq::conffwk::Exception & ex) {
72 }
73 }
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::FakeDataApplication::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the FakeDataApplication 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::confmodel::ResourceSetDisableAND.

◆ set_application_name() [1/2]

void dunedaq::appmodel::FakeDataApplication::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 124 of file FakeDataApplication.hpp.

125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_application_name() [2/2]

void dunedaq::appmodel::FakeDataApplication::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 124 of file FakeDataApplication.hpp.

125 {
126 std::lock_guard scoped_lock(m_mutex);
127 check();
128 clear();
130 }

◆ set_fragment_aggregator() [1/2]

void dunedaq::appmodel::FakeDataApplication::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 134 of file FakeDataApplication.cpp.

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

◆ set_fragment_aggregator() [2/2]

void dunedaq::appmodel::FakeDataApplication::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_producers() [1/2]

void dunedaq::appmodel::FakeDataApplication::set_producers ( const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & value)

Set "producers" relationship value. List of configurations of fake data producer modules to be used by this application.

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

Definition at line 129 of file FakeDataApplication.cpp.

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

◆ set_producers() [2/2]

void dunedaq::appmodel::FakeDataApplication::set_producers ( const std::vector< const dunedaq::appmodel::FakeDataProdConf * > & value)

Set "producers" relationship value. List of configurations of fake data producer modules to be 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 39 of file FakeDataApplication.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 41 of file FakeDataApplication.hpp.

◆ conffwk::DalObject

Definition at line 40 of file FakeDataApplication.hpp.

◆ conffwk::DalRegistry

Definition at line 42 of file FakeDataApplication.hpp.

Member Data Documentation

◆ m_application_name

std::string dunedaq::appmodel::FakeDataApplication::m_application_name
private

Definition at line 88 of file FakeDataApplication.hpp.

◆ m_fragment_aggregator

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

Definition at line 90 of file FakeDataApplication.hpp.

◆ m_producers

std::vector< const dunedaq::appmodel::FakeDataProdConf * > dunedaq::appmodel::FakeDataApplication::m_producers
private

Definition at line 89 of file FakeDataApplication.hpp.

◆ s_application_name

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

Definition at line 97 of file FakeDataApplication.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 54 of file FakeDataApplication.hpp.

◆ s_fragment_aggregator

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

Definition at line 136 of file FakeDataApplication.hpp.

◆ s_producers

static const std::string dunedaq::appmodel::FakeDataApplication::s_producers = "producers"
inlinestatic

Definition at line 135 of file FakeDataApplication.hpp.


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