Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
genvtx::manager Class Reference

Vertex generator manager. More...

#include <bayeux/genvtx/manager.h>

Inheritance diagram for genvtx::manager:
datatools::i_tree_dumpable

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_managerget_service_manager () const
 Return non mutable reference to the service manager. More...
 
datatools::service_managergrab_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::managerget_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::rngget_random () const
 Return the non mutable reference to the embedded PRNG. More...
 
mygsl::rnggrab_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_generatorget (const std::string &vg_name_) const
 
genvtx::i_vertex_generatorgrab (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 &current_) 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_)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ manager()

Constructor.

◆ ~manager()

virtual genvtx::manager::~manager ( )
virtual

Destructor.

Member Function Documentation

◆ _create_vg()

void genvtx::manager::_create_vg ( genvtx::vg_entry_type vg_entry_)
protected

◆ _initialize_vg()

void genvtx::manager::_initialize_vg ( genvtx::vg_entry_type vg_entry_)
protected

◆ _load_vg()

void genvtx::manager::_load_vg ( const std::string &  vg_name_,
const std::string &  vg_id_,
const datatools::properties vg_config_ 
)
protected

◆ _load_vgs()

void genvtx::manager::_load_vgs ( const datatools::multi_properties vgs_config_)
protected

◆ _reset_vg()

void genvtx::manager::_reset_vg ( genvtx::vg_entry_type vg_entry_)
protected

◆ activate_current_vg()

void genvtx::manager::activate_current_vg ( const std::string &  vg_name_ = "")

Activate a given vertex generator as the current one.

◆ can_shoot_vertex()

bool genvtx::manager::can_shoot_vertex ( ) const

Check if manager can fire vertex :

◆ create_vg()

virtual void genvtx::manager::create_vg ( genvtx::vg_entry_type vg_entry_)
virtual

◆ desactivate_current_vg()

void genvtx::manager::desactivate_current_vg ( )

Deactivate the current vertex generator.

◆ get()

const genvtx::i_vertex_generator& genvtx::manager::get ( const std::string &  vg_name_) const

◆ get_generator_name()

const std::string& genvtx::manager::get_generator_name ( ) const

◆ get_geometry_manager()

const geomtools::manager& genvtx::manager::get_geometry_manager ( ) const

Return the non mutable reference to the geometry manager.

◆ get_logging_priority()

datatools::logger::priority genvtx::manager::get_logging_priority ( ) const

◆ get_random()

const mygsl::rng& genvtx::manager::get_random ( ) const

Return the non mutable reference to the embedded PRNG.

◆ get_random_seed()

int genvtx::manager::get_random_seed ( ) const

Return the seed for embedded PRNG.

◆ get_rng_id()

const std::string& genvtx::manager::get_rng_id ( ) const

Return the embedded PRNG's id.

◆ get_service_manager()

const datatools::service_manager& genvtx::manager::get_service_manager ( ) const

Return non mutable reference to the service manager.

◆ grab()

genvtx::i_vertex_generator& genvtx::manager::grab ( const std::string &  vg_name_)

◆ grab_generator()

genvtx::vg_handle_type genvtx::manager::grab_generator ( const std::string &  vg_name_)

Return a mutable reference to a generator addressed by name.

◆ grab_random()

mygsl::rng& genvtx::manager::grab_random ( )

Return the mutable reference to the embedded PRNG.

◆ grab_service_manager()

datatools::service_manager& genvtx::manager::grab_service_manager ( )

Return mutable reference to the service manager.

◆ has_current_vg()

bool genvtx::manager::has_current_vg ( ) const

Check if a current vertex generator is defined.

◆ has_external_random()

bool genvtx::manager::has_external_random ( ) const

Check the external PRNG.

◆ has_generator()

bool genvtx::manager::has_generator ( const std::string &  ) const

Check if a generator with given name is available.

◆ has_generator_name()

bool genvtx::manager::has_generator_name ( ) const

◆ has_geometry_manager()

bool genvtx::manager::has_geometry_manager ( ) const

Check the geometry manager.

◆ has_random_seed()

bool genvtx::manager::has_random_seed ( ) const

Check the seed for embedded PRNG.

◆ has_service_manager()

bool genvtx::manager::has_service_manager ( ) const

Check the service manager.

◆ init()

void genvtx::manager::init ( const datatools::properties config_)

Main initialization method.

◆ initialize()

void genvtx::manager::initialize ( const datatools::properties config_)

Main initialization method.

◆ initialize_vg()

virtual void genvtx::manager::initialize_vg ( genvtx::vg_entry_type vg_entry_)
virtual

◆ is_debug()

bool genvtx::manager::is_debug ( ) const

Check debug flag.

◆ is_initialized()

bool genvtx::manager::is_initialized ( ) const

Check initialization flag.

◆ is_time_generator()

bool genvtx::manager::is_time_generator ( ) const

Check is manager can fire vertex and time.

◆ load_vg()

void genvtx::manager::load_vg ( const std::string &  vg_name_,
const std::string &  vg_id_,
const datatools::properties vg_config_ 
)

◆ load_vgs()

void genvtx::manager::load_vgs ( const datatools::multi_properties vgs_config_)

Load definitions of many vertex generators.

◆ reset()

void genvtx::manager::reset ( )

Reset.

◆ set_debug()

void genvtx::manager::set_debug ( bool  )

Set debug flag.

◆ set_external_random()

void genvtx::manager::set_external_random ( mygsl::rng )

Set the external PRNG.

◆ set_generator_name()

void genvtx::manager::set_generator_name ( const std::string &  vg_name_)

◆ set_geometry_manager()

void genvtx::manager::set_geometry_manager ( const geomtools::manager )

Set the geometry manager.

◆ set_logging_priority()

void genvtx::manager::set_logging_priority ( datatools::logger::priority  )

◆ set_random_seed()

void genvtx::manager::set_random_seed ( int  )

Set the seed for embedded PRNG.

◆ set_rng_id()

void genvtx::manager::set_rng_id ( const std::string &  rng_id_)

Set the embedded PRNG's id.

◆ set_service_manager()

void genvtx::manager::set_service_manager ( datatools::service_manager )

Set the service manager.

◆ shoot_vertex()

void genvtx::manager::shoot_vertex ( geomtools::vector_3d vertex_)

Main public method to randomize a 3D vertex point.

◆ shoot_vertex_and_time()

void genvtx::manager::shoot_vertex_and_time ( geomtools::vector_3d vertex_,
double &  time_ 
)

Main public method to randomize a 3D vertex point/time.

◆ tree_dump()

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

Smart print method.

Reimplemented from datatools::i_tree_dumpable.

◆ vg_names()

void genvtx::manager::vg_names ( std::vector< std::string > &  names_,
std::vector< std::string > &  descriptions_,
std::string &  current_ 
) const

Member Data Documentation

◆ _logging_priority

datatools::logger::priority genvtx::manager::_logging_priority
protected

Logging priority threshold.


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