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

#include <DataHandlerModule.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataHandlerModule 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.
uint32_t get_source_id () const
 Get "source_id" attribute value.
void set_source_id (uint32_t value)
 Set "source_id" attribute value.
uint32_t get_detector_id () const
 Get "detector_id" attribute value.
void set_detector_id (uint32_t value)
 Set "detector_id" attribute value.
bool get_emulation_mode () const
 Get "emulation_mode" attribute value.
void set_emulation_mode (bool value)
 Set "emulation_mode" attribute value.
bool get_post_processing_enabled () const
 Get "post_processing_enabled" attribute value.
void set_post_processing_enabled (bool value)
 Set "post_processing_enabled" attribute value.
const dunedaq::confmodel::GeoIdget_geo_id () const
 Get "geo_id" relationship value.
void set_geo_id (const dunedaq::confmodel::GeoId *value)
 Set "geo_id" relationship value.
const dunedaq::appmodel::DataMoveCallbackConfget_raw_data_callback () const
 Get "raw_data_callback" relationship value. Configuration for raw data callback.
void set_raw_data_callback (const dunedaq::appmodel::DataMoveCallbackConf *value)
 Set "raw_data_callback" relationship value. Configuration for raw data callback.
const dunedaq::appmodel::DataHandlerConfget_module_configuration () const
 Get "module_configuration" relationship value.
void set_module_configuration (const dunedaq::appmodel::DataHandlerConf *value)
 Set "module_configuration" relationship value.
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DataHandlerModule 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.
uint32_t get_source_id () const
 Get "source_id" attribute value.
void set_source_id (uint32_t value)
 Set "source_id" attribute value.
uint32_t get_detector_id () const
 Get "detector_id" attribute value.
void set_detector_id (uint32_t value)
 Set "detector_id" attribute value.
bool get_emulation_mode () const
 Get "emulation_mode" attribute value.
void set_emulation_mode (bool value)
 Set "emulation_mode" attribute value.
bool get_post_processing_enabled () const
 Get "post_processing_enabled" attribute value.
void set_post_processing_enabled (bool value)
 Set "post_processing_enabled" attribute value.
const dunedaq::confmodel::GeoIdget_geo_id () const
 Get "geo_id" relationship value.
void set_geo_id (const dunedaq::confmodel::GeoId *value)
 Set "geo_id" relationship value.
const dunedaq::appmodel::DataMoveCallbackConfget_raw_data_callback () const
 Get "raw_data_callback" relationship value. Configuration for raw data callback.
void set_raw_data_callback (const dunedaq::appmodel::DataMoveCallbackConf *value)
 Set "raw_data_callback" relationship value. Configuration for raw data callback.
const dunedaq::appmodel::DataHandlerConfget_module_configuration () const
 Get "module_configuration" relationship value.
void set_module_configuration (const dunedaq::appmodel::DataHandlerConf *value)
 Set "module_configuration" relationship value.
Public Member Functions inherited from dunedaq::confmodel::DaqModule
const std::vector< const dunedaq::confmodel::Connection * > & get_inputs () const
 Get "inputs" relationship value. List of connections to/from this module.
void set_inputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "inputs" relationship value. List of connections to/from this module.
const std::vector< const dunedaq::confmodel::Connection * > & get_outputs () const
 Get "outputs" relationship value. Output connections from this module.
void set_outputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "outputs" relationship value. Output connections from this module.
const std::vector< const dunedaq::confmodel::HostComponent * > & get_used_resources () const
 Get "used_resources" relationship value.
void set_used_resources (const std::vector< const dunedaq::confmodel::HostComponent * > &value)
 Set "used_resources" relationship value.
const std::vector< const dunedaq::confmodel::Connection * > & get_inputs () const
 Get "inputs" relationship value. List of connections to/from this module.
void set_inputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "inputs" relationship value. List of connections to/from this module.
const std::vector< const dunedaq::confmodel::Connection * > & get_outputs () const
 Get "outputs" relationship value. Output connections from this module.
void set_outputs (const std::vector< const dunedaq::confmodel::Connection * > &value)
 Set "outputs" relationship value. Output connections from this module.
const std::vector< const dunedaq::confmodel::HostComponent * > & get_used_resources () const
 Get "used_resources" relationship value.
void set_used_resources (const std::vector< const dunedaq::confmodel::HostComponent * > &value)
 Set "used_resources" 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_source_id_str () noexcept
