Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | List of all members
mctools::signal::base_signal Class Reference

Abstract base class representing an analog signal associated to a hit detector. More...

#include <bayeux/mctools/signal/base_signal.h>

Inheritance diagram for mctools::signal::base_signal:
geomtools::base_hit datatools::i_serializable datatools::i_tree_dumpable datatools::i_clear

Public Member Functions

 base_signal ()
 Default constructor. More...
 
 base_signal (const base_signal &)
 Copy constructor. More...
 
virtual ~base_signal ()
 Destructor. More...
 
base_signaloperator= (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_builderget_shape_builder () const
 Return a handle to a shape builder. More...
 
signal_shape_buildergrab_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 &params_)
 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 &parameters_)
 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 &parameters_)
 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_functionget_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_propertiesget_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_idget_geom_id () const
 Get a reference on the non-mutable geometry ID. More...
 
geomtools::geom_idgrab_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::propertiesget_auxiliaries () const
 Get a non-mutable reference on the auxiliaries container. More...
 
datatools::propertiesgrab_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_hitmeasure (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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ base_signal() [1/2]

mctools::signal::base_signal::base_signal ( )

Default constructor.

◆ base_signal() [2/2]

mctools::signal::base_signal::base_signal ( const base_signal )

Copy constructor.

◆ ~base_signal()

virtual mctools::signal::base_signal::~base_signal ( )
virtual

Destructor.

Member Function Documentation

◆ add_auto_private_shape()

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)

◆ add_private_shape()

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)

◆ allow_no_shape_builder_key()

static const std::string& mctools::signal::base_signal::allow_no_shape_builder_key ( )
static

◆ build_private_shape_key()

static std::string mctools::signal::base_signal::build_private_shape_key ( const int32_t  ,
const std::size_t   
)
static

◆ build_shape_key()

static std::string mctools::signal::base_signal::build_shape_key ( const int32_t  )
static

◆ build_signal_shape()

static bool mctools::signal::base_signal::build_signal_shape ( signal_shape_builder builder_,
const std::string &  key_,
base_signal signal_,
const datatools::logger::priority  logging_ = datatools::logger::PRIO_FATAL 
)
static

Build the signal shape from a builder.

◆ compute_shape()

double mctools::signal::base_signal::compute_shape ( double  time_) const

Compute shape.

◆ get_category()

const std::string& mctools::signal::base_signal::get_category ( ) const

Set the signal category.

◆ get_logging()

datatools::logger::priority mctools::signal::base_signal::get_logging ( ) const

Return the logging priority.

◆ get_private_shapes_config()

const datatools::multi_properties& mctools::signal::base_signal::get_private_shapes_config ( ) const

Return the configuration informations for private shapes.

◆ get_shape()

const mygsl::i_unary_function& mctools::signal::base_signal::get_shape ( ) const

Return a const reference to the embedded signal shape.

◆ get_shape_builder()

const signal_shape_builder& mctools::signal::base_signal::get_shape_builder ( ) const

Return a handle to a shape builder.

◆ get_shape_type_id()

const std::string& mctools::signal::base_signal::get_shape_type_id ( ) const

Return the shape type identifier.

◆ get_time_ref()

double mctools::signal::base_signal::get_time_ref ( ) const

Return the time reference.

◆ grab_shape_builder()

signal_shape_builder& mctools::signal::base_signal::grab_shape_builder ( )

Return a handle to a shape builder.

◆ has_category()

bool mctools::signal::base_signal::has_category ( ) const

Check if the signal has category.

◆ has_private_shapes_config()

bool mctools::signal::base_signal::has_private_shapes_config ( ) const

Check if some private shapes are setup.

◆ has_shape_builder()

bool mctools::signal::base_signal::has_shape_builder ( ) const

Check if a shape builder is set.

◆ has_shape_type_id()

bool mctools::signal::base_signal::has_shape_type_id ( ) const

Check the shape type identifier.

◆ has_time_ref()

bool mctools::signal::base_signal::has_time_ref ( ) const

Check if time reference is set.

◆ initialize()

void mctools::signal::base_signal::initialize ( const datatools::properties config_)

Initialize the signal.

◆ initialize_simple()

