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

#include <DataStoreConf.hpp>

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

Classes

struct  Mode
 

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataStoreConf 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_type () const
 Get "type" attribute value.
 
void set_type (const std::string &value)
 Set "type" attribute value.
 
const std::string & get_directory_path () const
 Get "directory_path" attribute value. The base directory for saving files.
 
void set_directory_path (const std::string &value)
 Set "directory_path" attribute value. The base directory for saving files.
 
const std::string & get_mode () const
 Get "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.
 
void set_mode (const std::string &value)
 Set "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.
 
uint64_t get_max_file_size () const
 Get "max_file_size" attribute value.
 
void set_max_file_size (uint64_t value)
 Set "max_file_size" attribute value.
 
bool get_disable_unique_filename_suffix () const
 Get "disable_unique_filename_suffix" attribute value.
 
void set_disable_unique_filename_suffix (bool value)
 Set "disable_unique_filename_suffix" attribute value.
 
int32_t get_free_space_safety_factor () const
 Get "free_space_safety_factor" attribute value.
 
void set_free_space_safety_factor (int32_t value)
 Set "free_space_safety_factor" attribute value.
 
uint8_t get_compression_level () const
 Get "compression_level" attribute value.
 
void set_compression_level (uint8_t value)
 Set "compression_level" attribute value.
 
const dunedaq::appmodel::HDF5FileLayoutParamsget_file_layout_params () const
 Get "file_layout_params" relationship value.
 
void set_file_layout_params (const dunedaq::appmodel::HDF5FileLayoutParams *value)
 Set "file_layout_params" relationship value.
 
const dunedaq::appmodel::FilenameParamsget_filename_params () const
 Get "filename_params" relationship value.
 
void set_filename_params (const dunedaq::appmodel::FilenameParams *value)
 Set "filename_params" relationship value.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataStoreConf 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_type () const
 Get "type" attribute value.
 
void set_type (const std::string &value)
 Set "type" attribute value.
 
const std::string & get_directory_path () const
 Get "directory_path" attribute value. The base directory for saving files.
 
void set_directory_path (const std::string &value)
 Set "directory_path" attribute value. The base directory for saving files.
 
const std::string & get_mode () const
 Get "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.
 
void set_mode (const std::string &value)
 Set "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.
 
uint64_t get_max_file_size () const
 Get "max_file_size" attribute value.
 
void set_max_file_size (uint64_t value)
 Set "max_file_size" attribute value.
 
bool get_disable_unique_filename_suffix () const
 Get "disable_unique_filename_suffix" attribute value.
 
void set_disable_unique_filename_suffix (bool value)
 Set "disable_unique_filename_suffix" attribute value.
 
int32_t get_free_space_safety_factor () const
 Get "free_space_safety_factor" attribute value.
 
void set_free_space_safety_factor (int32_t value)
 Set "free_space_safety_factor" attribute value.
 
uint8_t get_compression_level () const
 Get "compression_level" attribute value.
 
void set_compression_level (uint8_t value)
 Set "compression_level" attribute value.
 
const dunedaq::appmodel::HDF5FileLayoutParamsget_file_layout_params () const
 Get "file_layout_params" relationship value.
 
void set_file_layout_params (const dunedaq::appmodel::HDF5FileLayoutParams *value)
 Set "file_layout_params" relationship value.
 
const dunedaq::appmodel::FilenameParamsget_filename_params () const
 Get "filename_params" relationship value.
 
void set_filename_params (const dunedaq::appmodel::FilenameParams *value)
 Set "filename_params" relationship value.
 
- 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_type_str () noexcept
 
static const std::string & __get_directory_path_str () noexcept
 
static const std::string & __get_mode_str () noexcept
 
static const std::string & __get_max_file_size_str () noexcept
 
static const std::string & __get_disable_unique_filename_suffix_str () noexcept
 
static const std::string & __get_free_space_safety_factor_str () noexcept
 
static const std::string & __get_compression_level_str () noexcept
 
static const std::string & __get_file_layout_params_str () noexcept
 
static const std::string & __get_filename_params_str () noexcept
 
static const std::string & __get_type_str () noexcept
 
static const std::string & __get_directory_path_str () noexcept
 
static const std::string & __get_mode_str () noexcept
 