static const std::string & __get_detector_id_str () noexcept
static const std::string & __get_emulation_mode_str () noexcept
static const std::string & __get_post_processing_enabled_str () noexcept
static const std::string & __get_geo_id_str () noexcept
static const std::string & __get_raw_data_callback_str () noexcept
static const std::string & __get_module_configuration_str () noexcept
static const std::string & __get_source_id_str () noexcept
static const std::string & __get_detector_id_str () noexcept
static const std::string & __get_emulation_mode_str () noexcept
static const std::string & __get_post_processing_enabled_str () noexcept
static const std::string & __get_geo_id_str () noexcept
static const std::string & __get_raw_data_callback_str () noexcept
static const std::string & __get_module_configuration_str () noexcept
Static Public Member Functions inherited from dunedaq::confmodel::DaqModule
static const std::string & __get_inputs_str () noexcept
static const std::string & __get_outputs_str () noexcept
static const std::string & __get_used_resources_str () noexcept
static const std::string & __get_inputs_str () noexcept
static const std::string & __get_outputs_str () noexcept
static const std::string & __get_used_resources_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_source_id = "source_id"
static const std::string s_detector_id = "detector_id"
static const std::string s_emulation_mode = "emulation_mode"
static const std::string s_post_processing_enabled = "post_processing_enabled"
static const std::string s_geo_id = "geo_id"
static const std::string s_raw_data_callback = "raw_data_callback"
static const std::string s_module_configuration = "module_configuration"
Static Public Attributes inherited from dunedaq::confmodel::DaqModule
static const std::string & s_class_name
static const std::string s_inputs = "inputs"
static const std::string s_outputs = "outputs"
static const std::string s_used_resources = "used_resources"

