Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Vertex generator manager. More...
#include <bayeux/genvtx/manager.h>
Public Member Functions | |
bool | is_initialized () const |
Check initialization flag. More... | |
bool | is_debug () const |
Check debug flag. More... | |
void | set_debug (bool) |
Set debug flag. More... | |
void | set_service_manager (datatools::service_manager &) |
Set the service manager. More... | |
bool | has_service_manager () const |
Check the service manager. More... | |
const datatools::service_manager & | get_service_manager () const |
Return non mutable reference to the service manager. More... | |
datatools::service_manager & | grab_service_manager () |
Return mutable reference to the service manager. More... | |
bool | has_geometry_manager () const |
Check the geometry manager. More... | |
void | set_geometry_manager (const geomtools::manager &) |
Set the geometry manager. More... | |
const geomtools::manager & | get_geometry_manager () const |
Return the non mutable reference to the geometry manager. More... | |
bool | has_external_random () const |
Check the external PRNG. More... | |
void | set_external_random (mygsl::rng &) |
Set the external PRNG. More... | |
bool | has_random_seed () const |
Check the seed for embedded PRNG. More... | |
void | set_random_seed (int) |
Set the seed for embedded PRNG. More... | |
int | get_random_seed () const |
Return the seed for embedded PRNG. More... | |
void | set_rng_id (const std::string &rng_id_) |
Set the embedded PRNG's id. More... | |
const std::string & | get_rng_id () const |
Return the embedded PRNG's id. More... | |
const mygsl::rng & | get_random () const |
Return the non mutable reference to the embedded PRNG. More... | |
mygsl::rng & | grab_random () |
Return the mutable reference to the embedded PRNG. More... | |
bool | has_generator_name () const |
void | set_generator_name (const std::string &vg_name_) |
const std::string & | get_generator_name () const |
bool | has_generator (const std::string &) const |
Check if a generator with given name is available. More... | |
genvtx::vg_handle_type | grab_generator (const std::string &vg_name_) |
Return a mutable reference to a generator addressed by name. More... | |
manager (datatools::logger::priority p_=datatools::logger::PRIO_WARNING) | |
Constructor. More... | |
virtual | ~manager () |
Destructor. More... | |
void | reset () |
Reset. More... | |
void | init (const datatools::properties &config_) |
Main initialization method. More... | |
void | initialize (const datatools::properties &config_) |
Main initialization method. More... | |
void | load_vg (const std::string &vg_name_, const std::string &vg_id_, const datatools::properties &vg_config_) |
virtual void | create_vg (genvtx::vg_entry_type &vg_entry_) |
virtual void | initialize_vg (genvtx::vg_entry_type &vg_entry_) |
void | load_vgs (const datatools::multi_properties &vgs_config_) |
Load definitions of many vertex generators. More... | |
bool | has_current_vg () const |
Check if a current vertex generator is defined. More... | |
void | activate_current_vg (const std::string &vg_name_="") |
Activate a given vertex generator as the current one. More... | |
void | desactivate_current_vg () |
Deactivate the current vertex generator. More... | |
bool | can_shoot_vertex () const |
Check if manager can fire vertex : More... | |
bool | is_time_generator () const |
Check is manager can fire vertex and time. More... | |
void | shoot_vertex (geomtools::vector_3d &vertex_) |
Main public method to randomize a 3D vertex point. More... | |
void | shoot_vertex_and_time (geomtools::vector_3d &vertex_, double &time_) |
Main public method to randomize a 3D vertex point/time. More... | |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print method. More... | |
const genvtx::i_vertex_generator & | get (const std::string &vg_name_) const |
genvtx::i_vertex_generator & | grab (const std::string &vg_name_) |
datatools::logger::priority | get_logging_priority () const |
void | set_logging_priority (datatools::logger::priority) |
void | vg_names (std::vector< std::string > &names_, std::vector< std::string > &descriptions_, std::string ¤t_) const |
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 |
Protected Member Functions | |
void | _load_vg (const std::string &vg_name_, const std::string &vg_id_, const datatools::properties &vg_config_) |
void | _load_vgs (const datatools::multi_properties &vgs_config_) |
void | _create_vg (genvtx::vg_entry_type &vg_entry_) |
void | _initialize_vg (genvtx::vg_entry_type &vg_entry_) |
void | _reset_vg (genvtx::vg_entry_type &vg_entry_) |
Protected Attributes | |
datatools::logger::priority | _logging_priority |
Logging priority threshold. 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_) |
Vertex generator manager.
The vertex generator manager object drives the generation of random vertexes within a given geometry setup. The geometry setup is described through a dedicated external geometry manager, possibly passed through a service manager. The manager handles its own pseudo-random number generator. It hosts a special factory that enables to create specific random vertex generators on the fly (with possibility to combine them given special vertex generators). The main configuration of the manager and the vertex generators it manages is done through containers of properties.
genvtx::manager::manager | ( | datatools::logger::priority | p_ = datatools::logger::PRIO_WARNING | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
void genvtx::manager::activate_current_vg | ( | const std::string & | vg_name_ = "" | ) |
Activate a given vertex generator as the current one.
bool genvtx::manager::can_shoot_vertex | ( | ) | const |
Check if manager can fire vertex :
|
virtual |
void genvtx::manager::desactivate_current_vg | ( | ) |
Deactivate the current vertex generator.
const genvtx::i_vertex_generator& genvtx::manager::get | ( | const std::string & | vg_name_ | ) | const |
const std::string& genvtx::manager::get_generator_name | ( | ) | const |
const geomtools::manager& genvtx::manager::get_geometry_manager | ( | ) | const |
Return the non mutable reference to the geometry manager.
datatools::logger::priority genvtx::manager::get_logging_priority | ( | ) | const |
const mygsl::rng& genvtx::manager::get_random | ( | ) | const |
Return the non mutable reference to the embedded PRNG.
int genvtx::manager::get_random_seed | ( | ) | const |
Return the seed for embedded PRNG.
const std::string& genvtx::manager::get_rng_id | ( | ) | const |
Return the embedded PRNG's id.
const datatools::service_manager& genvtx::manager::get_service_manager | ( | ) | const |
Return non mutable reference to the service manager.
genvtx::i_vertex_generator& genvtx::manager::grab | ( | const std::string & | vg_name_ | ) |
genvtx::vg_handle_type genvtx::manager::grab_generator | ( | const std::string & | vg_name_ | ) |
Return a mutable reference to a generator addressed by name.
mygsl::rng& genvtx::manager::grab_random | ( | ) |
Return the mutable reference to the embedded PRNG.
datatools::service_manager& genvtx::manager::grab_service_manager | ( | ) |
Return mutable reference to the service manager.
bool genvtx::manager::has_current_vg | ( | ) | const |
Check if a current vertex generator is defined.
bool genvtx::manager::has_external_random | ( | ) | const |
Check the external PRNG.
bool genvtx::manager::has_generator | ( | const std::string & | ) | const |
Check if a generator with given name is available.
bool genvtx::manager::has_generator_name | ( | ) | const |
bool genvtx::manager::has_geometry_manager | ( | ) | const |
Check the geometry manager.
bool genvtx::manager::has_random_seed | ( | ) | const |
Check the seed for embedded PRNG.
bool genvtx::manager::has_service_manager | ( | ) | const |
Check the service manager.
void genvtx::manager::init | ( | const datatools::properties & | config_ | ) |
Main initialization method.
void genvtx::manager::initialize | ( | const datatools::properties & | config_ | ) |
Main initialization method.
|
virtual |
bool genvtx::manager::is_debug | ( | ) | const |
Check debug flag.
bool genvtx::manager::is_initialized | ( | ) | const |
Check initialization flag.
bool genvtx::manager::is_time_generator | ( | ) | const |
Check is manager can fire vertex and time.
void genvtx::manager::load_vg | ( | const std::string & | vg_name_, |
const std::string & | vg_id_, | ||
const datatools::properties & | vg_config_ | ||
) |
void genvtx::manager::load_vgs | ( | const datatools::multi_properties & | vgs_config_ | ) |
Load definitions of many vertex generators.
void genvtx::manager::reset | ( | ) |
Reset.
void genvtx::manager::set_debug | ( | bool | ) |
Set debug flag.
void genvtx::manager::set_external_random | ( | mygsl::rng & | ) |
Set the external PRNG.
void genvtx::manager::set_generator_name | ( | const std::string & | vg_name_ | ) |
void genvtx::manager::set_geometry_manager | ( | const geomtools::manager & | ) |
Set the geometry manager.
void genvtx::manager::set_logging_priority | ( | datatools::logger::priority | ) |
void genvtx::manager::set_random_seed | ( | int | ) |
Set the seed for embedded PRNG.
void genvtx::manager::set_rng_id | ( | const std::string & | rng_id_ | ) |
Set the embedded PRNG's id.
void genvtx::manager::set_service_manager | ( | datatools::service_manager & | ) |
Set the service manager.
void genvtx::manager::shoot_vertex | ( | geomtools::vector_3d & | vertex_ | ) |
Main public method to randomize a 3D vertex point.
void genvtx::manager::shoot_vertex_and_time | ( | geomtools::vector_3d & | vertex_, |
double & | time_ | ||
) |
Main public method to randomize a 3D vertex point/time.
|
virtual |
Smart print method.
Reimplemented from datatools::i_tree_dumpable.
void genvtx::manager::vg_names | ( | std::vector< std::string > & | names_, |
std::vector< std::string > & | descriptions_, | ||
std::string & | current_ | ||
) | const |
|
protected |
Logging priority threshold.