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

#include <Segment.hpp>

Inheritance diagram for dunedaq::confmodel::Segment:
[legend]
Collaboration diagram for dunedaq::confmodel::Segment:
[legend]

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the Segment 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::vector< const dunedaq::confmodel::Segment * > & get_segments () const
 Get "segments" relationship value. Nested list of Segments that form part of this Segment.
 
void set_segments (const std::vector< const dunedaq::confmodel::Segment * > &value)
 Set "segments" relationship value. Nested list of Segments that form part of this Segment.
 
const std::vector< const dunedaq::confmodel::Application * > & get_applications () const
 Get "applications" relationship value. List of Applications that run in this Segment.
 
void set_applications (const std::vector< const dunedaq::confmodel::Application * > &value)
 Set "applications" relationship value. List of Applications that run in this Segment.
 
const dunedaq::confmodel::RCApplicationget_controller () const
 Get "controller" relationship value. This Segment's run controller.
 
void set_controller (const dunedaq::confmodel::RCApplication *value)
 Set "controller" relationship value. This Segment's run controller.
 
virtual std::vector< const Resource * > contained_resources () const
 
bool compute_disabled_state (const std::set< std::string > &disabled) const final
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the Segment 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::vector< const dunedaq::confmodel::Segment * > & get_segments () const
 Get "segments" relationship value. Nested list of Segments that form part of this Segment.
 
void set_segments (const std::vector< const dunedaq::confmodel::Segment * > &value)
 Set "segments" relationship value. Nested list of Segments that form part of this Segment.
 
const std::vector< const dunedaq::confmodel::Application * > & get_applications () const
 Get "applications" relationship value. List of Applications that run in this Segment.
 
void set_applications (const std::vector< const dunedaq::confmodel::Application * > &value)
 Set "applications" relationship value. List of Applications that run in this Segment.
 
const dunedaq::confmodel::RCApplicationget_controller () const
 Get "controller" relationship value. This Segment's run controller.
 
void set_controller (const dunedaq::confmodel::RCApplication *value)
 Set "controller" relationship value. This Segment's run controller.
 
virtual std::vector< const Resource * > contained_resources () const
 
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.
 

Static Public Member Functions

static const std::string & __get_segments_str () noexcept
 
static const std::string & __get_applications_str () noexcept
 
static const std::string & __get_controller_str () noexcept
 
static const std::string & __get_segments_str () noexcept
 
static const std::string & __get_applications_str () noexcept
 
static const std::string & __get_controller_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::conffwk::DalObject
static void p_null (std::ostream &s)
 print "(null)"
 
static void p_rm (std::ostream &s)
 print "(deleted object)"
 
static void p_error (std::ostream &s, dunedaq::conffwk::Exception &ex)
 print error text
 