Protected Member Functions

 DataHandlerModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~DataHandlerModule () 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
 DataHandlerModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~DataHandlerModule () 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::DaqModule
 DaqModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~DaqModule () noexcept
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 DaqModule (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
virtual ~DaqModule () 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

uint32_t m_source_id
uint32_t m_detector_id
bool m_emulation_mode
bool m_post_processing_enabled
const dunedaq::confmodel::GeoIdm_geo_id
const dunedaq::appmodel::DataMoveCallbackConfm_raw_data_callback
const dunedaq::appmodel::DataHandlerConfm_module_configuration

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 36 of file DataHandlerModule.hpp.

Constructor & Destructor Documentation

◆ DataHandlerModule() [1/2]

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

Definition at line 22 of file DataHandlerModule.cpp.

22 :
23 dunedaq::conffwk::DalObject(db, o),
24 dunedaq::confmodel::DaqModule(db, o),
25 m_geo_id (nullptr),
26 m_raw_data_callback (nullptr),
28
29 {
30 ;
31 }
const dunedaq::confmodel::GeoId * m_geo_id
const dunedaq::appmodel::DataMoveCallbackConf * m_raw_data_callback
const dunedaq::appmodel::DataHandlerConf * m_module_configuration

◆ ~DataHandlerModule() [1/2]

dunedaq::appmodel::DataHandlerModule::~DataHandlerModule ( )
protectedvirtualnoexcept

Definition at line 90 of file DataHandlerModule.cpp.

91 {
92 }

◆ DataHandlerModule() [2/2]

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

◆ ~DataHandlerModule() [2/2]

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

Member Function Documentation

◆ __get_detector_id_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_detector_id_str ( )
inlinestaticnoexcept

Definition at line 106 of file DataHandlerModule.hpp.

106{ return s_detector_id; }

◆ __get_detector_id_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_detector_id_str ( )
inlinestaticnoexcept

Definition at line 106 of file DataHandlerModule.hpp.

106{ return s_detector_id; }

◆ __get_emulation_mode_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_emulation_mode_str ( )
inlinestaticnoexcept

Definition at line 107 of file DataHandlerModule.hpp.

107{ return s_emulation_mode; }

◆ __get_emulation_mode_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_emulation_mode_str ( )
inlinestaticnoexcept

Definition at line 107 of file DataHandlerModule.hpp.

107{ return s_emulation_mode; }

◆ __get_geo_id_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_geo_id_str ( )
inlinestaticnoexcept

Definition at line 241 of file DataHandlerModule.hpp.

241{ return s_geo_id; }

◆ __get_geo_id_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_geo_id_str ( )
inlinestaticnoexcept

Definition at line 241 of file DataHandlerModule.hpp.

241{ return s_geo_id; }

◆ __get_module_configuration_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_module_configuration_str ( )
inlinestaticnoexcept

Definition at line 243 of file DataHandlerModule.hpp.

243{ return s_module_configuration; }
static const std::string s_module_configuration

◆ __get_module_configuration_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_module_configuration_str ( )
inlinestaticnoexcept

Definition at line 243 of file DataHandlerModule.hpp.

243{ return s_module_configuration; }

◆ __get_post_processing_enabled_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_post_processing_enabled_str ( )
inlinestaticnoexcept

Definition at line 108 of file DataHandlerModule.hpp.

static const std::string s_post_processing_enabled

◆ __get_post_processing_enabled_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_post_processing_enabled_str ( )
inlinestaticnoexcept

Definition at line 108 of file DataHandlerModule.hpp.

◆ __get_raw_data_callback_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_raw_data_callback_str ( )
inlinestaticnoexcept

Definition at line 242 of file DataHandlerModule.hpp.

242{ return s_raw_data_callback; }
static const std::string s_raw_data_callback

◆ __get_raw_data_callback_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_raw_data_callback_str ( )
inlinestaticnoexcept

Definition at line 242 of file DataHandlerModule.hpp.

242{ return s_raw_data_callback; }

◆ __get_source_id_str() [1/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_source_id_str ( )
inlinestaticnoexcept

Definition at line 105 of file DataHandlerModule.hpp.

105{ return s_source_id; }

◆ __get_source_id_str() [2/2]

const std::string & dunedaq::appmodel::DataHandlerModule::__get_source_id_str ( )
inlinestaticnoexcept

Definition at line 105 of file DataHandlerModule.hpp.

105{ return s_source_id; }

◆ get() [1/4]

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

Reimplemented in dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::TriggerDataHandlerModule, and dunedaq::appmodel::TriggerDataHandlerModule.

Definition at line 94 of file DataHandlerModule.cpp.

95 {
96 std::vector<const dunedaq::conffwk::DalObject *> vec;
97
98 if (!get(name, vec, upcast_unregistered, true))
99 throw_get_ex(name, s_class_name, this);
100
101 return vec;
102 }
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::DataHandlerModule::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::DaqModule.

Reimplemented in dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::TriggerDataHandlerModule, and dunedaq::appmodel::TriggerDataHandlerModule.

◆ get() [3/4]

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

Definition at line 104 of file DataHandlerModule.cpp.

105 {
106 if (first_call)
107 {
108 std::lock_guard scoped_lock(m_mutex);
109
110 check();
111 check_init();
112
113 if (get_rel_objects(name, upcast_unregistered, vec))
114 return true;
115 }
116
117 if (DaqModule::get(name, vec, upcast_unregistered, false)) return true;
118
119 if (first_call)
120 return get_algo_objects(name, vec);
121
122 return false;
123 }
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::DataHandlerModule::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_detector_id() [1/2]

uint32_t dunedaq::appmodel::DataHandlerModule::get_detector_id ( ) const
inline

Get "detector_id" attribute value.

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

Definition at line 149 of file DataHandlerModule.hpp.

150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 check_init();
154 return m_detector_id;
155 }

◆ get_detector_id() [2/2]

uint32_t dunedaq::appmodel::DataHandlerModule::get_detector_id ( ) const
inline

Get "detector_id" attribute value.

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

Definition at line 149 of file DataHandlerModule.hpp.

150 {
151 std::lock_guard scoped_lock(m_mutex);
152 check();
153 check_init();
154 return m_detector_id;
155 }

◆ get_emulation_mode() [1/2]

bool dunedaq::appmodel::DataHandlerModule::get_emulation_mode ( ) const
inline

Get "emulation_mode" attribute value.

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

Definition at line 180 of file DataHandlerModule.hpp.

181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_emulation_mode;
186 }

◆ get_emulation_mode() [2/2]

bool dunedaq::appmodel::DataHandlerModule::get_emulation_mode ( ) const
inline

Get "emulation_mode" attribute value.

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

Definition at line 180 of file DataHandlerModule.hpp.

181 {
182 std::lock_guard scoped_lock(m_mutex);
183 check();
184 check_init();
185 return m_emulation_mode;
186 }

◆ get_geo_id() [1/2]