void mctools::signal::base_signal::initialize_simple ( )

Initialize the signal.

◆ instantiate_signal_shape()

bool mctools::signal::base_signal::instantiate_signal_shape ( signal_shape_builder builder_,
const std::string &  key_ = "" 
)

Instantiate the signal shape from a builder.

◆ is_initialized()

bool mctools::signal::base_signal::is_initialized ( ) const

Check initialization.

◆ is_shape_builder_mandatory()

bool mctools::signal::base_signal::is_shape_builder_mandatory ( ) const

Check is a shape builder is mandatory to build the signal shape object.

◆ is_shape_instantiated()

bool mctools::signal::base_signal::is_shape_instantiated ( ) const

Check if a shape is instantiated.

◆ is_valid()

virtual bool mctools::signal::base_signal::is_valid ( ) const
virtual

Check signal hit validity.

Reimplemented from geomtools::base_hit.

◆ operator=()

base_signal& mctools::signal::base_signal::operator= ( const base_signal )

Assignment operator.

◆ relock()

void mctools::signal::base_signal::relock ( )

Relock.

◆ remove_private_shape()

void mctools::signal::base_signal::remove_private_shape ( const std::string &  key_)

Remove a private shape.

◆ remove_private_shapes()

void mctools::signal::base_signal::remove_private_shapes ( )

Remove all private shapes.

◆ reset()

void mctools::signal::base_signal::reset ( )

Reset the signal.

◆ reset_category()

void mctools::signal::base_signal::reset_category ( )

Reset the signal category.

◆ reset_shape()

void mctools::signal::base_signal::reset_shape ( )

Discard the embedded signal shape object.

◆ reset_shape_parameter()

void mctools::signal::base_signal::reset_shape_parameter ( const std::string &  key_)

Erase one specific parameter for the shape object.

◆ reset_shape_parameters()

void mctools::signal::base_signal::reset_shape_parameters ( )

Erase the full set of parameters for the shape object.

◆ reset_time_ref()

void mctools::signal::base_signal::reset_time_ref ( )

Reset the time reference.

◆ set_allow_no_shape_builder()

void mctools::signal::base_signal::set_allow_no_shape_builder ( bool  a_)

Allow no shape builder.

◆ set_category()

void mctools::signal::base_signal::set_category ( const std::string &  )

Set the signal category.

◆ set_logging()

void mctools::signal::base_signal::set_logging ( const datatools::logger::priority  )

Set the logging priority.

◆ set_shape()

void mctools::signal::base_signal::set_shape ( const mygsl::i_unary_function shape_)

Set the embedded signal shape object without ownership.

◆ set_shape_boolean_parameter()

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.

◆ set_shape_boolean_parameters()

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.

◆ set_shape_builder()

void mctools::signal::base_signal::set_shape_builder ( signal_shape_builder )

Set a handle to a shape builder.

◆ set_shape_integer_parameter()

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.

◆ set_shape_integer_parameters()

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.

◆ set_shape_owned()

void mctools::signal::base_signal::set_shape_owned ( const mygsl::i_unary_function shape_ptr_)

Set the embedded signal shape object with transfered ownership.

◆ set_shape_parameters()

void mctools::signal::base_signal::set_shape_parameters ( const datatools::properties params_)

Set the full set of parameters for the shape object.

◆ set_shape_real_parameter()

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.

◆ set_shape_real_parameter_with_explicit_unit()

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)

◆ set_shape_real_parameters()

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.

◆ set_shape_real_parameters_with_explicit_unit()

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)

◆ set_shape_string_parameter()

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.

◆ set_shape_string_parameters()

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.

◆ set_shape_type_id()

void mctools::signal::base_signal::set_shape_type_id ( const std::string &  )

Set the shape type identifier.

◆ set_time_ref()

void mctools::signal::base_signal::set_time_ref ( const double  )

Set the time reference.

◆ shape_parameter_prefix()

static const std::string& mctools::signal::base_signal::shape_parameter_prefix ( )
static

◆ tree_dump()

virtual void mctools::signal::base_signal::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from geomtools::base_hit.

◆ unlock()

void mctools::signal::base_signal::unlock ( )

Unlock.


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