Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
geomtools::angular_range Class Reference

Angular range. More...

#include <bayeux/geomtools/angular_range.h>

Inheritance diagram for geomtools::angular_range:
datatools::i_serializable datatools::i_tree_dumpable

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...
 

Detailed Description

Angular range.

Member Enumeration Documentation

◆ range_type

The type of angular range.

Enumerator
RANGE_TYPE_INVALID 

Invalid range type.

RANGE_TYPE_POLAR 

Polar angle.

RANGE_TYPE_AZIMUTHAL 

Azimuthal range.

Constructor & Destructor Documentation

◆ angular_range() [1/3]

geomtools::angular_range::angular_range ( range_type  rt_ = RANGE_TYPE_INVALID)
explicit

Default constructor.

◆ angular_range() [2/3]

geomtools::angular_range::angular_range ( const std::string &  type_label_)
explicit

Default constructor.

◆ angular_range() [3/3]

geomtools::angular_range::angular_range ( range_type  rt_,
double  start_angle_,
double  delta_angle_ 
)

Constructor.

Member Function Documentation

◆ _set_defaults()

void geomtools::angular_range::_set_defaults ( )
protected

Set default value foe attibutes.

◆ contains()

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.

◆ get_angle_spread()

double geomtools::angular_range::get_angle_spread ( ) const

Return the angular spread.

◆ get_delta_angle()

double geomtools::angular_range::get_delta_angle ( ) const

Return the delta angle.

◆ get_first_angle()

double geomtools::angular_range::get_first_angle ( ) const

Return the first angle.

◆ get_last_angle()

double geomtools::angular_range::get_last_angle ( ) const

Return the last angle.

◆ get_max_start_angle()

double geomtools::angular_range::get_max_start_angle ( ) const

Return the max start angle.

◆ get_min_start_angle()

double geomtools::angular_range::get_min_start_angle ( ) const

Return the min start angle.

◆ get_start_angle()

double geomtools::angular_range::get_start_angle ( ) const

Return the start angle.

◆ get_type()

range_type geomtools::angular_range::get_type ( ) const

Return the range type.

◆ has_delta_angle()

bool geomtools::angular_range::has_delta_angle ( ) const

Check the dedislta angle.

◆ has_start_angle()

bool geomtools::angular_range::has_start_angle ( ) const

Check the start angle.

◆ has_type()

bool geomtools::angular_range::has_type ( ) const

Check if the range type is set.

◆ init_ocd()

static void geomtools::angular_range::init_ocd ( datatools::object_configuration_description ,
const std::string &  prefix_ = "" 
)
static

OCD support.

◆ initialize()

void geomtools::angular_range::initialize ( const datatools::properties config_)

Initialize from a set of parameters.

◆ invalidate()

void geomtools::angular_range::invalidate ( )

Invalidate.

◆ is_azimuthal()

bool geomtools::angular_range::is_azimuthal ( ) const

Check if the type of the range is 'azimuthal'.

◆ is_partial()

bool geomtools::angular_range::is_partial ( ) const

Check for the partial angle.

◆ is_polar()

bool geomtools::angular_range::is_polar ( ) const

Check if the type of the range is 'polar'.

◆ is_valid()

bool geomtools::angular_range::is_valid ( ) const

Check if the range is valid.

◆ label_to_type()

static range_type geomtools::angular_range::label_to_type ( const std::string &  )
static

Return the range type associated to a label.

◆ max_start_angle()

static double geomtools::angular_range::max_start_angle ( range_type  )
static

Return the max start angle.

◆ min_start_angle()

static double geomtools::angular_range::min_start_angle ( range_type  )
static

Return the min start angle.

◆ reset()

void geomtools::angular_range::reset ( )

Reset.

◆ reset_partial_angles()

void geomtools::angular_range::reset_partial_angles ( )

Invalidate.

◆ set_delta_angle()

void geomtools::angular_range::set_delta_angle ( double  )

Set the delta angle.

◆ set_partial_angles()

void geomtools::angular_range::set_partial_angles ( double  start_angle_,
double  delta_angle_ 
)

Set angles.

◆ set_start_angle()

void geomtools::angular_range::set_start_angle ( double  )

Set the start angle.

◆ set_type()

void geomtools::angular_range::set_type ( range_type  )

Set the range type.

◆ tree_dump()

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

Smart print.

Reimplemented from datatools::i_tree_dumpable.

◆ type_to_label()

static std::string geomtools::angular_range::type_to_label ( range_type  rt_)
static

Return the label associated to a range type.


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