Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A simple linear ADC (Analog/Digital Converter) More...
#include <bayeux/mctools/digitization/simple_linear_adc.h>
Public Member Functions | |
simple_linear_adc () | |
Default constructor. More... | |
virtual | ~simple_linear_adc () |
Destructor. More... | |
void | set_v_ref_low (const double) |
Set the low voltage reference value. More... | |
double | get_v_ref_low () const |
Return the low voltage reference value. More... | |
void | set_v_ref_high (const double) |
Set the high voltage reference value. More... | |
double | get_v_ref_high () const |
Return the high voltage reference value. More... | |
void | set_nbits (const uint16_t) |
Set the number of encoding bits. More... | |
uint16_t | get_nbits () const |
Return the number of encoding bits. More... | |
void | set_signed (bool) |
Set the signed codes flag. More... | |
void | set_no_underflow (bool n_) |
Set the no underflow flag. More... | |
bool | is_no_underflow () const |
Check the no underflow flag. More... | |
void | set_no_overflow (bool n_) |
Set the no overflow flag. More... | |
bool | is_no_overflow () const |
Check the no overflow flag. More... | |
void | set_underflow_channel (int32_t) |
Set the underflow channel. More... | |
int32_t | get_underflow_channel () const |
Return the underflow code. More... | |
void | set_overflow_channel (int32_t) |
Set the overflow channel. More... | |
int32_t | get_overflow_channel () const |
Return the overflow code. More... | |
bool | is_signed () const |
Check the signed codes flag. More... | |
bool | is_initialized () const |
Check the initialization flag. More... | |
void | initialize_simple () |
Initialization. More... | |
void | initialize (const datatools::properties &config_) |
Initialization. More... | |
void | reset () |
Reset. More... | |
double | compute_sampled_voltage (int32_t channel_, bool ignore_out_=false) const |
Compute the sampled voltage associated to a channel. More... | |
virtual int32_t | quantize (const double vinput_) const |
Quantize. More... | |
int32_t | get_min_channel () const |
Return the minimum channel. More... | |
int32_t | get_max_channel () const |
Return the maximum channel. More... | |
uint32_t | get_number_of_voltage_intervals () const |
Return the number of voltage intervals. More... | |
double | get_voltage_resolution () const |
Return the voltage resolution. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
Public Member Functions inherited from mctools::digitization::i_adc | |
i_adc () | |
Default constructor. More... | |
virtual | ~i_adc () |
Destructor. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. More... | |
virtual void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const |
Main new interface method for printing. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const |
Printing with jsonized options. More... | |
void | print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const |
Printing with jsonized options. More... | |
void | tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const |
void | tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const |
void | smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const |
Static Public Attributes | |
static const int32_t | INVALID_CHANNEL = std::numeric_limits<int32_t>::min() |
Protected Member Functions | |
void | _set_defaults () |
Reflection interface. More... | |
void | _compute_working_data () |
Compute working data. More... | |
Additional Inherited Members | |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 } |
Enumeration for standard output streams. More... | |
Static Public Member Functions inherited from datatools::i_tree_dumpable | |
static const boost::property_tree::ptree & | empty_options () |
static boost::property_tree::ptree | make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false) |
static std::ostream & | last_skip_tag (std::ostream &out_) |
static std::ostream & | skip_tag (std::ostream &out_) |
static std::ostream & | last_tag (std::ostream &out_) |
static std::ostream & | tag (std::ostream &out_) |
A simple linear ADC (Analog/Digital Converter)
mctools::digitization::simple_linear_adc::simple_linear_adc | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
Compute working data.
|
protected |
Reflection interface.
Set default attributes values
double mctools::digitization::simple_linear_adc::compute_sampled_voltage | ( | int32_t | channel_, |
bool | ignore_out_ = false |
||
) | const |
Compute the sampled voltage associated to a channel.
int32_t mctools::digitization::simple_linear_adc::get_max_channel | ( | ) | const |
Return the maximum channel.
int32_t mctools::digitization::simple_linear_adc::get_min_channel | ( | ) | const |
Return the minimum channel.
uint16_t mctools::digitization::simple_linear_adc::get_nbits | ( | ) | const |
Return the number of encoding bits.
uint32_t mctools::digitization::simple_linear_adc::get_number_of_voltage_intervals | ( | ) | const |
Return the number of voltage intervals.
int32_t mctools::digitization::simple_linear_adc::get_overflow_channel | ( | ) | const |
Return the overflow code.
int32_t mctools::digitization::simple_linear_adc::get_underflow_channel | ( | ) | const |
Return the underflow code.
double mctools::digitization::simple_linear_adc::get_v_ref_high | ( | ) | const |
Return the high voltage reference value.
double mctools::digitization::simple_linear_adc::get_v_ref_low | ( | ) | const |
Return the low voltage reference value.
double mctools::digitization::simple_linear_adc::get_voltage_resolution | ( | ) | const |
Return the voltage resolution.
void mctools::digitization::simple_linear_adc::initialize | ( | const datatools::properties & | config_ | ) |
Initialization.
void mctools::digitization::simple_linear_adc::initialize_simple | ( | ) |
Initialization.
bool mctools::digitization::simple_linear_adc::is_initialized | ( | ) | const |
Check the initialization flag.
bool mctools::digitization::simple_linear_adc::is_no_overflow | ( | ) | const |
Check the no overflow flag.
bool mctools::digitization::simple_linear_adc::is_no_underflow | ( | ) | const |
Check the no underflow flag.
bool mctools::digitization::simple_linear_adc::is_signed | ( | ) | const |
Check the signed codes flag.
|
virtual |
Quantize.
Implements mctools::digitization::i_adc.
void mctools::digitization::simple_linear_adc::reset | ( | ) |
Reset.
void mctools::digitization::simple_linear_adc::set_nbits | ( | const uint16_t | ) |
Set the number of encoding bits.
void mctools::digitization::simple_linear_adc::set_no_overflow | ( | bool | n_ | ) |
Set the no overflow flag.
void mctools::digitization::simple_linear_adc::set_no_underflow | ( | bool | n_ | ) |
Set the no underflow flag.
void mctools::digitization::simple_linear_adc::set_overflow_channel | ( | int32_t | ) |
Set the overflow channel.
void mctools::digitization::simple_linear_adc::set_signed | ( | bool | ) |
Set the signed codes flag.
void mctools::digitization::simple_linear_adc::set_underflow_channel | ( | int32_t | ) |
Set the underflow channel.
void mctools::digitization::simple_linear_adc::set_v_ref_high | ( | const double | ) |
Set the high voltage reference value.
void mctools::digitization::simple_linear_adc::set_v_ref_low | ( | const double | ) |
Set the low voltage reference value.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
static |