static void throw_get_ex (const std::string &what, const std::string &class_name, const DalObject *obj)
 throw exception in generated get method (i.e.
 
static bool is_null (const DalObject *ref) noexcept
 check a pointer on DAL object is null
 

Static Public Attributes

static const std::string & s_class_name
 
static const std::string s_segments = "segments"
 
static const std::string s_applications = "applications"
 
static const std::string s_controller = "controller"
 
- Static Public Attributes inherited from dunedaq::confmodel::ResourceSet
static const std::string & s_class_name
 
- Static Public Attributes inherited from dunedaq::confmodel::Resource
static const std::string & s_class_name
 

Protected Member Functions

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

Private Attributes

std::vector< const dunedaq::confmodel::Segment * > m_segments
 
std::vector< const dunedaq::confmodel::Application * > m_applications
 
const dunedaq::confmodel::RCApplicationm_controller
 

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

Logical sub division of the configuration that can be enabled/disabled as a group

Definition at line 37 of file Segment.hpp.

Constructor & Destructor Documentation

◆ Segment() [1/2]

dunedaq::confmodel::Segment::Segment ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

Definition at line 32 of file Segment.cpp.

32 :
34 ResourceSet(db, o),
35 m_controller (nullptr)
36
37 {
38 ;
39 }
The base class for any generated DAL object.
Definition DalObject.hpp:45
ResourceSet(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
const dunedaq::confmodel::RCApplication * m_controller
Definition Segment.hpp:90

◆ ~Segment() [1/2]

dunedaq::confmodel::Segment::~Segment ( )
protectedvirtualnoexcept

Definition at line 86 of file Segment.cpp.

87 {
88 }

◆ Segment() [2/2]

dunedaq::confmodel::Segment::Segment ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

◆ ~Segment() [2/2]

virtual dunedaq::confmodel::Segment::~Segment ( )
protectedvirtualnoexcept

Member Function Documentation

◆ __get_applications_str() [1/2]

static const std::string & dunedaq::confmodel::Segment::__get_applications_str ( )
inlinestaticnoexcept

Definition at line 102 of file Segment.hpp.

102{ return s_applications; }
static const std::string s_applications
Definition Segment.hpp:98

◆ __get_applications_str() [2/2]

static const std::string & dunedaq::confmodel::Segment::__get_applications_str ( )
inlinestaticnoexcept

Definition at line 102 of file Segment.hpp.

102{ return s_applications; }

◆ __get_controller_str() [1/2]

static const std::string & dunedaq::confmodel::Segment::__get_controller_str ( )
inlinestaticnoexcept

Definition at line 103 of file Segment.hpp.

103{ return s_controller; }
static const std::string s_controller
Definition Segment.hpp:99

◆ __get_controller_str() [2/2]

static const std::string & dunedaq::confmodel::Segment::__get_controller_str ( )
inlinestaticnoexcept

Definition at line 103 of file Segment.hpp.

103{ return s_controller; }

◆ __get_segments_str() [1/2]

static const std::string & dunedaq::confmodel::Segment::__get_segments_str ( )
inlinestaticnoexcept

Definition at line 101 of file Segment.hpp.

101{ return s_segments; }
static const std::string s_segments
Definition Segment.hpp:97

◆ __get_segments_str() [2/2]

static const std::string & dunedaq::confmodel::Segment::__get_segments_str ( )
inlinestaticnoexcept

Definition at line 101 of file Segment.hpp.

101{ return s_segments; }

◆ compute_disabled_state() [1/2]

bool dunedaq::confmodel::Segment::compute_disabled_state ( const std::set< std::string > & disabled_resources) const
finalvirtual

Virtual method to be implemented by subclasses containing the logic to determine if this object should be considered disabled.

Reimplemented from dunedaq::confmodel::Resource.

Definition at line 456 of file dalMethods.cpp.

456 {
457 if (disabled.contains(UID())) {
458 return true;
459 }
460 for (auto app: get_applications()) {
461 auto res=app->cast<const Resource>();
462 if (res == nullptr) {
463 return false;
464 }
465 }
466 for (auto res: contained_resources()) {
467 if (!res->compute_disabled_state(disabled)) {
468 return false;
469 }
470 }
471 return true;
472}
const std::string & UID() const noexcept
Resource(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
Definition Resource.cpp:15
const std::vector< const dunedaq::confmodel::Application * > & get_applications() const
Get "applications" relationship value. List of Applications that run in this Segment.
Definition Segment.hpp:141
virtual std::vector< const Resource * > contained_resources() const

◆ compute_disabled_state() [2/2]

bool dunedaq::confmodel::Segment::compute_disabled_state ( const std::set< std::string > & disabled_resources) const
finalvirtual

Virtual method to be implemented by subclasses containing the logic to determine if this object should be considered disabled.

Reimplemented from dunedaq::confmodel::Resource.

◆ contained_resources() [1/2]

std::vector< const Resource * > dunedaq::confmodel::Segment::contained_resources ( ) const
virtual

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 438 of file dalMethods.cpp.

438 {
439 // All our contained segments are resources
440 std::vector<const Resource*> resources = to_resources(get_segments());
441
442 // Only a subset of our applications might be resources so check individually
443 for (auto app: get_applications()) {
444 TLOG_DBG(6) << "Checking " << app->UID();
445 auto res=app->cast<const Resource>();
446 if (res != nullptr) {
447 TLOG_DBG(6) << "Adding " << app->UID();
448 resources.push_back(res);
449 }
450 }
451 TLOG_DBG(6) << "Returning vector of " << resources.size() << " resources";
452 return resources;
453}
const std::vector< const dunedaq::confmodel::Segment * > & get_segments() const
Get "segments" relationship value. Nested list of Segments that form part of this Segment.
Definition Segment.hpp:114
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::confmodel::Segment::contained_resources ( ) const
virtual

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.

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::Segment::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::ResourceSet.

Definition at line 90 of file Segment.cpp.

91 {
92 std::vector<const dunedaq::conffwk::DalObject *> vec;
93
94 if (!get(name, vec, upcast_unregistered, true))
95 throw_get_ex(name, s_class_name, this);
96
97 return vec;
98 }
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
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...
Definition Segment.cpp:90
static const std::string & s_class_name
Definition Segment.hpp:54

◆ get() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::Segment::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::ResourceSet.

◆ get() [3/4]

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

Definition at line 100 of file Segment.cpp.

101 {
102 if (first_call)
103 {
104 std::lock_guard scoped_lock(m_mutex);
105
106 check();
107 check_init();
108
109 if (get_rel_objects(name, upcast_unregistered, vec))
110 return true;
111 }
112
113 if (ResourceSet::get(name, vec, upcast_unregistered, false)) return true;
114
115 if (first_call)
116 return get_algo_objects(name, vec);
117
118 return false;
119 }
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.
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...

◆ get() [4/4]

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

◆ get_applications() [1/2]

const std::vector< const dunedaq::confmodel::Application * > & dunedaq::confmodel::Segment::get_applications ( ) const
inline

Get "applications" relationship value. List of Applications that run in this Segment.

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

Definition at line 141 of file Segment.hpp.

142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 return m_applications;
147 }
std::vector< const dunedaq::confmodel::Application * > m_applications
Definition Segment.hpp:89

◆ get_applications() [2/2]

const std::vector< const dunedaq::confmodel::Application * > & dunedaq::confmodel::Segment::get_applications ( ) const
inline

Get "applications" relationship value. List of Applications that run in this Segment.

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

Definition at line 141 of file Segment.hpp.

142 {
143 std::lock_guard scoped_lock(m_mutex);
144 check();
145 check_init();
146 return m_applications;
147 }

◆ get_controller() [1/2]

const dunedaq::confmodel::RCApplication * dunedaq::confmodel::Segment::get_controller ( ) const
inline

Get "controller" relationship value. This Segment's run controller.

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

Definition at line 168 of file Segment.hpp.

169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 check_init();
173 if (!m_controller)
174 {
175 std::ostringstream text;
176 text << "relationship \"" << s_controller << "\" of object " << this << " is not set";
177 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
178 }
179 return m_controller;
180 }
#define ERS_HERE
Generic configuration exception.

◆ get_controller() [2/2]

const dunedaq::confmodel::RCApplication * dunedaq::confmodel::Segment::get_controller ( ) const
inline

Get "controller" relationship value. This Segment's run controller.

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

Definition at line 168 of file Segment.hpp.

169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 check_init();
173 if (!m_controller)
174 {
175 std::ostringstream text;
176 text << "relationship \"" << s_controller << "\" of object " << this << " is not set";
177 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
178 }
179 return m_controller;
180 }

