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

#include <DaphneV2AFE.hpp>

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

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DaphneV2AFE 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.
 
uint8_t get_afe_id () const
 Get "afe_id" attribute value. id in the [0,5) range.
 
void set_afe_id (uint8_t value)
 Set "afe_id" attribute value. id in the [0,5) range.
 
uint16_t get_attenuator () const
 Get "attenuator" attribute value.
 
void set_attenuator (uint16_t value)
 Set "attenuator" attribute value.
 
uint16_t get_v_bias () const
 Get "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

 
void set_v_bias (uint16_t value)
 Set "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

 
const dunedaq::appmodel::DaphneV2ADCget_adc () const
 Get "adc" relationship value.
 
void set_adc (const dunedaq::appmodel::DaphneV2ADC *value)
 Set "adc" relationship value.
 
const dunedaq::appmodel::DaphneV2PGAget_pga () const
 Get "pga" relationship value.
 
void set_pga (const dunedaq::appmodel::DaphneV2PGA *value)
 Set "pga" relationship value.
 
const dunedaq::appmodel::DaphneV2LNAget_lna () const
 Get "lna" relationship value.
 
void set_lna (const dunedaq::appmodel::DaphneV2LNA *value)
 Set "lna" relationship value.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the DaphneV2AFE 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.
 
uint8_t get_afe_id () const
 Get "afe_id" attribute value. id in the [0,5) range.
 
void set_afe_id (uint8_t value)
 Set "afe_id" attribute value. id in the [0,5) range.
 
uint16_t get_attenuator () const
 Get "attenuator" attribute value.
 
void set_attenuator (uint16_t value)
 Set "attenuator" attribute value.
 
uint16_t get_v_bias () const
 Get "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

 
void set_v_bias (uint16_t value)
 Set "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

 
const dunedaq::appmodel::DaphneV2ADCget_adc () const
 Get "adc" relationship value.
 
void set_adc (const dunedaq::appmodel::DaphneV2ADC *value)
 Set "adc" relationship value.
 
const dunedaq::appmodel::DaphneV2PGAget_pga () const
 Get "pga" relationship value.
 
void set_pga (const dunedaq::appmodel::DaphneV2PGA *value)
 Set "pga" relationship value.
 
const dunedaq::appmodel::DaphneV2LNAget_lna () const
 Get "lna" relationship value.
 
void set_lna (const dunedaq::appmodel::DaphneV2LNA *value)
 Set "lna" 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_afe_id_str () noexcept
 
static const std::string & __get_attenuator_str () noexcept
 
static const std::string & __get_v_bias_str () noexcept
 
static const std::string & __get_adc_str () noexcept
 
static const std::string & __get_pga_str () noexcept
 
static const std::string & __get_lna_str () noexcept
 
static const std::string & __get_afe_id_str () noexcept
 
static const std::string & __get_attenuator_str () noexcept
 
static const std::string & __get_v_bias_str () noexcept
 
static const std::string & __get_adc_str () noexcept
 
static const std::string & __get_pga_str () noexcept
 
static const std::string & __get_lna_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_afe_id = "afe_id"
 
static const std::string s_attenuator = "attenuator"
 
static const std::string s_v_bias = "v_bias"
 
static const std::string s_adc = "adc"
 
static const std::string s_pga = "pga"
 
static const std::string s_lna = "lna"
 

Protected Member Functions

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

uint8_t m_afe_id
 
uint16_t m_attenuator
 
uint16_t m_v_bias
 
const dunedaq::appmodel::DaphneV2ADCm_adc
 
const dunedaq::appmodel::DaphneV2PGAm_pga
 
const dunedaq::appmodel::DaphneV2LNAm_lna
 

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 31 of file DaphneV2AFE.hpp.

Constructor & Destructor Documentation

◆ DaphneV2AFE() [1/2]

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

Definition at line 33 of file DaphneV2AFE.cpp.

33 :
35 m_adc (nullptr),
36 m_pga (nullptr),
37 m_lna (nullptr)
38
39 {
40 ;
41 }
const dunedaq::appmodel::DaphneV2ADC * m_adc
const dunedaq::appmodel::DaphneV2PGA * m_pga
const dunedaq::appmodel::DaphneV2LNA * m_lna
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~DaphneV2AFE() [1/2]

