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::FragmentAggregatorConf * get_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 (std::shared_ptr< appmodel::ConfigurationHelper >) const override
virtual std::vector< const ExcludableEntity * > contained_excludable_entities () 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::FragmentAggregatorConf * get_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 (std::shared_ptr< appmodel::ConfigurationHelper >) const override
virtual std::vector< const ExcludableEntity * > contained_excludable_entities () const override
Public Member Functions inherited from dunedaq::confmodel::ExcludableEntitySetAND
bool compute_excluded_state (const std::set< std::string > &excluded) const final
bool compute_excluded_state (const std::set< std::string > &excluded) const final
Public Member Functions inherited from dunedaq::confmodel::ExcludableEntity
void parents (const dunedaq::confmodel::Session &session, std::list< std::vector< const dunedaq::confmodel::ExcludableEntity * > > &parents) const
bool is_excluded (const dunedaq::confmodel::ExcludableEntityTree &session) const
void parents (const dunedaq::confmodel::Session &session, std::list< std::vector< const dunedaq::confmodel::ExcludableEntity * > > &parents) const
bool is_excluded (const dunedaq::confmodel::ExcludableEntityTree &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 ConfigObject & config_object () const
DalRegistry & registry () const noexcept
Configuration & configuration () 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::SourceIDConf * get_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::SourceIDConf * get_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_host_components () 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_host_components () 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::VirtualHost * get_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::OpMonConf * get_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::VirtualHost * get_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::OpMonConf * get_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::ExcludableEntitySetAND
static const std::string & s_class_name
Static Public Attributes inherited from dunedaq::confmodel::ExcludableEntitySet
static const std::string & s_class_name
Static Public Attributes inherited from dunedaq::confmodel::ExcludableEntity
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::ExcludableEntitySetAND
 ExcludableEntitySetAND (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntitySetAND () noexcept
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 ExcludableEntitySetAND (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntitySetAND () 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::ExcludableEntitySet
 ExcludableEntitySet (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntitySet () noexcept
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 ExcludableEntitySet (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntitySet () 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::ExcludableEntity
 ExcludableEntity (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntity () noexcept
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 ExcludableEntity (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~ExcludableEntity () 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::FragmentAggregatorConf * m_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
DalRegistry & p_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 38 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 :
33 dunedaq::conffwk::DalObject(db, o),
34 dunedaq::confmodel::ExcludableEntitySetAND(db, o),
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

◆ ~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]

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

Definition at line 100 of file FakeDataApplication.hpp.

100{ return s_application_name; }

◆ __get_application_name_str() [2/2]

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

Definition at line 100 of file FakeDataApplication.hpp.

100{ return s_application_name; }

◆ __get_fragment_aggregator_str() [1/2]

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

Definition at line 140 of file FakeDataApplication.hpp.

140{ return s_fragment_aggregator; }

◆ __get_fragment_aggregator_str() [2/2]

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

Definition at line 140 of file FakeDataApplication.hpp.

140{ return s_fragment_aggregator; }

◆ __get_producers_str() [1/2]

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

Definition at line 139 of file FakeDataApplication.hpp.

139{ return s_producers; }

◆ __get_producers_str() [2/2]

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

Definition at line 139 of file FakeDataApplication.hpp.

139{ return s_producers; }

◆ contained_excludable_entities() [1/2]

std::vector< const confmodel::ExcludableEntity * > dunedaq::appmodel::FakeDataApplication::contained_excludable_entities ( ) const
overridevirtual

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

Implements dunedaq::confmodel::ExcludableEntitySet.

Definition at line 45 of file FakeDataApplication.cpp.

46{
48}
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::ExcludableEntity * > to_resources(const std::vector< T * > &vector_of_children)

◆ contained_excludable_entities() [2/2]

virtual std::vector< const ExcludableEntity * > dunedaq::appmodel::FakeDataApplication::contained_excludable_entities ( ) const
overridevirtual

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

Implements dunedaq::confmodel::ExcludableEntitySet.

◆ generate_modules() [1/2]

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

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

Implements dunedaq::appmodel::SmartDaqApplication.

Definition at line 51 of file FakeDataApplication.cpp.

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

◆ generate_modules() [2/2]

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

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:81

◆ 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::ExcludableEntitySetAND.

◆ 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 (ExcludableEntitySetAND::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:7
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:22
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 110 of file FakeDataApplication.hpp.

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

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

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

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

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

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

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

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

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

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

◆ 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::ExcludableEntitySetAND.

Definition at line 76 of file FakeDataApplication.cpp.

77 {
78 ExcludableEntitySetAND::init(init_children);
79 SmartDaqApplication::init(init_children);
80
81 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
82
83 try {
85 p_registry._ref<dunedaq::appmodel::FakeDataProdConf>(p_obj, s_producers, m_producers, init_children);
86 m_fragment_aggregator = p_registry._ref<dunedaq::appmodel::FragmentAggregatorConf>(p_obj, s_fragment_aggregator, init_children);
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:72
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::ExcludableEntitySetAND.

◆ 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::ExcludableEntitySetAND.

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:62
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
Definition DalObject.cpp:56
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the ExcludableEntitySetAND 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::ExcludableEntitySetAND.

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

126 {
127 std::lock_guard scoped_lock(m_mutex);
128 check();
129 clear();
131 }
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 125 of file FakeDataApplication.hpp.

126 {
127 std::lock_guard scoped_lock(m_mutex);
128 check();
129 clear();
131 }

◆ 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

◆ conffwk::Configuration

Definition at line 40 of file FakeDataApplication.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 42 of file FakeDataApplication.hpp.

◆ conffwk::DalObject

Definition at line 41 of file FakeDataApplication.hpp.

◆ conffwk::DalRegistry

Definition at line 43 of file FakeDataApplication.hpp.

Member Data Documentation

◆ m_application_name

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

Definition at line 89 of file FakeDataApplication.hpp.

◆ m_fragment_aggregator

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

Definition at line 91 of file FakeDataApplication.hpp.

◆ m_producers

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

Definition at line 90 of file FakeDataApplication.hpp.

◆ s_application_name

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

Definition at line 98 of file FakeDataApplication.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 55 of file FakeDataApplication.hpp.

◆ s_fragment_aggregator

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

Definition at line 137 of file FakeDataApplication.hpp.

◆ s_producers

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

Definition at line 136 of file FakeDataApplication.hpp.


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