static const std::string & __get_max_file_size_str () noexcept
 
static const std::string & __get_disable_unique_filename_suffix_str () noexcept
 
static const std::string & __get_free_space_safety_factor_str () noexcept
 
static const std::string & __get_compression_level_str () noexcept
 
static const std::string & __get_file_layout_params_str () noexcept
 
static const std::string & __get_filename_params_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_type = "type"
 
static const std::string s_directory_path = "directory_path"
 
static const std::string s_mode = "mode"
 
static const std::string s_max_file_size = "max_file_size"
 
static const std::string s_disable_unique_filename_suffix = "disable_unique_filename_suffix"
 
static const std::string s_free_space_safety_factor = "free_space_safety_factor"
 
static const std::string s_compression_level = "compression_level"
 
static const std::string s_file_layout_params = "file_layout_params"
 
static const std::string s_filename_params = "filename_params"
 

Protected Member Functions

 DataStoreConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DataStoreConf () 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
 
 DataStoreConf (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~DataStoreConf () 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::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::string m_type
 
std::string m_directory_path
 
std::string m_mode
 
uint64_t m_max_file_size
 
bool m_disable_unique_filename_suffix
 
int32_t m_free_space_safety_factor
 
uint8_t m_compression_level
 
const dunedaq::appmodel::HDF5FileLayoutParamsm_file_layout_params
 
const dunedaq::appmodel::FilenameParamsm_filename_params
 

Friends

class conffwk::Configuration
 
class conffwk::DalObject
 
class conffwk::DalFactory
 
class conffwk::DalRegistry
 

Additional Inherited Members

- Protected Attributes inherited from dunedaq::conffwk::DalObject
std::mutex m_mutex
 Used to protect changes of DAL object.
 
bool p_was_read
 is true, if the object was read
 
DalRegistryp_registry
 Configuration object.
 
ConfigObject p_obj
 Config object used by given template object.
 
std::string p_UID
 Is used for template objects (see dqm_conffwk)
 

Detailed Description

Definition at line 30 of file DataStoreConf.hpp.

Constructor & Destructor Documentation

◆ DataStoreConf() [1/2]

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

Definition at line 32 of file DataStoreConf.cpp.

32 :
34 m_file_layout_params (nullptr),
35 m_filename_params (nullptr)
36
37 {
38 ;
39 }
const dunedaq::appmodel::FilenameParams * m_filename_params
const dunedaq::appmodel::HDF5FileLayoutParams * m_file_layout_params
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~DataStoreConf() [1/2]

dunedaq::appmodel::DataStoreConf::~DataStoreConf ( )
protectedvirtualnoexcept

Definition at line 97 of file DataStoreConf.cpp.

98 {
99 }

◆ DataStoreConf() [2/2]

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

◆ ~DataStoreConf() [2/2]

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

Member Function Documentation

◆ __get_compression_level_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_compression_level_str ( )
inlinestaticnoexcept

Definition at line 110 of file DataStoreConf.hpp.

110{ return s_compression_level; }
static const std::string s_compression_level

◆ __get_compression_level_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_compression_level_str ( )
inlinestaticnoexcept

Definition at line 110 of file DataStoreConf.hpp.

110{ return s_compression_level; }

◆ __get_directory_path_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_directory_path_str ( )
inlinestaticnoexcept

Definition at line 105 of file DataStoreConf.hpp.

105{ return s_directory_path; }
static const std::string s_directory_path

◆ __get_directory_path_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_directory_path_str ( )
inlinestaticnoexcept

Definition at line 105 of file DataStoreConf.hpp.

105{ return s_directory_path; }

◆ __get_disable_unique_filename_suffix_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_disable_unique_filename_suffix_str ( )
inlinestaticnoexcept

Definition at line 108 of file DataStoreConf.hpp.

static const std::string s_disable_unique_filename_suffix

◆ __get_disable_unique_filename_suffix_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_disable_unique_filename_suffix_str ( )
inlinestaticnoexcept

Definition at line 108 of file DataStoreConf.hpp.

◆ __get_file_layout_params_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_file_layout_params_str ( )
inlinestaticnoexcept

Definition at line 348 of file DataStoreConf.hpp.

348{ return s_file_layout_params; }
static const std::string s_file_layout_params

◆ __get_file_layout_params_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_file_layout_params_str ( )
inlinestaticnoexcept

Definition at line 348 of file DataStoreConf.hpp.

348{ return s_file_layout_params; }

◆ __get_filename_params_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_filename_params_str ( )
inlinestaticnoexcept

Definition at line 349 of file DataStoreConf.hpp.

349{ return s_filename_params; }
static const std::string s_filename_params

◆ __get_filename_params_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_filename_params_str ( )
inlinestaticnoexcept

Definition at line 349 of file DataStoreConf.hpp.

349{ return s_filename_params; }

◆ __get_free_space_safety_factor_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_free_space_safety_factor_str ( )
inlinestaticnoexcept

Definition at line 109 of file DataStoreConf.hpp.

static const std::string s_free_space_safety_factor

◆ __get_free_space_safety_factor_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_free_space_safety_factor_str ( )
inlinestaticnoexcept

Definition at line 109 of file DataStoreConf.hpp.

◆ __get_max_file_size_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_max_file_size_str ( )
inlinestaticnoexcept

Definition at line 107 of file DataStoreConf.hpp.

107{ return s_max_file_size; }
static const std::string s_max_file_size

◆ __get_max_file_size_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_max_file_size_str ( )
inlinestaticnoexcept

Definition at line 107 of file DataStoreConf.hpp.

107{ return s_max_file_size; }

◆ __get_mode_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_mode_str ( )
inlinestaticnoexcept

Definition at line 106 of file DataStoreConf.hpp.

106{ return s_mode; }
static const std::string s_mode

◆ __get_mode_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_mode_str ( )
inlinestaticnoexcept

Definition at line 106 of file DataStoreConf.hpp.

106{ return s_mode; }

◆ __get_type_str() [1/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_type_str ( )
inlinestaticnoexcept

Definition at line 104 of file DataStoreConf.hpp.

104{ return s_type; }
static const std::string s_type

◆ __get_type_str() [2/2]

static const std::string & dunedaq::appmodel::DataStoreConf::__get_type_str ( )
inlinestaticnoexcept

Definition at line 104 of file DataStoreConf.hpp.

104{ return s_type; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::DataStoreConf::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

Implements dunedaq::conffwk::DalObject.

Definition at line 101 of file DataStoreConf.cpp.

102 {
103 std::vector<const dunedaq::conffwk::DalObject *> vec;
104
105 if (!get(name, vec, upcast_unregistered, true))
106 throw_get_ex(name, s_class_name, this);
107
108 return vec;
109 }
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.
Definition DalObject.cpp:82

◆ get() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::DataStoreConf::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

Implements dunedaq::conffwk::DalObject.

◆ get() [3/4]

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

Definition at line 111 of file DataStoreConf.cpp.

112 {
113 if (first_call)
114 {
115 std::lock_guard scoped_lock(m_mutex);
116
117 check();
118 check_init();
119
120 if (get_rel_objects(name, upcast_unregistered, vec))
121 return true;
122 }
123
124 if (first_call)
125 return get_algo_objects(name, vec);
126
127 return false;
128 }
bool get_rel_objects(const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
Read relationship values as DAL objects using DAL factory.
Definition DalObject.cpp:8
std::mutex m_mutex
Used to protect changes of DAL object.
bool get_algo_objects(const std::string &name, std::vector< const DalObject * > &objs) const
Run algorithm and return result as DAL objects using DAL factory.
Definition DalObject.cpp:25
void check_init() const
Check and initialize object if necessary.

◆ get() [4/4]

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

◆ get_compression_level() [1/2]

uint8_t dunedaq::appmodel::DataStoreConf::get_compression_level ( ) const
inline

Get "compression_level" attribute value.

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

Definition at line 319 of file DataStoreConf.hpp.

320 {
321 std::lock_guard scoped_lock(m_mutex);
322 check();
323 check_init();
324 return m_compression_level;
325 }

◆ get_compression_level() [2/2]

uint8_t dunedaq::appmodel::DataStoreConf::get_compression_level ( ) const
inline

Get "compression_level" attribute value.

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

Definition at line 319 of file DataStoreConf.hpp.

320 {
321 std::lock_guard scoped_lock(m_mutex);
322 check();
323 check_init();
324 return m_compression_level;
325 }

◆ get_directory_path() [1/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_directory_path ( ) const
inline

Get "directory_path" attribute value. The base directory for saving files.

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

Definition at line 152 of file DataStoreConf.hpp.

153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 check_init();
157 return m_directory_path;
158 }

◆ get_directory_path() [2/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_directory_path ( ) const
inline

Get "directory_path" attribute value. The base directory for saving files.

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

Definition at line 152 of file DataStoreConf.hpp.

153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 check_init();
157 return m_directory_path;
158 }

◆ get_disable_unique_filename_suffix() [1/2]

bool dunedaq::appmodel::DataStoreConf::get_disable_unique_filename_suffix ( ) const
inline

Get "disable_unique_filename_suffix" attribute value.

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

Definition at line 257 of file DataStoreConf.hpp.

258 {
259 std::lock_guard scoped_lock(m_mutex);
260 check();
261 check_init();
263 }

◆ get_disable_unique_filename_suffix() [2/2]

bool dunedaq::appmodel::DataStoreConf::get_disable_unique_filename_suffix ( ) const
inline

Get "disable_unique_filename_suffix" attribute value.

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

Definition at line 257 of file DataStoreConf.hpp.

258 {
259 std::lock_guard scoped_lock(m_mutex);
260 check();
261 check_init();
263 }

◆ get_file_layout_params() [1/2]

const dunedaq::appmodel::HDF5FileLayoutParams * dunedaq::appmodel::DataStoreConf::get_file_layout_params ( ) const
inline

Get "file_layout_params" relationship value.

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

Definition at line 359 of file DataStoreConf.hpp.

360 {
361 std::lock_guard scoped_lock(m_mutex);
362 check();
363 check_init();
365 {
366 std::ostringstream text;
367 text << "relationship \"" << s_file_layout_params << "\" of object " << this << " is not set";
368 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
369 }
371 }
#define ERS_HERE
Generic configuration exception.

◆ get_file_layout_params() [2/2]

const dunedaq::appmodel::HDF5FileLayoutParams * dunedaq::appmodel::DataStoreConf::get_file_layout_params ( ) const
inline

Get "file_layout_params" relationship value.

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

Definition at line 359 of file DataStoreConf.hpp.

360 {
361 std::lock_guard scoped_lock(m_mutex);
362 check();
363 check_init();
365 {
366 std::ostringstream text;
367 text << "relationship \"" << s_file_layout_params << "\" of object " << this << " is not set";
368 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
369 }
371 }

◆ get_filename_params() [1/2]

const dunedaq::appmodel::FilenameParams * dunedaq::appmodel::DataStoreConf::get_filename_params ( ) const
inline

Get "filename_params" relationship value.

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

Definition at line 390 of file DataStoreConf.hpp.

391 {
392 std::lock_guard scoped_lock(m_mutex);
393 check();
394 check_init();
396 {
397 std::ostringstream text;
398 text << "relationship \"" << s_filename_params << "\" of object " << this << " is not set";
399 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
400 }
401 return m_filename_params;
402 }

◆ get_filename_params() [2/2]

const dunedaq::appmodel::FilenameParams * dunedaq::appmodel::DataStoreConf::get_filename_params ( ) const
inline

Get "filename_params" relationship value.

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

Definition at line 390 of file DataStoreConf.hpp.

391 {
392 std::lock_guard scoped_lock(m_mutex);
393 check();
394 check_init();
396 {
397 std::ostringstream text;
398 text << "relationship \"" << s_filename_params << "\" of object " << this << " is not set";
399 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
400 }
401 return m_filename_params;
402 }

◆ get_free_space_safety_factor() [1/2]

int32_t dunedaq::appmodel::DataStoreConf::get_free_space_safety_factor ( ) const
inline

Get "free_space_safety_factor" attribute value.

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

Definition at line 288 of file DataStoreConf.hpp.

289 {
290 std::lock_guard scoped_lock(m_mutex);
291 check();
292 check_init();
294 }

◆ get_free_space_safety_factor() [2/2]

int32_t dunedaq::appmodel::DataStoreConf::get_free_space_safety_factor ( ) const
inline

Get "free_space_safety_factor" attribute value.

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

Definition at line 288 of file DataStoreConf.hpp.

289 {
290 std::lock_guard scoped_lock(m_mutex);
291 check();
292 check_init();
294 }

◆ get_max_file_size() [1/2]

uint64_t dunedaq::appmodel::DataStoreConf::get_max_file_size ( ) const
inline

Get "max_file_size" attribute value.

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

Definition at line 226 of file DataStoreConf.hpp.

227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 check_init();
231 return m_max_file_size;
232 }

◆ get_max_file_size() [2/2]

uint64_t dunedaq::appmodel::DataStoreConf::get_max_file_size ( ) const
inline

Get "max_file_size" attribute value.

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

Definition at line 226 of file DataStoreConf.hpp.

227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 check_init();
231 return m_max_file_size;
232 }

◆ get_mode() [1/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_mode ( ) const
inline

Get "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.

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

Definition at line 194 of file DataStoreConf.hpp.

195 {
196 std::lock_guard scoped_lock(m_mutex);
197 check();
198 check_init();
199 return m_mode;
200 }

◆ get_mode() [2/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_mode ( ) const
inline

Get "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.

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

Definition at line 194 of file DataStoreConf.hpp.

195 {
196 std::lock_guard scoped_lock(m_mutex);
197 check();
198 check_init();
199 return m_mode;
200 }

◆ get_type() [1/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_type ( ) const
inline

Get "type" attribute value.

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

Definition at line 120 of file DataStoreConf.hpp.

121 {
122 std::lock_guard scoped_lock(m_mutex);
123 check();
124 check_init();
125 return m_type;
126 }

◆ get_type() [2/2]

const std::string & dunedaq::appmodel::DataStoreConf::get_type ( ) const
inline

Get "type" attribute value.

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

Definition at line 120 of file DataStoreConf.hpp.

121 {
122 std::lock_guard scoped_lock(m_mutex);
123 check();
124 check_init();
125 return m_type;
126 }

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

Definition at line 75 of file DataStoreConf.cpp.

76 {
77 p_was_read = true;
79 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
80
81 try {
91 }
92 catch (dunedaq::conffwk::Exception & ex) {
93 throw_init_ex(ex);
94 }
95 }
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.
void throw_init_ex(dunedaq::conffwk::Exception &ex)
throw object initialisation exception (i.e.
Definition DalObject.cpp:74
void increment_read() noexcept
DalRegistry & p_registry
Configuration object.
bool p_was_read
is true, if the object was read
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:112

◆ init() [2/2]

virtual void dunedaq::appmodel::DataStoreConf::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

◆ print() [1/2]

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

Print details of the DataStoreConf 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

Implements dunedaq::conffwk::DalObject.

Definition at line 42 of file DataStoreConf.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::appmodel");
51
52
53 // print direct attributes
54
62
63
64 // print direct relationships
65
68 }
69 catch (dunedaq::conffwk::Exception & ex) {
71 }
72 }
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
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_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::DataStoreConf::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DataStoreConf 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

Implements dunedaq::conffwk::DalObject.

◆ set_compression_level() [1/2]

void dunedaq::appmodel::DataStoreConf::set_compression_level ( uint8_t value)
inline

Set "compression_level" attribute value.

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

Definition at line 334 of file DataStoreConf.hpp.

335 {
336 std::lock_guard scoped_lock(m_mutex);
337 check();
338 clear();
340 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_compression_level() [2/2]

void dunedaq::appmodel::DataStoreConf::set_compression_level ( uint8_t value)
inline

Set "compression_level" attribute value.

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

Definition at line 334 of file DataStoreConf.hpp.

335 {
336 std::lock_guard scoped_lock(m_mutex);
337 check();
338 clear();
340 }

◆ set_directory_path() [1/2]

void dunedaq::appmodel::DataStoreConf::set_directory_path ( const std::string & value)
inline

Set "directory_path" attribute value. The base directory for saving files.

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

Definition at line 168 of file DataStoreConf.hpp.

169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 clear();
174 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_directory_path() [2/2]

void dunedaq::appmodel::DataStoreConf::set_directory_path ( const std::string & value)
inline

Set "directory_path" attribute value. The base directory for saving files.

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

Definition at line 168 of file DataStoreConf.hpp.

169 {
170 std::lock_guard scoped_lock(m_mutex);
171 check();
172 clear();
174 }

◆ set_disable_unique_filename_suffix() [1/2]

void dunedaq::appmodel::DataStoreConf::set_disable_unique_filename_suffix ( bool value)
inline

Set "disable_unique_filename_suffix" attribute value.

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

Definition at line 272 of file DataStoreConf.hpp.

273 {
274 std::lock_guard scoped_lock(m_mutex);
275 check();
276 clear();
278 }

◆ set_disable_unique_filename_suffix() [2/2]

void dunedaq::appmodel::DataStoreConf::set_disable_unique_filename_suffix ( bool value)
inline

Set "disable_unique_filename_suffix" attribute value.

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

Definition at line 272 of file DataStoreConf.hpp.

273 {
274 std::lock_guard scoped_lock(m_mutex);
275 check();
276 clear();
278 }

◆ set_file_layout_params() [1/2]

void dunedaq::appmodel::DataStoreConf::set_file_layout_params ( const dunedaq::appmodel::HDF5FileLayoutParams * value)

Set "file_layout_params" relationship value.

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

Definition at line 130 of file DataStoreConf.cpp.

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

◆ set_file_layout_params() [2/2]

void dunedaq::appmodel::DataStoreConf::set_file_layout_params ( const dunedaq::appmodel::HDF5FileLayoutParams * value)

Set "file_layout_params" relationship value.

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

◆ set_filename_params() [1/2]

void dunedaq::appmodel::DataStoreConf::set_filename_params ( const dunedaq::appmodel::FilenameParams * value)

Set "filename_params" relationship value.

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

Definition at line 135 of file DataStoreConf.cpp.

136 {
138 }

◆ set_filename_params() [2/2]

void dunedaq::appmodel::DataStoreConf::set_filename_params ( const dunedaq::appmodel::FilenameParams * value)

Set "filename_params" relationship value.

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

◆ set_free_space_safety_factor() [1/2]

void dunedaq::appmodel::DataStoreConf::set_free_space_safety_factor ( int32_t value)
inline

Set "free_space_safety_factor" attribute value.

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

Definition at line 303 of file DataStoreConf.hpp.

304 {
305 std::lock_guard scoped_lock(m_mutex);
306 check();
307 clear();
309 }

◆ set_free_space_safety_factor() [2/2]

void dunedaq::appmodel::DataStoreConf::set_free_space_safety_factor ( int32_t value)
inline

Set "free_space_safety_factor" attribute value.

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

Definition at line 303 of file DataStoreConf.hpp.

304 {
305 std::lock_guard scoped_lock(m_mutex);
306 check();
307 clear();
309 }

◆ set_max_file_size() [1/2]

void dunedaq::appmodel::DataStoreConf::set_max_file_size ( uint64_t value)
inline

Set "max_file_size" attribute value.

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

Definition at line 241 of file DataStoreConf.hpp.

242 {
243 std::lock_guard scoped_lock(m_mutex);
244 check();
245 clear();
247 }

◆ set_max_file_size() [2/2]

void dunedaq::appmodel::DataStoreConf::set_max_file_size ( uint64_t value)
inline

Set "max_file_size" attribute value.

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

Definition at line 241 of file DataStoreConf.hpp.

242 {
243 std::lock_guard scoped_lock(m_mutex);
244 check();
245 clear();
247 }

◆ set_mode() [1/2]

void dunedaq::appmodel::DataStoreConf::set_mode ( const std::string & value)
inline

Set "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.

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

Definition at line 210 of file DataStoreConf.hpp.

211 {
212 std::lock_guard scoped_lock(m_mutex);
213 check();
214 clear();
215 p_obj.set_enum(s_mode, value);
216 }
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration value.

◆ set_mode() [2/2]

void dunedaq::appmodel::DataStoreConf::set_mode ( const std::string & value)
inline

Set "mode" attribute value. The operation mode that the DataStore should use when organizing the data into files.

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

Definition at line 210 of file DataStoreConf.hpp.

211 {
212 std::lock_guard scoped_lock(m_mutex);
213 check();
214 clear();
215 p_obj.set_enum(s_mode, value);
216 }

◆ set_type() [1/2]

void dunedaq::appmodel::DataStoreConf::set_type ( const std::string & value)
inline

Set "type" attribute value.

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

Definition at line 135 of file DataStoreConf.hpp.

136 {
137 std::lock_guard scoped_lock(m_mutex);
138 check();
139 clear();
140 p_obj.set_by_ref(s_type, value);
141 }

◆ set_type() [2/2]

void dunedaq::appmodel::DataStoreConf::set_type ( const std::string & value)
inline

Set "type" attribute value.

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

Definition at line 135 of file DataStoreConf.hpp.

136 {
137 std::lock_guard scoped_lock(m_mutex);
138 check();
139 clear();
140 p_obj.set_by_ref(s_type, value);
141 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 32 of file DataStoreConf.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 34 of file DataStoreConf.hpp.

◆ conffwk::DalObject

Definition at line 33 of file DataStoreConf.hpp.

◆ conffwk::DalRegistry

Definition at line 35 of file DataStoreConf.hpp.

Member Data Documentation

◆ m_compression_level

uint8_t dunedaq::appmodel::DataStoreConf::m_compression_level
private

Definition at line 87 of file DataStoreConf.hpp.

◆ m_directory_path

std::string dunedaq::appmodel::DataStoreConf::m_directory_path
private

Definition at line 82 of file DataStoreConf.hpp.

◆ m_disable_unique_filename_suffix

bool dunedaq::appmodel::DataStoreConf::m_disable_unique_filename_suffix
private

Definition at line 85 of file DataStoreConf.hpp.

◆ m_file_layout_params

const dunedaq::appmodel::HDF5FileLayoutParams * dunedaq::appmodel::DataStoreConf::m_file_layout_params
private

Definition at line 88 of file DataStoreConf.hpp.

◆ m_filename_params

const dunedaq::appmodel::FilenameParams * dunedaq::appmodel::DataStoreConf::m_filename_params
private

Definition at line 89 of file DataStoreConf.hpp.

◆ m_free_space_safety_factor

int32_t dunedaq::appmodel::DataStoreConf::m_free_space_safety_factor
private

Definition at line 86 of file DataStoreConf.hpp.

◆ m_max_file_size

uint64_t dunedaq::appmodel::DataStoreConf::m_max_file_size
private

Definition at line 84 of file DataStoreConf.hpp.

◆ m_mode

std::string dunedaq::appmodel::DataStoreConf::m_mode
private

Definition at line 83 of file DataStoreConf.hpp.

◆ m_type

std::string dunedaq::appmodel::DataStoreConf::m_type
private

Definition at line 81 of file DataStoreConf.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 47 of file DataStoreConf.hpp.

◆ s_compression_level

static const std::string dunedaq::appmodel::DataStoreConf::s_compression_level = "compression_level"
inlinestatic

Definition at line 102 of file DataStoreConf.hpp.

◆ s_directory_path

static const std::string dunedaq::appmodel::DataStoreConf::s_directory_path = "directory_path"
inlinestatic

Definition at line 97 of file DataStoreConf.hpp.

◆ s_disable_unique_filename_suffix

static const std::string dunedaq::appmodel::DataStoreConf::s_disable_unique_filename_suffix = "disable_unique_filename_suffix"
inlinestatic

Definition at line 100 of file DataStoreConf.hpp.

◆ s_file_layout_params

static const std::string dunedaq::appmodel::DataStoreConf::s_file_layout_params = "file_layout_params"
inlinestatic

Definition at line 345 of file DataStoreConf.hpp.

◆ s_filename_params

static const std::string dunedaq::appmodel::DataStoreConf::s_filename_params = "filename_params"
inlinestatic

Definition at line 346 of file DataStoreConf.hpp.

◆ s_free_space_safety_factor

static const std::string dunedaq::appmodel::DataStoreConf::s_free_space_safety_factor = "free_space_safety_factor"
inlinestatic

Definition at line 101 of file DataStoreConf.hpp.

◆ s_max_file_size

static const std::string dunedaq::appmodel::DataStoreConf::s_max_file_size = "max_file_size"
inlinestatic

Definition at line 99 of file DataStoreConf.hpp.

◆ s_mode

static const std::string dunedaq::appmodel::DataStoreConf::s_mode = "mode"
inlinestatic

Definition at line 98 of file DataStoreConf.hpp.

◆ s_type

static const std::string dunedaq::appmodel::DataStoreConf::s_type = "type"
inlinestatic

Definition at line 96 of file DataStoreConf.hpp.


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