dunedaq::appmodel::DaphneV2AFE::~DaphneV2AFE ( )
protectedvirtualnoexcept

Definition at line 93 of file DaphneV2AFE.cpp.

94 {
95 }

◆ DaphneV2AFE() [2/2]

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

◆ ~DaphneV2AFE() [2/2]

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

Member Function Documentation

◆ __get_adc_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_adc_str ( )
inlinestaticnoexcept

Definition at line 208 of file DaphneV2AFE.hpp.

208{ return s_adc; }
static const std::string s_adc

◆ __get_adc_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_adc_str ( )
inlinestaticnoexcept

Definition at line 208 of file DaphneV2AFE.hpp.

208{ return s_adc; }

◆ __get_afe_id_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_afe_id_str ( )
inlinestaticnoexcept

Definition at line 98 of file DaphneV2AFE.hpp.

98{ return s_afe_id; }
static const std::string s_afe_id

◆ __get_afe_id_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_afe_id_str ( )
inlinestaticnoexcept

Definition at line 98 of file DaphneV2AFE.hpp.

98{ return s_afe_id; }

◆ __get_attenuator_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_attenuator_str ( )
inlinestaticnoexcept

Definition at line 99 of file DaphneV2AFE.hpp.

99{ return s_attenuator; }
static const std::string s_attenuator

◆ __get_attenuator_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_attenuator_str ( )
inlinestaticnoexcept

Definition at line 99 of file DaphneV2AFE.hpp.

99{ return s_attenuator; }

◆ __get_lna_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_lna_str ( )
inlinestaticnoexcept

Definition at line 210 of file DaphneV2AFE.hpp.

210{ return s_lna; }
static const std::string s_lna

◆ __get_lna_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_lna_str ( )
inlinestaticnoexcept

Definition at line 210 of file DaphneV2AFE.hpp.

210{ return s_lna; }

◆ __get_pga_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_pga_str ( )
inlinestaticnoexcept

Definition at line 209 of file DaphneV2AFE.hpp.

209{ return s_pga; }
static const std::string s_pga

◆ __get_pga_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_pga_str ( )
inlinestaticnoexcept

Definition at line 209 of file DaphneV2AFE.hpp.

209{ return s_pga; }

