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

#include <DummyExcludableEntitySetAND.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DummyExcludableEntitySetAND 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::ExcludableEntity * > & get_items () const
 Get "items" relationship value.
void set_items (const std::vector< const dunedaq::confmodel::ExcludableEntity * > &value)
 Set "items" relationship value.
virtual std::vector< const ExcludableEntity * > contained_excludable_entities () const
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DummyExcludableEntitySetAND 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::ExcludableEntity * > & get_items () const
 Get "items" relationship value.
void set_items (const std::vector< const dunedaq::confmodel::ExcludableEntity * > &value)
 Set "items" relationship value.
virtual std::vector< const ExcludableEntity * > contained_excludable_entities () const
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.

Static Public Member Functions

static const std::string & __get_items_str () noexcept
static const std::string & __get_items_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_items = "items"
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

Protected Member Functions

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

Private Attributes

std::vector< const dunedaq::confmodel::ExcludableEntity * > m_items

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 23 of file DummyExcludableEntitySetAND.hpp.

Constructor & Destructor Documentation

◆ DummyExcludableEntitySetAND() [1/2]

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

Definition at line 26 of file DummyExcludableEntitySetAND.cpp.

26 :
27 dunedaq::conffwk::DalObject(db, o),
29
30 {
31 ;
32 }
ExcludableEntitySetAND(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept

◆ ~DummyExcludableEntitySetAND() [1/2]

dunedaq::confmodel::DummyExcludableEntitySetAND::~DummyExcludableEntitySetAND ( )
protectedvirtualnoexcept

Definition at line 75 of file DummyExcludableEntitySetAND.cpp.

76 {
77 }

◆ DummyExcludableEntitySetAND() [2/2]

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

◆ ~DummyExcludableEntitySetAND() [2/2]

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

Member Function Documentation

◆ __get_items_str() [1/2]

const std::string & dunedaq::confmodel::DummyExcludableEntitySetAND::__get_items_str ( )
inlinestaticnoexcept

Definition at line 83 of file DummyExcludableEntitySetAND.hpp.

◆ __get_items_str() [2/2]

const std::string & dunedaq::confmodel::DummyExcludableEntitySetAND::__get_items_str ( )
inlinestaticnoexcept

Definition at line 83 of file DummyExcludableEntitySetAND.hpp.

83{ return s_items; }

◆ contained_excludable_entities() [1/2]

std::vector< const ExcludableEntity * > dunedaq::confmodel::DummyExcludableEntitySetAND::contained_excludable_entities ( ) const
virtual

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 117 of file DummyExcludableEntitySetAND.cpp.

118 {
119return to_resources(get_items());
120 }
const std::vector< const dunedaq::confmodel::ExcludableEntity * > & get_items() const
Get "items" relationship value.
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::confmodel::DummyExcludableEntitySetAND::contained_excludable_entities ( ) const
virtual

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.

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::DummyExcludableEntitySetAND::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 79 of file DummyExcludableEntitySetAND.cpp.

80 {
81 std::vector<const dunedaq::conffwk::DalObject *> vec;
82
83 if (!get(name, vec, upcast_unregistered, true))
84 throw_get_ex(name, s_class_name, this);
85
86 return vec;
87 }
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
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() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::DummyExcludableEntitySetAND::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::confmodel::DummyExcludableEntitySetAND::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 89 of file DummyExcludableEntitySetAND.cpp.

90 {
91 if (first_call)
92 {
93 std::lock_guard scoped_lock(m_mutex);
94
95 check();
96 check_init();
97
98 if (get_rel_objects(name, upcast_unregistered, vec))
99 return true;
100 }
101
102 if (ExcludableEntitySetAND::get(name, vec, upcast_unregistered, false)) return true;
103
104 if (first_call)
105 return get_algo_objects(name, vec);
106
107 return false;
108 }
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.
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::DummyExcludableEntitySetAND::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_items() [1/2]

const std::vector< const dunedaq::confmodel::ExcludableEntity * > & dunedaq::confmodel::DummyExcludableEntitySetAND::get_items ( ) const
inline

Get "items" relationship value.

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

Definition at line 93 of file DummyExcludableEntitySetAND.hpp.

94 {
95 std::lock_guard scoped_lock(m_mutex);
96 check();
97 check_init();
98 return m_items;
99 }
std::vector< const dunedaq::confmodel::ExcludableEntity * > m_items

◆ get_items() [2/2]

const std::vector< const dunedaq::confmodel::ExcludableEntity * > & dunedaq::confmodel::DummyExcludableEntitySetAND::get_items ( ) const
inline

Get "items" relationship value.

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

Definition at line 93 of file DummyExcludableEntitySetAND.hpp.

94 {
95 std::lock_guard scoped_lock(m_mutex);
96 check();
97 check_init();
98 return m_items;
99 }

◆ init() [1/2]

void dunedaq::confmodel::DummyExcludableEntitySetAND::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 61 of file DummyExcludableEntitySetAND.cpp.

62 {
63 ExcludableEntitySetAND::init(init_children);
64
65 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
66
67 try {
68 p_registry._ref<dunedaq::confmodel::ExcludableEntity>(p_obj, s_items, m_items, init_children);
69 }
70 catch (dunedaq::conffwk::Exception & ex) {
71 throw_init_ex(ex);
72 }
73 }
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).
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:116

◆ init() [2/2]

virtual void dunedaq::confmodel::DummyExcludableEntitySetAND::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::confmodel::DummyExcludableEntitySetAND::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DummyExcludableEntitySetAND 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 35 of file DummyExcludableEntitySetAND.cpp.

36 {
37 check_init();
38
39 try {
40 const std::string str(indent+2, ' ');
41
42 if (print_header)
43 p_hdr(s, indent, s_class_name, "dunedaq::confmodel");
44
45
46 // print direct super-classes
47
49
50
51 // print direct relationships
52
54 }
55 catch (dunedaq::conffwk::Exception & ex) {
57 }
58 }
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_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::DummyExcludableEntitySetAND::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DummyExcludableEntitySetAND 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_items() [1/2]

void dunedaq::confmodel::DummyExcludableEntitySetAND::set_items ( const std::vector< const dunedaq::confmodel::ExcludableEntity * > & value)

Set "items" relationship value.

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

Definition at line 110 of file DummyExcludableEntitySetAND.cpp.

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

◆ set_items() [2/2]

void dunedaq::confmodel::DummyExcludableEntitySetAND::set_items ( const std::vector< const dunedaq::confmodel::ExcludableEntity * > & value)

Set "items" relationship value.

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

◆ conffwk::Configuration

Definition at line 25 of file DummyExcludableEntitySetAND.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 27 of file DummyExcludableEntitySetAND.hpp.

◆ conffwk::DalObject

Definition at line 26 of file DummyExcludableEntitySetAND.hpp.

◆ conffwk::DalRegistry

Definition at line 28 of file DummyExcludableEntitySetAND.hpp.

Member Data Documentation

◆ m_items

std::vector< const dunedaq::confmodel::ExcludableEntity * > dunedaq::confmodel::DummyExcludableEntitySetAND::m_items
private

Definition at line 74 of file DummyExcludableEntitySetAND.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 40 of file DummyExcludableEntitySetAND.hpp.

◆ s_items

const std::string dunedaq::confmodel::DummyExcludableEntitySetAND::s_items = "items"
inlinestatic

Definition at line 81 of file DummyExcludableEntitySetAND.hpp.


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