Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Angular range. More...
#include <bayeux/geomtools/angular_range.h>
Classes | |
class | iterator |
Forward iterator associated to an angular range. More... | |
Public Types | |
enum | range_type { RANGE_TYPE_INVALID = -1, RANGE_TYPE_POLAR = 0, RANGE_TYPE_AZIMUTHAL = 1 } |
The type of angular range. 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... | |
Public Member Functions | |
angular_range (range_type rt_=RANGE_TYPE_INVALID) | |
Default constructor. More... | |
angular_range (const std::string &type_label_) | |
Default constructor. More... | |
angular_range (range_type rt_, double start_angle_, double delta_angle_) | |
Constructor. More... | |
bool | has_type () const |
Check if the range type is set. More... | |
void | set_type (range_type) |
Set the range type. More... | |
range_type | get_type () const |
Return the range type. More... | |
bool | is_polar () const |
Check if the type of the range is 'polar'. More... | |
bool | is_azimuthal () const |
Check if the type of the range is 'azimuthal'. More... | |
double | get_min_start_angle () const |
Return the min start angle. More... | |
double | get_max_start_angle () const |
Return the max start angle. More... | |
bool | has_start_angle () const |
Check the start angle. More... | |
void | set_start_angle (double) |
Set the start angle. More... | |
double | get_start_angle () const |
Return the start angle. More... | |
bool | has_delta_angle () const |
Check the dedislta angle. More... | |
void | set_delta_angle (double) |
Set the delta angle. More... | |
double | get_delta_angle () const |
Return the delta angle. More... | |
bool | is_partial () const |
Check for the partial angle. More... | |
void | set_partial_angles (double start_angle_, double delta_angle_) |
Set angles. More... | |
void | reset_partial_angles () |
Invalidate. More... | |
double | get_first_angle () const |
Return the first angle. More... | |
double | get_last_angle () const |
Return the last angle. More... | |
double | get_angle_spread () const |
Return the angular spread. More... | |
bool | contains (double angle_, double tolerance_=0.0, bool strict_range_=false) const |
Check if a given angle is contains in the range. More... | |
bool | is_valid () const |
Check if the range is valid. More... | |
void | invalidate () |
Invalidate. More... | |
void | initialize (const datatools::properties &config_) |
Initialize from a set of parameters. More... | |
void | reset () |
Reset. 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 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... | |
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 Member Functions | |
static std::string | type_to_label (range_type rt_) |
Return the label associated to a range type. More... | |
static range_type | label_to_type (const std::string &) |
Return the range type associated to a label. More... | |
static double | min_start_angle (range_type) |
Return the min start angle. More... | |
static double | max_start_angle (range_type) |
Return the max start angle. More... | |
static void | init_ocd (datatools::object_configuration_description &, const std::string &prefix_="") |
OCD support. 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_) |
Protected Member Functions | |
void | _set_defaults () |
Set default value foe attibutes. More... | |
Angular range.
|
explicit |
Default constructor.
|
explicit |
Default constructor.
geomtools::angular_range::angular_range | ( | range_type | rt_, |
double | start_angle_, | ||
double | delta_angle_ | ||
) |
Constructor.
|
protected |
Set default value foe attibutes.
bool geomtools::angular_range::contains | ( | double | angle_, |
double | tolerance_ = 0.0 , |
||
bool | strict_range_ = false |
||
) | const |
Check if a given angle is contains in the range.
double geomtools::angular_range::get_angle_spread | ( | ) | const |
Return the angular spread.
double geomtools::angular_range::get_delta_angle | ( | ) | const |
Return the delta angle.
double geomtools::angular_range::get_first_angle | ( | ) | const |
Return the first angle.
double geomtools::angular_range::get_last_angle | ( | ) | const |
Return the last angle.
double geomtools::angular_range::get_max_start_angle | ( | ) | const |
Return the max start angle.
double geomtools::angular_range::get_min_start_angle | ( | ) | const |
Return the min start angle.
double geomtools::angular_range::get_start_angle | ( | ) | const |
Return the start angle.
range_type geomtools::angular_range::get_type | ( | ) | const |
Return the range type.
bool geomtools::angular_range::has_delta_angle | ( | ) | const |
Check the dedislta angle.
bool geomtools::angular_range::has_start_angle | ( | ) | const |
Check the start angle.
bool geomtools::angular_range::has_type | ( | ) | const |
Check if the range type is set.
|
static |
OCD support.
void geomtools::angular_range::initialize | ( | const datatools::properties & | config_ | ) |
Initialize from a set of parameters.
void geomtools::angular_range::invalidate | ( | ) |
Invalidate.
bool geomtools::angular_range::is_azimuthal | ( | ) | const |
Check if the type of the range is 'azimuthal'.
bool geomtools::angular_range::is_partial | ( | ) | const |
Check for the partial angle.
bool geomtools::angular_range::is_polar | ( | ) | const |
Check if the type of the range is 'polar'.
bool geomtools::angular_range::is_valid | ( | ) | const |
Check if the range is valid.
|
static |
Return the range type associated to a label.
|
static |
Return the max start angle.
|
static |
Return the min start angle.
void geomtools::angular_range::reset | ( | ) |
Reset.
void geomtools::angular_range::reset_partial_angles | ( | ) |
Invalidate.
void geomtools::angular_range::set_delta_angle | ( | double | ) |
Set the delta angle.
void geomtools::angular_range::set_partial_angles | ( | double | start_angle_, |
double | delta_angle_ | ||
) |
Set angles.
void geomtools::angular_range::set_start_angle | ( | double | ) |
Set the start angle.
void geomtools::angular_range::set_type | ( | range_type | ) |
Set the range type.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
|
static |
Return the label associated to a range type.