◆ __get_v_bias_str() [1/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_v_bias_str ( )
inlinestaticnoexcept

Definition at line 100 of file DaphneV2AFE.hpp.

100{ return s_v_bias; }
static const std::string s_v_bias

◆ __get_v_bias_str() [2/2]

static const std::string & dunedaq::appmodel::DaphneV2AFE::__get_v_bias_str ( )
inlinestaticnoexcept

Definition at line 100 of file DaphneV2AFE.hpp.

100{ return s_v_bias; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::appmodel::DaphneV2AFE::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 97 of file DaphneV2AFE.cpp.

98 {
99 std::vector<const dunedaq::conffwk::DalObject *> vec;
100
101 if (!get(name, vec, upcast_unregistered, true))
102 throw_get_ex(name, s_class_name, this);
103
104 return vec;
105 }
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::DaphneV2AFE::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::DaphneV2AFE::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 107 of file DaphneV2AFE.cpp.

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

◆ get_adc() [1/2]

const dunedaq::appmodel::DaphneV2ADC * dunedaq::appmodel::DaphneV2AFE::get_adc ( ) const
inline

Get "adc" relationship value.

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

Definition at line 220 of file DaphneV2AFE.hpp.

221 {
222 std::lock_guard scoped_lock(m_mutex);
223 check();
224 check_init();
225 if (!m_adc)
226 {
227 std::ostringstream text;
228 text << "relationship \"" << s_adc << "\" of object " << this << " is not set";
229 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
230 }
231 return m_adc;
232 }
#define ERS_HERE
Generic configuration exception.

◆ get_adc() [2/2]

const dunedaq::appmodel::DaphneV2ADC * dunedaq::appmodel::DaphneV2AFE::get_adc ( ) const
inline

Get "adc" relationship value.

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

Definition at line 220 of file DaphneV2AFE.hpp.

221 {
222 std::lock_guard scoped_lock(m_mutex);
223 check();
224 check_init();
225 if (!m_adc)
226 {
227 std::ostringstream text;
228 text << "relationship \"" << s_adc << "\" of object " << this << " is not set";
229 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
230 }
231 return m_adc;
232 }

◆ get_afe_id() [1/2]

uint8_t dunedaq::appmodel::DaphneV2AFE::get_afe_id ( ) const
inline

Get "afe_id" attribute value. id in the [0,5) range.

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

Definition at line 111 of file DaphneV2AFE.hpp.

112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_afe_id;
117 }

◆ get_afe_id() [2/2]

uint8_t dunedaq::appmodel::DaphneV2AFE::get_afe_id ( ) const
inline

Get "afe_id" attribute value. id in the [0,5) range.

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

Definition at line 111 of file DaphneV2AFE.hpp.

112 {
113 std::lock_guard scoped_lock(m_mutex);
114 check();
115 check_init();
116 return m_afe_id;
117 }

◆ get_attenuator() [1/2]

uint16_t dunedaq::appmodel::DaphneV2AFE::get_attenuator ( ) const
inline

Get "attenuator" attribute value.

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

Definition at line 143 of file DaphneV2AFE.hpp.

144 {
145 std::lock_guard scoped_lock(m_mutex);
146 check();
147 check_init();
148 return m_attenuator;
149 }

◆ get_attenuator() [2/2]

uint16_t dunedaq::appmodel::DaphneV2AFE::get_attenuator ( ) const
inline

Get "attenuator" attribute value.

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

Definition at line 143 of file DaphneV2AFE.hpp.

144 {
145 std::lock_guard scoped_lock(m_mutex);
146 check();
147 check_init();
148 return m_attenuator;
149 }

◆ get_lna() [1/2]

const dunedaq::appmodel::DaphneV2LNA * dunedaq::appmodel::DaphneV2AFE::get_lna ( ) const
inline

Get "lna" relationship value.

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

Definition at line 282 of file DaphneV2AFE.hpp.

283 {
284 std::lock_guard scoped_lock(m_mutex);
285 check();
286 check_init();
287 if (!m_lna)
288 {
289 std::ostringstream text;
290 text << "relationship \"" << s_lna << "\" of object " << this << " is not set";
291 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
292 }
293 return m_lna;
294 }

◆ get_lna() [2/2]

const dunedaq::appmodel::DaphneV2LNA * dunedaq::appmodel::DaphneV2AFE::get_lna ( ) const
inline

Get "lna" relationship value.

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

Definition at line 282 of file DaphneV2AFE.hpp.

283 {
284 std::lock_guard scoped_lock(m_mutex);
285 check();
286 check_init();
287 if (!m_lna)
288 {
289 std::ostringstream text;
290 text << "relationship \"" << s_lna << "\" of object " << this << " is not set";
291 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
292 }
293 return m_lna;
294 }

◆ get_pga() [1/2]

const dunedaq::appmodel::DaphneV2PGA * dunedaq::appmodel::DaphneV2AFE::get_pga ( ) const
inline

Get "pga" relationship value.

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

Definition at line 251 of file DaphneV2AFE.hpp.

252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
256 if (!m_pga)
257 {
258 std::ostringstream text;
259 text << "relationship \"" << s_pga << "\" of object " << this << " is not set";
260 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
261 }
262 return m_pga;
263 }

◆ get_pga() [2/2]

const dunedaq::appmodel::DaphneV2PGA * dunedaq::appmodel::DaphneV2AFE::get_pga ( ) const
inline

Get "pga" relationship value.

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

Definition at line 251 of file DaphneV2AFE.hpp.

252 {
253 std::lock_guard scoped_lock(m_mutex);
254 check();
255 check_init();
256 if (!m_pga)
257 {
258 std::ostringstream text;
259 text << "relationship \"" << s_pga << "\" of object " << this << " is not set";
260 throw dunedaq::conffwk::Generic(ERS_HERE, text.str().c_str());
261 }
262 return m_pga;
263 }

