DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
build
confmodel
codegen
src
StorageDevice.hpp
Go to the documentation of this file.
1
// *** this file is generated by oksdalgen, do not modify it ***
2
3
#ifndef _StorageDevice_0_dunedaq__confmodel_0_confmodel_H_
4
#define _StorageDevice_0_dunedaq__confmodel_0_confmodel_H_
5
6
#include <stdint.h>
// to define 64 bits types
7
#include <iostream>
8
#include <sstream>
9
#include <string>
10
#include <map>
11
#include <vector>
12
13
#include "
conffwk/Configuration.hpp
"
14
#include "
conffwk/DalObject.hpp
"
15
16
// include files for classes used in inheritance hierarchy
17
18
#include "
confmodel/HostComponent.hpp
"
19
20
namespace
dunedaq
{
21
namespace
confmodel
{
22
23
class
StorageDevice
:
public
dunedaq::confmodel::HostComponent {
24
25
friend
class
conffwk::Configuration
;
26
friend
class
conffwk::DalObject
;
27
friend
class
conffwk::DalFactory
;
28
friend
class
conffwk::DalRegistry
;
29
30
protected
:
31
32
StorageDevice
(
conffwk::DalRegistry
& db,
const
conffwk::ConfigObject
&
obj
)
noexcept
;
33
virtual
~StorageDevice
() noexcept;
34
virtual
void
init
(
bool
init_children);
35
36
public:
37
39
40
static const
std
::
string
&
s_class_name
;
41
42
51
52
virtual
void
print
(
unsigned
int
offset
,
bool
print_header,
std
::ostream& s) const;
53
54
63
64
virtual
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>
get
(const
std
::
string
& name,
bool
upcast_unregistered = true) const;
65
66
67
protected:
68
69
bool
get
(const
std
::
string
& name,
std
::vector<const
dunedaq
::
conffwk
::
DalObject
*>& vec,
bool
upcast_unregistered,
bool
first_call) const;
70
71
72
private:
73
74
uint32_t
m_storage
;
75
76
77
public:
78
79
// attribute names
80
81
inline static const
std
::
string
s_storage
=
"storage"
;
82
83
static const
std
::
string
&
__get_storage_str
() noexcept {
return
s_storage
; }
84
85
92
93
uint32_t
94
get_storage
()
const
95
{
96
std::lock_guard scoped_lock(
m_mutex
);
97
check
();
98
check_init
();
99
return
m_storage
;
100
}
101
108
109
void
110
set_storage
(uint32_t value)
111
{
112
std::lock_guard scoped_lock(
m_mutex
);
113
check
();
114
clear
();
115
p_obj
.set_by_val(
s_storage
, value);
116
}
117
118
119
};
120
121
// out stream operator
122
123
inline
std::ostream&
operator<<
(std::ostream& s,
const
StorageDevice&
obj
)
124
{
125
return
obj
.print_object(s);
126
}
127
128
typedef
std::vector<const StorageDevice*>::const_iterator
StorageDeviceIterator
;
129
130
}
131
}
132
133
#endif
DalObject.hpp
dunedaq::conffwk::DalObject::clear
void clear() noexcept
Definition
DalObject.hpp:83
dunedaq::conffwk::DalObject::m_mutex
std::mutex m_mutex
Used to protect changes of DAL object.
Definition
DalObject.hpp:115
dunedaq::conffwk::DalObject::check
void check() const
Definition
DalObject.hpp:94
dunedaq::conffwk::DalObject::p_obj
ConfigObject p_obj
Config object used by given template object.
Definition
DalObject.hpp:124
dunedaq::conffwk::DalObject::check_init
void check_init() const
Check and initialize object if necessary.
Definition
DalObject.hpp:412
dunedaq::conffwk::DalRegistry
DalRegistry: A registry of DalObjects It provides a single interface to create, cache and manage DalO...
Definition
DalRegistry.hpp:19
dunedaq::confmodel::StorageDevice
Definition
StorageDevice.hpp:23
dunedaq::confmodel::StorageDevice::DalRegistry
friend class conffwk::DalRegistry
Definition
StorageDevice.hpp:28
dunedaq::confmodel::StorageDevice::print
virtual void print(unsigned int offset, bool print_header, std::ostream &s) const
Print details of the StorageDevice object.
Definition
StorageDevice.cpp:35
dunedaq::confmodel::StorageDevice::StorageDevice
StorageDevice(conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
dunedaq::confmodel::StorageDevice::set_storage
void set_storage(uint32_t value)
Set "storage" attribute value. Amount of disk storage available for output data on this host in GB.
Definition
StorageDevice.hpp:110
dunedaq::confmodel::StorageDevice::get
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
StorageDevice.cpp:79
dunedaq::confmodel::StorageDevice::__get_storage_str
static const std::string & __get_storage_str() noexcept
Definition
StorageDevice.hpp:83
dunedaq::confmodel::StorageDevice::init
virtual void init(bool init_children)
Definition
StorageDevice.cpp:61
dunedaq::confmodel::StorageDevice::DalFactory
friend class conffwk::DalFactory
Definition
StorageDevice.hpp:27
dunedaq::confmodel::StorageDevice::s_class_name
static const std::string & s_class_name
Definition
StorageDevice.hpp:40
dunedaq::confmodel::StorageDevice::DalObject
friend class conffwk::DalObject
Definition
StorageDevice.hpp:26
dunedaq::confmodel::StorageDevice::~StorageDevice
virtual ~StorageDevice() noexcept
dunedaq::confmodel::StorageDevice::s_storage
static const std::string s_storage
Definition
StorageDevice.hpp:81
dunedaq::confmodel::StorageDevice::m_storage
uint32_t m_storage
Definition
StorageDevice.hpp:74
dunedaq::confmodel::StorageDevice::Configuration
friend class conffwk::Configuration
Definition
StorageDevice.hpp:25
dunedaq::confmodel::StorageDevice::get_storage
uint32_t get_storage() const
Get "storage" attribute value. Amount of disk storage available for output data on this host in GB.
Definition
StorageDevice.hpp:94
Configuration.hpp
conffwk entry point
offset
double offset
Definition
conversions-impl.hh:28
HostComponent.hpp
conffwk.ConfigObject
Definition
ConfigObject.py:1
conffwk
Definition
__init__.py:1
dunedaq::confmodel
Definition
DisabledResources.hpp:10
dunedaq::confmodel::StorageDeviceIterator
std::vector< constStorageDevice * >::const_iterator StorageDeviceIterator
Definition
StorageDevice.hpp:128
dunedaq::confmodel::operator<<
std::ostream & operator<<(std::ostream &s, const ActionPlan &obj)
Definition
ActionPlan.hpp:210
dunedaq
Including Qt Headers.
Definition
module.cpp:16
dunedaq::obj
msgpack::object obj
Definition
Serialization.hpp:257
std
Definition
SchemaUtils.hpp:118
Generated on
for DUNE-DAQ by
1.17.0