const dunedaq::confmodel::GeoId * dunedaq::appmodel::DataHandlerModule::get_geo_id ( ) const
inline

Get "geo_id" relationship value.

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

Definition at line 253 of file DataHandlerModule.hpp.

254 {
255 std::lock_guard scoped_lock(m_mutex);
256 check();
257 check_init();
258 return m_geo_id;
259 }

◆ get_geo_id() [2/2]

const dunedaq::confmodel::GeoId * dunedaq::appmodel::DataHandlerModule::get_geo_id ( ) const
inline

Get "geo_id" relationship value.

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

Definition at line 253 of file DataHandlerModule.hpp.

254 {
255 std::lock_guard scoped_lock(m_mutex);
256 check();
257 check_init();
258 return m_geo_id;
259 }

◆ get_module_configuration() [1/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::DataHandlerModule::get_module_configuration ( ) const
inline

Get "module_configuration" relationship value.

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

Definition at line 305 of file DataHandlerModule.hpp.

306 {
307 std::lock_guard scoped_lock(m_mutex);
308 check();
309 check_init();
311 {
312 std::ostringstream text;
313 text << "relationship \"" << s_module_configuration << "\" of object " << this << " is not set";
314 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
315 }
317 }
#define ERS_HERE

◆ get_module_configuration() [2/2]

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::DataHandlerModule::get_module_configuration ( ) const
inline

Get "module_configuration" relationship value.

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

Definition at line 305 of file DataHandlerModule.hpp.

306 {
307 std::lock_guard scoped_lock(m_mutex);
308 check();
309 check_init();
311 {
312 std::ostringstream text;
313 text << "relationship \"" << s_module_configuration << "\" of object " << this << " is not set";
314 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
315 }
317 }

◆ get_post_processing_enabled() [1/2]

bool dunedaq::appmodel::DataHandlerModule::get_post_processing_enabled ( ) const
inline

Get "post_processing_enabled" attribute value.

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

Definition at line 211 of file DataHandlerModule.hpp.

212 {
213 std::lock_guard scoped_lock(m_mutex);
214 check();
215 check_init();
217 }

◆ get_post_processing_enabled() [2/2]

bool dunedaq::appmodel::DataHandlerModule::get_post_processing_enabled ( ) const
inline

Get "post_processing_enabled" attribute value.

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

Definition at line 211 of file DataHandlerModule.hpp.

212 {
213 std::lock_guard scoped_lock(m_mutex);
214 check();
215 check_init();
217 }

◆ get_raw_data_callback() [1/2]

const dunedaq::appmodel::DataMoveCallbackConf * dunedaq::appmodel::DataHandlerModule::get_raw_data_callback ( ) const
inline

Get "raw_data_callback" relationship value. Configuration for raw data callback.

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

Definition at line 279 of file DataHandlerModule.hpp.

280 {
281 std::lock_guard scoped_lock(m_mutex);
282 check();
283 check_init();
284 return m_raw_data_callback;
285 }

◆ get_raw_data_callback() [2/2]

const dunedaq::appmodel::DataMoveCallbackConf * dunedaq::appmodel::DataHandlerModule::get_raw_data_callback ( ) const
inline

Get "raw_data_callback" relationship value. Configuration for raw data callback.

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

Definition at line 279 of file DataHandlerModule.hpp.

280 {
281 std::lock_guard scoped_lock(m_mutex);
282 check();
283 check_init();
284 return m_raw_data_callback;
285 }

◆ get_source_id() [1/2]

uint32_t dunedaq::appmodel::DataHandlerModule::get_source_id ( ) const
inline

Get "source_id" attribute value.

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

Definition at line 118 of file DataHandlerModule.hpp.

119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 check_init();
123 return m_source_id;
124 }

◆ get_source_id() [2/2]

uint32_t dunedaq::appmodel::DataHandlerModule::get_source_id ( ) const
inline

Get "source_id" attribute value.

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

Definition at line 118 of file DataHandlerModule.hpp.

119 {
120 std::lock_guard scoped_lock(m_mutex);
121 check();
122 check_init();
123 return m_source_id;
124 }

◆ init() [1/2]

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

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Reimplemented from dunedaq::confmodel::DaqModule.

Reimplemented in dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::TriggerDataHandlerModule, and dunedaq::appmodel::TriggerDataHandlerModule.

Definition at line 70 of file DataHandlerModule.cpp.