◆ get_segments() [1/2]

const std::vector< const dunedaq::confmodel::Segment * > & dunedaq::confmodel::Segment::get_segments ( ) const
inline

Get "segments" relationship value. Nested list of Segments that form part of this Segment.

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

Definition at line 114 of file Segment.hpp.

115 {
116 std::lock_guard scoped_lock(m_mutex);
117 check();
118 check_init();
119 return m_segments;
120 }
std::vector< const dunedaq::confmodel::Segment * > m_segments
Definition Segment.hpp:88

◆ get_segments() [2/2]

const std::vector< const dunedaq::confmodel::Segment * > & dunedaq::confmodel::Segment::get_segments ( ) const
inline

Get "segments" relationship value. Nested list of Segments that form part of this Segment.

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

Definition at line 114 of file Segment.hpp.

115 {
116 std::lock_guard scoped_lock(m_mutex);
117 check();
118 check_init();
119 return m_segments;
120 }

◆ init() [1/2]

void dunedaq::confmodel::Segment::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::ResourceSet.

Definition at line 70 of file Segment.cpp.

71 {
72 ResourceSet::init(init_children);
73
74 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
75
76 try {
80 }
81 catch (dunedaq::conffwk::Exception & ex) {
82 throw_init_ex(ex);
83 }
84 }
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).
virtual void init(bool init_children)
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

