#include <TDEAMCModuleConf.hpp>
|
| TDEAMCModuleConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept |
|
virtual | ~TDEAMCModuleConf () 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 |
|
| TDEAMCModuleConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept |
|
virtual | ~TDEAMCModuleConf () 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 |
|
| 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.
|
|
|
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
|
|
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)
|
|
Definition at line 20 of file TDEAMCModuleConf.hpp.
◆ TDEAMCModuleConf() [1/2]
Definition at line 26 of file TDEAMCModuleConf.cpp.
26 :
28 {
29 ;
30 }
The base class for any generated DAL object.
◆ ~TDEAMCModuleConf() [1/2]
dunedaq::appmodel::TDEAMCModuleConf::~TDEAMCModuleConf |
( |
| ) |
|
|
protectedvirtualnoexcept |
◆ TDEAMCModuleConf() [2/2]
◆ ~TDEAMCModuleConf() [2/2]
virtual dunedaq::appmodel::TDEAMCModuleConf::~TDEAMCModuleConf |
( |
| ) |
|
|
protectedvirtualnoexcept |
◆ get() [1/4]
std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::TDEAMCModuleConf::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
-
name | name of the relationship or algorithm |
- Returns
- value of relationship or result of algorithm
- Exceptions
-
std::exception | if there is no relationship or algorithm with such name in this and base classes |
Implements dunedaq::conffwk::DalObject.
Definition at line 59 of file TDEAMCModuleConf.cpp.
60 {
61 std::vector<const dunedaq::conffwk::DalObject *> vec;
62
63 if (!
get(name, vec, upcast_unregistered,
true))
65
66 return vec;
67 }
static const std::string & s_class_name
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.
◆ get() [2/4]
virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::TDEAMCModuleConf::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
-
name | name of the relationship or algorithm |
- Returns
- value of relationship or result of algorithm
- Exceptions
-
std::exception | if there is no relationship or algorithm with such name in this and base classes |
Implements dunedaq::conffwk::DalObject.
◆ get() [3/4]
bool dunedaq::appmodel::TDEAMCModuleConf::get |
( |
const std::string & | name, |
|
|
std::vector< const dunedaq::conffwk::DalObject * > & | vec, |
|
|
bool | upcast_unregistered, |
|
|
bool | first_call ) const |
|
protected |
Definition at line 69 of file TDEAMCModuleConf.cpp.
70 {
71 if (first_call)
72 {
73 std::lock_guard scoped_lock(
m_mutex);
74
77
79 return true;
80 }
81
82 if (first_call)
84
85 return false;
86 }
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.
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.
void check_init() const
Check and initialize object if necessary.
◆ get() [4/4]
bool dunedaq::appmodel::TDEAMCModuleConf::get |
( |
const std::string & | name, |
|
|
std::vector< const dunedaq::conffwk::DalObject * > & | vec, |
|
|
bool | upcast_unregistered, |
|
|
bool | first_call ) const |
|
protected |
◆ init() [1/2]
void dunedaq::appmodel::TDEAMCModuleConf::init |
( |
bool | init_children | ) |
|
|
protectedvirtual |
Initialize object (method generated by genconffwk)
- Parameters
-
init_children | if true, initialize referenced objects |
Implements dunedaq::conffwk::DalObject.
Definition at line 48 of file TDEAMCModuleConf.cpp.
49 {
53 }
void increment_read() noexcept
bool p_was_read
is true, if the object was read
#define TLOG_DEBUG(lvl,...)
◆ init() [2/2]
virtual void dunedaq::appmodel::TDEAMCModuleConf::init |
( |
bool | init_children | ) |
|
|
protectedvirtual |
Initialize object (method generated by genconffwk)
- Parameters
-
init_children | if true, initialize referenced objects |
Implements dunedaq::conffwk::DalObject.
◆ print() [1/2]
void dunedaq::appmodel::TDEAMCModuleConf::print |
( |
unsigned int | offset, |
|
|
bool | print_header, |
|
|
std::ostream & | s ) const |
|
virtual |
Print details of the TDEAMCModuleConf object.
Parameters are:
- Parameters
-
offset | number of spaces to shift object right (useful to print nested objects) |
print_header | if false, do not print object header (to print attributes of base classes) |
s | output stream |
Implements dunedaq::conffwk::DalObject.
Definition at line 33 of file TDEAMCModuleConf.cpp.
34 {
36
37 try {
38
39 if (print_header)
41 }
42 catch (dunedaq::conffwk::Exception & ex) {
44 }
45 }
void p_hdr(std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
print object headers
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
◆ print() [2/2]
virtual void dunedaq::appmodel::TDEAMCModuleConf::print |
( |
unsigned int | offset, |
|
|
bool | print_header, |
|
|
std::ostream & | s ) const |
|
virtual |
Print details of the TDEAMCModuleConf object.
Parameters are:
- Parameters
-
offset | number of spaces to shift object right (useful to print nested objects) |
print_header | if false, do not print object header (to print attributes of base classes) |
s | output stream |
Implements dunedaq::conffwk::DalObject.
◆ conffwk::Configuration
◆ conffwk::DalFactory
◆ conffwk::DalObject
◆ conffwk::DalRegistry
◆ s_class_name
static const std::string & dunedaq::appmodel::TDEAMCModuleConf::s_class_name |
|
static |
The documentation for this class was generated from the following files: