Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Abstract base class representing an analog signal associated to a hit detector. More...
#include <bayeux/mctools/signal/base_signal.h>
Public Member Functions | |
base_signal () | |
Default constructor. More... | |
base_signal (const base_signal &) | |
Copy constructor. More... | |
virtual | ~base_signal () |
Destructor. More... | |
base_signal & | operator= (const base_signal &) |
Assignment operator. More... | |
virtual bool | is_valid () const |
Check signal hit validity. More... | |
void | set_allow_no_shape_builder (bool a_) |
Allow no shape builder. More... | |
bool | is_shape_builder_mandatory () const |
Check is a shape builder is mandatory to build the signal shape object. More... | |
datatools::logger::priority | get_logging () const |
Return the logging priority. More... | |
void | set_logging (const datatools::logger::priority) |
Set the logging priority. More... | |
bool | has_time_ref () const |
Check if time reference is set. More... | |
double | get_time_ref () const |
Return the time reference. More... | |
void | set_time_ref (const double) |
Set the time reference. More... | |
void | reset_time_ref () |
Reset the time reference. More... | |
bool | has_shape_builder () const |
Check if a shape builder is set. More... | |
const signal_shape_builder & | get_shape_builder () const |
Return a handle to a shape builder. More... | |
signal_shape_builder & | grab_shape_builder () |
Return a handle to a shape builder. More... | |
void | set_shape_builder (signal_shape_builder &) |
Set a handle to a shape builder. More... | |
bool | has_category () const |
Check if the signal has category. More... | |
const std::string & | get_category () const |
Set the signal category. More... | |
void | set_category (const std::string &) |
Set the signal category. More... | |
void | reset_category () |
Reset the signal category. More... | |
bool | has_shape_type_id () const |
Check the shape type identifier. More... | |
const std::string & | get_shape_type_id () const |
Return the shape type identifier. More... | |
void | set_shape_type_id (const std::string &) |
Set the shape type identifier. More... | |
void | set_shape_parameters (const datatools::properties ¶ms_) |
Set the full set of parameters for the shape object. More... | |
void | reset_shape_parameters () |
Erase the full set of parameters for the shape object. More... | |
void | reset_shape_parameter (const std::string &key_) |
Erase one specific parameter for the shape object. More... | |
void | set_shape_boolean_parameter (const std::string &key_, const bool value_, const std::string &desc_="") |
Set a boolean parameter for the shape object. More... | |
void | set_shape_boolean_parameters (const std::string &key_, const std::vector< bool > &values_, const std::string &desc_="") |
Set a vector of boolean parameters for the shape object. More... | |
void | set_shape_integer_parameter (const std::string &key_, const int value_, const std::string &desc_="") |
Set a integer parameter for the shape object. More... | |
void | set_shape_integer_parameters (const std::string &key_, const std::vector< int > &values_, const std::string &desc_="") |
Set a vector of integer parameters for the shape object. More... | |
void | set_shape_string_parameter (const std::string &key_, const std::string &value_, const std::string &desc_="") |
Set a string parameter for the shape object. More... | |
void | set_shape_string_parameters (const std::string &key_, const std::vector< std::string > &values_, const std::string &desc_="") |
Set a vector of string parameters for the shape object. More... | |
void | set_shape_real_parameter (const std::string &key_, const double value_, const std::string &desc_="") |
Set a real parameter for the shape object. More... | |
void | set_shape_real_parameters (const std::string &key_, const std::vector< double > &values_, const std::string &desc_="") |
Set a vector of real parameters for the shape object. More... | |
void | set_shape_real_parameter_with_explicit_unit (const std::string &key_, const double value_, const std::string &unit_symbol_, const std::string &desc_="") |
Set a real parameter for the shape object (with explicit unit) More... | |
void | set_shape_real_parameters_with_explicit_unit (const std::string &key_, const std::vector< double > &values_, const std::string &unit_symbol_, const std::string &desc_="") |
Set a vector of real parameters for the shape object (with explicit unit) More... | |
void | add_private_shape (const std::string &key_, const std::string &type_id_, const datatools::properties ¶meters_) |
Add a private shape (only useful if a shape builder is associated to the base signal) More... | |
std::string | add_auto_private_shape (const std::string &type_id_, const datatools::properties ¶meters_) |
Add a private shape (only useful if a shape builder is associated to the base signal) More... | |
void | remove_private_shape (const std::string &key_) |
Remove a private shape. More... | |
void | remove_private_shapes () |
Remove all private shapes. More... | |
bool | is_shape_instantiated () const |
Check if a shape is instantiated. More... | |
const mygsl::i_unary_function & | get_shape () const |
Return a const reference to the embedded signal shape. More... | |
void | reset_shape () |
Discard the embedded signal shape object. More... | |
void | set_shape (const mygsl::i_unary_function &shape_) |
Set the embedded signal shape object without ownership. More... | |
void | set_shape_owned (const mygsl::i_unary_function *shape_ptr_) |
Set the embedded signal shape object with transfered ownership. More... | |
void | unlock () |
Unlock. More... | |
void | relock () |
Relock. More... | |
bool | is_initialized () const |
Check initialization. More... | |
void | initialize_simple () |
Initialize the signal. More... | |
void | initialize (const datatools::properties &config_) |
Initialize the signal. More... | |
void | reset () |
Reset the signal. More... | |
bool | has_private_shapes_config () const |
Check if some private shapes are setup. More... | |
const datatools::multi_properties & | get_private_shapes_config () const |
Return the configuration informations for private shapes. 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... | |
double | compute_shape (double time_) const |
Compute shape. More... | |
bool | instantiate_signal_shape (signal_shape_builder &builder_, const std::string &key_="") |
Instantiate the signal shape from a builder. More... | |
Public Member Functions inherited from geomtools::base_hit | |
bool | has_hit_id () const |
int32_t | get_hit_id () const |
void | set_hit_id (int32_t) |
Set the hit ID integer value. More... | |
void | invalidate_hit_id () |
bool | has_geom_id () const |
Check if the geometry ID is valid. More... | |
const geomtools::geom_id & | get_geom_id () const |
Get a reference on the non-mutable geometry ID. More... | |
geomtools::geom_id & | grab_geom_id () |
Get a reference on the mutable geometry ID. More... | |
void | set_geom_id (const geomtools::geom_id &) |
Set the geometry ID. More... | |
void | invalidate_geom_id () |
Reset the geometry ID. More... | |
bool | has_auxiliaries () const |
Check if there are stored auxiliary properties. More... | |
const datatools::properties & | get_auxiliaries () const |
Get a non-mutable reference on the auxiliaries container. More... | |
datatools::properties & | grab_auxiliaries () |
Get a mutable reference on the auxiliaries container. More... | |
void | set_auxiliaries (const datatools::properties &) |
Set the auxiliaries container. More... | |
void | invalidate_auxiliaries () |
Reset the mutable auxiliaries container. More... | |
base_hit () | |
Default constructor. More... | |
virtual | ~base_hit () |
Destructor. More... | |
virtual void | invalidate () |
Reset the internals of the hit, making it invalid. More... | |
void | reset () |
Reset the internals of the hit, making it invalid. More... | |
virtual void | clear () |
Reset the internals of the hit, making it invalid. More... | |
base_hit & | measure (i_measurement &) |
Apply a measurement on the current hit. More... | |
void | print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=datatools::i_tree_dumpable::empty_options()) const override |
void | dump () const |
Smart print (default behaviour) More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
Default constructor. More... | |
virtual | ~i_serializable () |
Destructor. More... | |
virtual const std::string & | get_serial_tag () const =0 |
Return the serialization string identifier of the class. More... | |
Public Member Functions inherited from datatools::i_tree_dumpable | |
i_tree_dumpable () | |
Constructor. More... | |
virtual | ~i_tree_dumpable () |
Destructor. 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 |
Public Member Functions inherited from datatools::i_clear | |
virtual | ~i_clear () |
Destructor. More... | |
Static Public Member Functions | |
static const std::string & | shape_parameter_prefix () |
static const std::string & | allow_no_shape_builder_key () |
static std::string | build_shape_key (const int32_t) |
static std::string | build_private_shape_key (const int32_t, const std::size_t) |
static bool | build_signal_shape (signal_shape_builder &builder_, const std::string &key_, base_signal &signal_, const datatools::logger::priority logging_=datatools::logger::PRIO_FATAL) |
Build the signal shape from a builder. 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_) |
Additional Inherited Members | |
Public Types inherited from geomtools::base_hit | |
enum | store_mask_type { STORE_NOTHING = 0, STORE_HIT_ID = datatools::bit_mask::bit00, STORE_GEOM_ID = datatools::bit_mask::bit01, STORE_AUXILIARIES = datatools::bit_mask::bit02, STORE_RESERVED30 = datatools::bit_mask::bit30, STORE_RESERVED31 = datatools::bit_mask::bit31 } |
Masks to automatically tag the attributes to be stored. More... | |
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 Attributes inherited from geomtools::base_hit | |
static const int32_t | INVALID_HIT_ID = -1 |
Protected Member Functions inherited from geomtools::base_hit | |
void | _store_set (uint32_t bit_mask_) |
Set the bits from a mask. More... | |
void | _store_unset (uint32_t bit_mask_) |
Unset the bits from a mask. More... | |
bool | _store_check (uint32_t bit_mask_) const |
Check the bits from a mask. More... | |
Protected Attributes inherited from geomtools::base_hit | |
uint32_t | _store |
Abstract base class representing an analog signal associated to a hit detector.
The signal is modelled has a [voltage = f(time)] arbitrary function. It uses a functor to describe the shape of the electric signal as expected from an analog measurement. This object contains all informations needed to build/instantiate a signal shape object, with the help of an external signal shape builder object.
mctools::signal::base_signal::base_signal | ( | ) |
Default constructor.
mctools::signal::base_signal::base_signal | ( | const base_signal & | ) |
Copy constructor.
|
virtual |
Destructor.
std::string mctools::signal::base_signal::add_auto_private_shape | ( | const std::string & | type_id_, |
const datatools::properties & | parameters_ | ||
) |
Add a private shape (only useful if a shape builder is associated to the base signal)
void mctools::signal::base_signal::add_private_shape | ( | const std::string & | key_, |
const std::string & | type_id_, | ||
const datatools::properties & | parameters_ | ||
) |
Add a private shape (only useful if a shape builder is associated to the base signal)
|
static |
|
static |
|
static |
|
static |
Build the signal shape from a builder.
double mctools::signal::base_signal::compute_shape | ( | double | time_ | ) | const |
Compute shape.
const std::string& mctools::signal::base_signal::get_category | ( | ) | const |
Set the signal category.
datatools::logger::priority mctools::signal::base_signal::get_logging | ( | ) | const |
Return the logging priority.
const datatools::multi_properties& mctools::signal::base_signal::get_private_shapes_config | ( | ) | const |
Return the configuration informations for private shapes.
const mygsl::i_unary_function& mctools::signal::base_signal::get_shape | ( | ) | const |
Return a const reference to the embedded signal shape.
const signal_shape_builder& mctools::signal::base_signal::get_shape_builder | ( | ) | const |
Return a handle to a shape builder.
const std::string& mctools::signal::base_signal::get_shape_type_id | ( | ) | const |
Return the shape type identifier.
double mctools::signal::base_signal::get_time_ref | ( | ) | const |
Return the time reference.
signal_shape_builder& mctools::signal::base_signal::grab_shape_builder | ( | ) |
Return a handle to a shape builder.
bool mctools::signal::base_signal::has_category | ( | ) | const |
Check if the signal has category.
bool mctools::signal::base_signal::has_private_shapes_config | ( | ) | const |
Check if some private shapes are setup.
bool mctools::signal::base_signal::has_shape_builder | ( | ) | const |
Check if a shape builder is set.
bool mctools::signal::base_signal::has_shape_type_id | ( | ) | const |
Check the shape type identifier.
bool mctools::signal::base_signal::has_time_ref | ( | ) | const |
Check if time reference is set.
void mctools::signal::base_signal::initialize | ( | const datatools::properties & | config_ | ) |
Initialize the signal.
void mctools::signal::base_signal::initialize_simple | ( | ) |
Initialize the signal.
bool mctools::signal::base_signal::instantiate_signal_shape | ( | signal_shape_builder & | builder_, |
const std::string & | key_ = "" |
||
) |
Instantiate the signal shape from a builder.
bool mctools::signal::base_signal::is_initialized | ( | ) | const |
Check initialization.
bool mctools::signal::base_signal::is_shape_builder_mandatory | ( | ) | const |
Check is a shape builder is mandatory to build the signal shape object.
bool mctools::signal::base_signal::is_shape_instantiated | ( | ) | const |
Check if a shape is instantiated.
|
virtual |
Check signal hit validity.
Reimplemented from geomtools::base_hit.
base_signal& mctools::signal::base_signal::operator= | ( | const base_signal & | ) |
Assignment operator.
void mctools::signal::base_signal::relock | ( | ) |
Relock.
void mctools::signal::base_signal::remove_private_shape | ( | const std::string & | key_ | ) |
Remove a private shape.
void mctools::signal::base_signal::remove_private_shapes | ( | ) |
Remove all private shapes.
void mctools::signal::base_signal::reset | ( | ) |
Reset the signal.
void mctools::signal::base_signal::reset_category | ( | ) |
Reset the signal category.
void mctools::signal::base_signal::reset_shape | ( | ) |
Discard the embedded signal shape object.
void mctools::signal::base_signal::reset_shape_parameter | ( | const std::string & | key_ | ) |
Erase one specific parameter for the shape object.
void mctools::signal::base_signal::reset_shape_parameters | ( | ) |
Erase the full set of parameters for the shape object.
void mctools::signal::base_signal::reset_time_ref | ( | ) |
Reset the time reference.
void mctools::signal::base_signal::set_allow_no_shape_builder | ( | bool | a_ | ) |
Allow no shape builder.
void mctools::signal::base_signal::set_category | ( | const std::string & | ) |
Set the signal category.
void mctools::signal::base_signal::set_logging | ( | const datatools::logger::priority | ) |
Set the logging priority.
void mctools::signal::base_signal::set_shape | ( | const mygsl::i_unary_function & | shape_ | ) |
Set the embedded signal shape object without ownership.
void mctools::signal::base_signal::set_shape_boolean_parameter | ( | const std::string & | key_, |
const bool | value_, | ||
const std::string & | desc_ = "" |
||
) |
Set a boolean parameter for the shape object.
void mctools::signal::base_signal::set_shape_boolean_parameters | ( | const std::string & | key_, |
const std::vector< bool > & | values_, | ||
const std::string & | desc_ = "" |
||
) |
Set a vector of boolean parameters for the shape object.
void mctools::signal::base_signal::set_shape_builder | ( | signal_shape_builder & | ) |
Set a handle to a shape builder.
void mctools::signal::base_signal::set_shape_integer_parameter | ( | const std::string & | key_, |
const int | value_, | ||
const std::string & | desc_ = "" |
||
) |
Set a integer parameter for the shape object.
void mctools::signal::base_signal::set_shape_integer_parameters | ( | const std::string & | key_, |
const std::vector< int > & | values_, | ||
const std::string & | desc_ = "" |
||
) |
Set a vector of integer parameters for the shape object.
void mctools::signal::base_signal::set_shape_owned | ( | const mygsl::i_unary_function * | shape_ptr_ | ) |
Set the embedded signal shape object with transfered ownership.
void mctools::signal::base_signal::set_shape_parameters | ( | const datatools::properties & | params_ | ) |
Set the full set of parameters for the shape object.
void mctools::signal::base_signal::set_shape_real_parameter | ( | const std::string & | key_, |
const double | value_, | ||
const std::string & | desc_ = "" |
||
) |
Set a real parameter for the shape object.
void mctools::signal::base_signal::set_shape_real_parameter_with_explicit_unit | ( | const std::string & | key_, |
const double | value_, | ||
const std::string & | unit_symbol_, | ||
const std::string & | desc_ = "" |
||
) |
Set a real parameter for the shape object (with explicit unit)
void mctools::signal::base_signal::set_shape_real_parameters | ( | const std::string & | key_, |
const std::vector< double > & | values_, | ||
const std::string & | desc_ = "" |
||
) |
Set a vector of real parameters for the shape object.
void mctools::signal::base_signal::set_shape_real_parameters_with_explicit_unit | ( | const std::string & | key_, |
const std::vector< double > & | values_, | ||
const std::string & | unit_symbol_, | ||
const std::string & | desc_ = "" |
||
) |
Set a vector of real parameters for the shape object (with explicit unit)
void mctools::signal::base_signal::set_shape_string_parameter | ( | const std::string & | key_, |
const std::string & | value_, | ||
const std::string & | desc_ = "" |
||
) |
Set a string parameter for the shape object.
void mctools::signal::base_signal::set_shape_string_parameters | ( | const std::string & | key_, |
const std::vector< std::string > & | values_, | ||
const std::string & | desc_ = "" |
||
) |
Set a vector of string parameters for the shape object.
void mctools::signal::base_signal::set_shape_type_id | ( | const std::string & | ) |
Set the shape type identifier.
void mctools::signal::base_signal::set_time_ref | ( | const double | ) |
Set the time reference.
|
static |
|
virtual |
Smart print.
Reimplemented from geomtools::base_hit.
void mctools::signal::base_signal::unlock | ( | ) |
Unlock.