71 {
72 DaqModule::init(init_children);
73
74 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
75
76 try {
81 m_geo_id = p_registry._ref<dunedaq::confmodel::GeoId>(p_obj, s_geo_id, init_children);
82 m_raw_data_callback = p_registry._ref<dunedaq::appmodel::DataMoveCallbackConf>(p_obj, s_raw_data_callback, init_children);
83 m_module_configuration = p_registry._ref<dunedaq::appmodel::DataHandlerConf>(p_obj, s_module_configuration, init_children);
84 }
85 catch (dunedaq::conffwk::Exception & ex) {
86 throw_init_ex(ex);
87 }
88 }
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.
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

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

◆ print() [1/2]

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

Print details of the DataHandlerModule 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::DaqModule.

Reimplemented in dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::TriggerDataHandlerModule, and dunedaq::appmodel::TriggerDataHandlerModule.

Definition at line 34 of file DataHandlerModule.cpp.

35 {
36 check_init();
37
38 try {
39 const std::string str(indent+2, ' ');
40
41 if (print_header)
42 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
43
44
45 // print direct super-classes
46
48
49
50 // print direct attributes
51
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 DaqModule object.
Definition DaqModule.cpp:28
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::DataHandlerModule::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DataHandlerModule 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::DaqModule.

Reimplemented in dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::FDDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::HSIDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::SNBDataHandlerModule, dunedaq::appmodel::TriggerDataHandlerModule, and dunedaq::appmodel::TriggerDataHandlerModule.

◆ set_detector_id() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_detector_id ( uint32_t value)
inline

Set "detector_id" attribute value.

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

Definition at line 164 of file DataHandlerModule.hpp.

165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 clear();
169 p_obj.set_by_val(s_detector_id, value);
170 }

◆ set_detector_id() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_detector_id ( uint32_t value)
inline

Set "detector_id" attribute value.

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

Definition at line 164 of file DataHandlerModule.hpp.

165 {
166 std::lock_guard scoped_lock(m_mutex);
167 check();
168 clear();
169 p_obj.set_by_val(s_detector_id, value);
170 }

◆ set_emulation_mode() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_emulation_mode ( bool value)
inline

Set "emulation_mode" attribute value.

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

Definition at line 195 of file DataHandlerModule.hpp.

196 {
197 std::lock_guard scoped_lock(m_mutex);
198 check();
199 clear();
200 p_obj.set_by_val(s_emulation_mode, value);
201 }

◆ set_emulation_mode() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_emulation_mode ( bool value)
inline

Set "emulation_mode" attribute value.

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

Definition at line 195 of file DataHandlerModule.hpp.

196 {
197 std::lock_guard scoped_lock(m_mutex);
198 check();
199 clear();
200 p_obj.set_by_val(s_emulation_mode, value);
201 }

◆ set_geo_id() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_geo_id ( const dunedaq::confmodel::GeoId * value)

Set "geo_id" relationship value.

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

Definition at line 125 of file DataHandlerModule.cpp.

126 {
127 _set_object(s_geo_id, value);
128 }
void _set_object(const std::string &name, const T *value)
Helper method for generated set single-value relationship methods.

◆ set_geo_id() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_geo_id ( const dunedaq::confmodel::GeoId * value)

Set "geo_id" relationship value.

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

◆ set_module_configuration() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_module_configuration ( const dunedaq::appmodel::DataHandlerConf * value)

Set "module_configuration" relationship value.

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

Definition at line 135 of file DataHandlerModule.cpp.

136 {
138 }

◆ set_module_configuration() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_module_configuration ( const dunedaq::appmodel::DataHandlerConf * value)

Set "module_configuration" relationship value.

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

◆ set_post_processing_enabled() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_post_processing_enabled ( bool value)
inline

Set "post_processing_enabled" attribute value.

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

Definition at line 226 of file DataHandlerModule.hpp.

227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 clear();
231 p_obj.set_by_val(s_post_processing_enabled, value);
232 }

◆ set_post_processing_enabled() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_post_processing_enabled ( bool value)
inline

Set "post_processing_enabled" attribute value.

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

Definition at line 226 of file DataHandlerModule.hpp.

227 {
228 std::lock_guard scoped_lock(m_mutex);
229 check();
230 clear();
231 p_obj.set_by_val(s_post_processing_enabled, value);
232 }