◆ get_v_bias() [1/2]

uint16_t dunedaq::appmodel::DaphneV2AFE::get_v_bias ( ) const
inline

Get "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

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

Definition at line 176 of file DaphneV2AFE.hpp.

177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 check_init();
181 return m_v_bias;
182 }

◆ get_v_bias() [2/2]

uint16_t dunedaq::appmodel::DaphneV2AFE::get_v_bias ( ) const
inline

Get "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

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

Definition at line 176 of file DaphneV2AFE.hpp.

177 {
178 std::lock_guard scoped_lock(m_mutex);
179 check();
180 check_init();
181 return m_v_bias;
182 }

◆ init() [1/2]

void dunedaq::appmodel::DaphneV2AFE::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 74 of file DaphneV2AFE.cpp.

75 {
76 p_was_read = true;
78 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
79
80 try {
87 }
88 catch (dunedaq::conffwk::Exception & ex) {
89 throw_init_ex(ex);
90 }
91 }
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::DaphneV2AFE::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::DaphneV2AFE::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the DaphneV2AFE 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 44 of file DaphneV2AFE.cpp.

45 {
46 check_init();
47
48 try {
49 const std::string str(indent+2, ' ');
50
51 if (print_header)
52 p_hdr(s, indent, s_class_name, "dunedaq::appmodel");
53
54
55 // print direct attributes
56
60
61
62 // print direct relationships
63
64 dunedaq::conffwk::p_sv_rel(s, str, indent, s_adc, m_adc);
65 dunedaq::conffwk::p_sv_rel(s, str, indent, s_pga, m_pga);
66 dunedaq::conffwk::p_sv_rel(s, str, indent, s_lna, m_lna);
67 }
68 catch (dunedaq::conffwk::Exception & ex) {
70 }
71 }
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::DaphneV2AFE::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

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

void dunedaq::appmodel::DaphneV2AFE::set_adc ( const dunedaq::appmodel::DaphneV2ADC * value)

Set "adc" relationship value.

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

Definition at line 126 of file DaphneV2AFE.cpp.

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

◆ set_adc() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_adc ( const dunedaq::appmodel::DaphneV2ADC * value)

Set "adc" relationship value.

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

◆ set_afe_id() [1/2]

void dunedaq::appmodel::DaphneV2AFE::set_afe_id ( uint8_t value)
inline

Set "afe_id" attribute value. id in the [0,5) range.

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

Definition at line 127 of file DaphneV2AFE.hpp.