virtual void dunedaq::confmodel::Segment::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::ResourceSet.

◆ print() [1/2]

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

Print details of the Segment 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::ResourceSet.

Definition at line 42 of file Segment.cpp.

43 {
44 check_init();
45
46 try {
47 const std::string str(indent+2, ' ');
48
49 if (print_header)
50 p_hdr(s, indent, s_class_name, "dunedaq::confmodel");
51
52
53 // print direct super-classes
54
56
57
58 // print direct relationships
59
63 }
64 catch (dunedaq::conffwk::Exception & ex) {
66 }
67 }
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 ResourceSet 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

◆ print() [2/2]

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

Print details of the Segment 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::ResourceSet.

◆ set_applications() [1/2]

void dunedaq::confmodel::Segment::set_applications ( const std::vector< const dunedaq::confmodel::Application * > & value)

Set "applications" relationship value. List of Applications that run in this Segment.

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

Definition at line 126 of file Segment.cpp.

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

◆ set_applications() [2/2]

void dunedaq::confmodel::Segment::set_applications ( const std::vector< const dunedaq::confmodel::Application * > & value)

Set "applications" relationship value. List of Applications that run in this Segment.

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

◆ set_controller() [1/2]

void dunedaq::confmodel::Segment::set_controller ( const dunedaq::confmodel::RCApplication * value)

Set "controller" relationship value. This Segment's run controller.

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

Definition at line 131 of file Segment.cpp.

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

◆ set_controller() [2/2]

void dunedaq::confmodel::Segment::set_controller ( const dunedaq::confmodel::RCApplication * value)

Set "controller" relationship value. This Segment's run controller.

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

◆ set_segments() [1/2]

void dunedaq::confmodel::Segment::set_segments ( const std::vector< const dunedaq::confmodel::Segment * > & value)

Set "segments" relationship value. Nested list of Segments that form part of this Segment.

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

Definition at line 121 of file Segment.cpp.

122 {
123 _set_objects(s_segments, value);
124 }

◆ set_segments() [2/2]

void dunedaq::confmodel::Segment::set_segments ( const std::vector< const dunedaq::confmodel::Segment * > & value)

Set "segments" relationship value. Nested list of Segments that form part of this Segment.

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

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 39 of file Segment.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 41 of file Segment.hpp.

◆ conffwk::DalObject

Definition at line 40 of file Segment.hpp.

◆ conffwk::DalRegistry

Definition at line 42 of file Segment.hpp.

Member Data Documentation

◆ m_applications

std::vector< const dunedaq::confmodel::Application * > dunedaq::confmodel::Segment::m_applications
private

Definition at line 89 of file Segment.hpp.

◆ m_controller

const dunedaq::confmodel::RCApplication * dunedaq::confmodel::Segment::m_controller
private

Definition at line 90 of file Segment.hpp.

◆ m_segments

std::vector< const dunedaq::confmodel::Segment * > dunedaq::confmodel::Segment::m_segments
private

Definition at line 88 of file Segment.hpp.

◆ s_applications

static const std::string dunedaq::confmodel::Segment::s_applications = "applications"
inlinestatic

Definition at line 98 of file Segment.hpp.

◆ s_class_name

static const std::string & dunedaq::confmodel::Segment::s_class_name
static

The name of the configuration class.

Definition at line 54 of file Segment.hpp.

◆ s_controller

static const std::string dunedaq::confmodel::Segment::s_controller = "controller"
inlinestatic

Definition at line 99 of file Segment.hpp.

◆ s_segments

static const std::string dunedaq::confmodel::Segment::s_segments = "segments"
inlinestatic

Definition at line 97 of file Segment.hpp.


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