◆ set_raw_data_callback() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_raw_data_callback ( const dunedaq::appmodel::DataMoveCallbackConf * value)

Set "raw_data_callback" relationship value. Configuration for raw data callback.

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

Definition at line 130 of file DataHandlerModule.cpp.

131 {
133 }

◆ set_raw_data_callback() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_raw_data_callback ( const dunedaq::appmodel::DataMoveCallbackConf * value)

Set "raw_data_callback" relationship value. Configuration for raw data callback.

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

◆ set_source_id() [1/2]

void dunedaq::appmodel::DataHandlerModule::set_source_id ( uint32_t value)
inline

Set "source_id" attribute value.

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

Definition at line 133 of file DataHandlerModule.hpp.

134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 clear();
138 p_obj.set_by_val(s_source_id, value);
139 }

◆ set_source_id() [2/2]

void dunedaq::appmodel::DataHandlerModule::set_source_id ( uint32_t value)
inline

Set "source_id" attribute value.

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

Definition at line 133 of file DataHandlerModule.hpp.

134 {
135 std::lock_guard scoped_lock(m_mutex);
136 check();
137 clear();
138 p_obj.set_by_val(s_source_id, value);
139 }

◆ conffwk::Configuration

Definition at line 38 of file DataHandlerModule.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 40 of file DataHandlerModule.hpp.

◆ conffwk::DalObject

Definition at line 39 of file DataHandlerModule.hpp.

◆ conffwk::DalRegistry

Definition at line 41 of file DataHandlerModule.hpp.

Member Data Documentation

◆ m_detector_id

uint32_t dunedaq::appmodel::DataHandlerModule::m_detector_id
private

Definition at line 88 of file DataHandlerModule.hpp.

◆ m_emulation_mode

bool dunedaq::appmodel::DataHandlerModule::m_emulation_mode
private

Definition at line 89 of file DataHandlerModule.hpp.

◆ m_geo_id

const dunedaq::confmodel::GeoId * dunedaq::appmodel::DataHandlerModule::m_geo_id
private

Definition at line 91 of file DataHandlerModule.hpp.

◆ m_module_configuration

const dunedaq::appmodel::DataHandlerConf * dunedaq::appmodel::DataHandlerModule::m_module_configuration
private

Definition at line 93 of file DataHandlerModule.hpp.

◆ m_post_processing_enabled

bool dunedaq::appmodel::DataHandlerModule::m_post_processing_enabled
private

Definition at line 90 of file DataHandlerModule.hpp.

◆ m_raw_data_callback

const dunedaq::appmodel::DataMoveCallbackConf * dunedaq::appmodel::DataHandlerModule::m_raw_data_callback
private

Definition at line 92 of file DataHandlerModule.hpp.

◆ m_source_id

uint32_t dunedaq::appmodel::DataHandlerModule::m_source_id
private

Definition at line 87 of file DataHandlerModule.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 53 of file DataHandlerModule.hpp.

◆ s_detector_id

const std::string dunedaq::appmodel::DataHandlerModule::s_detector_id = "detector_id"
inlinestatic

Definition at line 101 of file DataHandlerModule.hpp.

◆ s_emulation_mode

const std::string dunedaq::appmodel::DataHandlerModule::s_emulation_mode = "emulation_mode"
inlinestatic

Definition at line 102 of file DataHandlerModule.hpp.

◆ s_geo_id

const std::string dunedaq::appmodel::DataHandlerModule::s_geo_id = "geo_id"
inlinestatic

Definition at line 237 of file DataHandlerModule.hpp.

◆ s_module_configuration

const std::string dunedaq::appmodel::DataHandlerModule::s_module_configuration = "module_configuration"
inlinestatic

Definition at line 239 of file DataHandlerModule.hpp.

◆ s_post_processing_enabled

const std::string dunedaq::appmodel::DataHandlerModule::s_post_processing_enabled = "post_processing_enabled"
inlinestatic

Definition at line 103 of file DataHandlerModule.hpp.

◆ s_raw_data_callback

const std::string dunedaq::appmodel::DataHandlerModule::s_raw_data_callback = "raw_data_callback"
inlinestatic

Definition at line 238 of file DataHandlerModule.hpp.

◆ s_source_id

const std::string dunedaq::appmodel::DataHandlerModule::s_source_id = "source_id"
inlinestatic

Definition at line 100 of file DataHandlerModule.hpp.


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