128 {
129 std::lock_guard scoped_lock(m_mutex);
130 check();
131 clear();
132 p_obj.set_by_val(s_afe_id, value);
133 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_afe_id() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_afe_id ( uint8_t value)
inline

Set "afe_id" attribute value. id in the [0,5) range.

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

Definition at line 127 of file DaphneV2AFE.hpp.

128 {
129 std::lock_guard scoped_lock(m_mutex);
130 check();
131 clear();
132 p_obj.set_by_val(s_afe_id, value);
133 }

◆ set_attenuator() [1/2]

void dunedaq::appmodel::DaphneV2AFE::set_attenuator ( uint16_t value)
inline

Set "attenuator" attribute value.

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

Definition at line 158 of file DaphneV2AFE.hpp.

159 {
160 std::lock_guard scoped_lock(m_mutex);
161 check();
162 clear();
164 }

◆ set_attenuator() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_attenuator ( uint16_t value)
inline

Set "attenuator" attribute value.

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

Definition at line 158 of file DaphneV2AFE.hpp.

159 {
160 std::lock_guard scoped_lock(m_mutex);
161 check();
162 clear();
164 }

◆ set_lna() [1/2]

void dunedaq::appmodel::DaphneV2AFE::set_lna ( const dunedaq::appmodel::DaphneV2LNA * value)

Set "lna" relationship value.

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

Definition at line 136 of file DaphneV2AFE.cpp.

137 {
138 _set_object(s_lna, value);
139 }

◆ set_lna() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_lna ( const dunedaq::appmodel::DaphneV2LNA * value)

Set "lna" relationship value.

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

◆ set_pga() [1/2]

void dunedaq::appmodel::DaphneV2AFE::set_pga ( const dunedaq::appmodel::DaphneV2PGA * value)

Set "pga" relationship value.

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

Definition at line 131 of file DaphneV2AFE.cpp.

132 {
133 _set_object(s_pga, value);
134 }

◆ set_pga() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_pga ( const dunedaq::appmodel::DaphneV2PGA * value)

Set "pga" relationship value.

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

◆ set_v_bias() [1/2]

void dunedaq::appmodel::DaphneV2AFE::set_v_bias ( uint16_t value)
inline

Set "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

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

Definition at line 193 of file DaphneV2AFE.hpp.

194 {
195 std::lock_guard scoped_lock(m_mutex);
196 check();
197 clear();
198 p_obj.set_by_val(s_v_bias, value);
199 }

◆ set_v_bias() [2/2]

void dunedaq::appmodel::DaphneV2AFE::set_v_bias ( uint16_t value)
inline

Set "v_bias" attribute value. Value for V gain of the AFE, 12 bit register. The bias have to be under a certain value to operate in cold temperature, the maximum value depends on the brand of the SiPM, but it's always smaller than 1500 anyway

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

Definition at line 193 of file DaphneV2AFE.hpp.

194 {
195 std::lock_guard scoped_lock(m_mutex);
196 check();
197 clear();
198 p_obj.set_by_val(s_v_bias, value);
199 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 33 of file DaphneV2AFE.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 35 of file DaphneV2AFE.hpp.

◆ conffwk::DalObject

Definition at line 34 of file DaphneV2AFE.hpp.

◆ conffwk::DalRegistry

Definition at line 36 of file DaphneV2AFE.hpp.

Member Data Documentation

◆ m_adc

const dunedaq::appmodel::DaphneV2ADC * dunedaq::appmodel::DaphneV2AFE::m_adc
private

Definition at line 85 of file DaphneV2AFE.hpp.

◆ m_afe_id

uint8_t dunedaq::appmodel::DaphneV2AFE::m_afe_id
private

Definition at line 82 of file DaphneV2AFE.hpp.

◆ m_attenuator

uint16_t dunedaq::appmodel::DaphneV2AFE::m_attenuator
private

Definition at line 83 of file DaphneV2AFE.hpp.

◆ m_lna

const dunedaq::appmodel::DaphneV2LNA * dunedaq::appmodel::DaphneV2AFE::m_lna
private

Definition at line 87 of file DaphneV2AFE.hpp.

◆ m_pga

const dunedaq::appmodel::DaphneV2PGA * dunedaq::appmodel::DaphneV2AFE::m_pga
private

Definition at line 86 of file DaphneV2AFE.hpp.

◆ m_v_bias

uint16_t dunedaq::appmodel::DaphneV2AFE::m_v_bias
private

Definition at line 84 of file DaphneV2AFE.hpp.

◆ s_adc

static const std::string dunedaq::appmodel::DaphneV2AFE::s_adc = "adc"
inlinestatic

Definition at line 204 of file DaphneV2AFE.hpp.

◆ s_afe_id

static const std::string dunedaq::appmodel::DaphneV2AFE::s_afe_id = "afe_id"
inlinestatic

Definition at line 94 of file DaphneV2AFE.hpp.

◆ s_attenuator

static const std::string dunedaq::appmodel::DaphneV2AFE::s_attenuator = "attenuator"
inlinestatic

Definition at line 95 of file DaphneV2AFE.hpp.

◆ s_class_name

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

The name of the configuration class.

Definition at line 48 of file DaphneV2AFE.hpp.

◆ s_lna

static const std::string dunedaq::appmodel::DaphneV2AFE::s_lna = "lna"
inlinestatic

Definition at line 206 of file DaphneV2AFE.hpp.

◆ s_pga

static const std::string dunedaq::appmodel::DaphneV2AFE::s_pga = "pga"
inlinestatic

Definition at line 205 of file DaphneV2AFE.hpp.

◆ s_v_bias

static const std::string dunedaq::appmodel::DaphneV2AFE::s_v_bias = "v_bias"
inlinestatic

Definition at line 96 of file DaphneV2AFE.hpp.


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