Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of various experimental setups in the framework of the nuclear and particle physics experiments. More...
#include <bayeux/geomtools/manager.h>
Classes | |
class | base_plugin |
The geometry manager's plugin base class. More... | |
class | plugin_entry |
Internal record plugin handling. More... | |
Public Types | |
typedef std::map< std::string, plugin_entry > | plugins_dict_type |
Dictionary of plugin entries. More... | |
typedef datatools::handle< base_plugin > | plugin_handle_type |
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 | |
bool | is_debug () const |
Check the debug flag. More... | |
bool | is_verbose () const |
Check the verbose flag. More... | |
bool | is_initialized () const |
Check the initialization flag. More... | |
bool | has_services () const |
Check if manager has services. More... | |
void | set_services (datatools::service_dict_type &services_) |
Set the dictionary of services. More... | |
void | reset_services () |
Reset the dictionary of services. More... | |
void | set_setup_label (const std::string &) |
Set the label of the setup. More... | |
const std::string & | get_setup_label () const |
Return the label of the setup. More... | |
void | set_setup_version (const std::string &) |
Set the version of the setup. More... | |
const std::string & | get_setup_version () const |
Return the version of the setup. More... | |
void | set_setup_description (const std::string &) |
Set the description of the setup. More... | |
const std::string & | get_setup_description () const |
Return the description of the setup. More... | |
void | fetch_setup_version_id (datatools::version_id &vid_) const |
Construct the version id associated to the setup. More... | |
void | set_mapping_requested (bool) |
Request the build of the mapping. More... | |
bool | is_mapping_requested () const |
Check if the build of the mapping has been requested. More... | |
bool | is_mapping_available () const |
Check if the mapping is built. More... | |
void | set_world_name (const std::string &) |
Set the name of the world volume. More... | |
const std::string & | get_world_name () const |
Return the name of the world volume. More... | |
void | build_mapping (const datatools::properties &config_) |
Build the mapping. More... | |
const geomtools::shape_factory & | get_shape_factory () const |
Return a reference to the non mutable factory of shapes. More... | |
geomtools::shape_factory & | grab_shape_factory () |
Return a reference to the mutable factory of shapes. More... | |
const geomtools::model_factory & | get_factory () const |
Return a reference to the non mutable factory of geometry models. More... | |
geomtools::model_factory & | grab_factory () |
Return a reference to the mutable factory of geometry models. More... | |
const geomtools::id_mgr & | get_id_mgr () const |
Return a reference to the non mutable geometry ID manager. More... | |
geomtools::id_mgr & | grab_id_mgr () |
Return a reference to the mutable geometry ID manager. More... | |
const geomtools::mapping & | get_mapping (const std::string &mapping_name_="") const |
Return a reference to the non mutable mapping with explicit name. More... | |
bool | can_drop_plugin (const std::string &plugin_name_) |
void | drop_plugin (const std::string &plugin_name_) |
void | load_plugin (const std::string &plugin_name_, const std::string &plugin_id_, const datatools::properties &plugin_config_, bool only_lock_=false) |
void | load_plugins (const datatools::multi_properties &plugin_config_, bool only_lock_=false) |
const plugins_dict_type & | get_plugins () const |
plugins_dict_type & | grab_plugins () |
template<class T > | |
bool | is_plugin_a (const std::string &a_plugin_name) const |
template<class T > | |
T & | grab_plugin (const std::string &a_plugin_name) |
template<class T > | |
const T & | get_plugin (const std::string &a_plugin_name) const |
bool | has_plugin (const std::string &a_plugin_name) const |
void | print_plugins (std::ostream &out=std::clog, const std::string &title="", const std::string &indent="") const |
void | clear_plugins () |
Clear the plugins. More... | |
bool | has_plugin_type (const std::string &plugin_id) const |
Check if some plugin type is known. More... | |
template<class PluginClass > | |
void | register_plugin_type (const std::string &plugin_id) |
Register a plugin type. More... | |
void | unregister_plugin_type (const std::string &plugin_id) |
Unregister a plugin type. More... | |
manager () | |
Default constructor. More... | |
virtual | ~manager () |
Destructor. More... | |
void | init (const datatools::properties &config_) |
Initialize the geometry manager from a container of properties. More... | |
void | initialize (const datatools::properties &config_) |
Initialize the geometry manager from a container of properties. More... | |
void | reset () |
Reset the geometry manager. 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... | |
const base_plugin::factory_register_type & | get_plugins_factory_register () |
Return a reference to the plugin factory register. More... | |
void | set_logging_priority (datatools::logger::priority a_logging_priority) |
Set the logging priority threshold. More... | |
datatools::logger::priority | get_logging_priority () const |
Return the logging priority threshold. 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 int | print_list_of_gids (const geomtools::manager &mgr_, const std::string &command_, const std::string &rules_="", std::ostream &out_=std::clog) |
Print the list of geometry identifiers (GIDs) from a manager and given specific rules. 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 | |
virtual void | _pre_init (const datatools::properties &config_) |
virtual void | _post_init (const datatools::properties &config_) |
void | _load_plugin (const std::string &name, const std::string &id, const datatools::properties &config) |
void | _preload_plugins_global_dict () |
void | _create_plugin (plugin_entry &entry) |
void | _initialize_plugin (plugin_entry &entry) |
void | _reset_plugin (plugin_entry &entry) |
Protected Attributes | |
datatools::logger::priority | _logging |
Logging priority threshold. More... | |
Geometry manager for virtual geometry modelling. Main geometry manager for the modelisation of various experimental setups in the framework of the nuclear and particle physics experiments.
typedef std::map<std::string, plugin_entry> geomtools::manager::plugins_dict_type |
Dictionary of plugin entries.
geomtools::manager::manager | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
protected |
void geomtools::manager::build_mapping | ( | const datatools::properties & | config_ | ) |
Build the mapping.
bool geomtools::manager::can_drop_plugin | ( | const std::string & | plugin_name_ | ) |
void geomtools::manager::clear_plugins | ( | ) |
Clear the plugins.
void geomtools::manager::drop_plugin | ( | const std::string & | plugin_name_ | ) |
void geomtools::manager::fetch_setup_version_id | ( | datatools::version_id & | vid_ | ) | const |
Construct the version id associated to the setup.
const geomtools::model_factory& geomtools::manager::get_factory | ( | ) | const |
Return a reference to the non mutable factory of geometry models.
const geomtools::id_mgr& geomtools::manager::get_id_mgr | ( | ) | const |
Return a reference to the non mutable geometry ID manager.
datatools::logger::priority geomtools::manager::get_logging_priority | ( | ) | const |
Return the logging priority threshold.
const geomtools::mapping& geomtools::manager::get_mapping | ( | const std::string & | mapping_name_ = "" | ) | const |
Return a reference to the non mutable mapping with explicit name.
const T & geomtools::manager::get_plugin | ( | const std::string & | a_plugin_name | ) | const |
a_plugin_name | The name of the plugin to be grabbed |
const plugins_dict_type& geomtools::manager::get_plugins | ( | ) | const |
const base_plugin::factory_register_type& geomtools::manager::get_plugins_factory_register | ( | ) |
Return a reference to the plugin factory register.
const std::string& geomtools::manager::get_setup_description | ( | ) | const |
Return the description of the setup.
const std::string& geomtools::manager::get_setup_label | ( | ) | const |
Return the label of the setup.
const std::string& geomtools::manager::get_setup_version | ( | ) | const |
Return the version of the setup.
const geomtools::shape_factory& geomtools::manager::get_shape_factory | ( | ) | const |
Return a reference to the non mutable factory of shapes.
const std::string& geomtools::manager::get_world_name | ( | ) | const |
Return the name of the world volume.
geomtools::model_factory& geomtools::manager::grab_factory | ( | ) |
Return a reference to the mutable factory of geometry models.
geomtools::id_mgr& geomtools::manager::grab_id_mgr | ( | ) |
Return a reference to the mutable geometry ID manager.
T & geomtools::manager::grab_plugin | ( | const std::string & | a_plugin_name | ) |
a_plugin_name | The name of the plugin to be grabbed |
plugins_dict_type& geomtools::manager::grab_plugins | ( | ) |
geomtools::shape_factory& geomtools::manager::grab_shape_factory | ( | ) |
Return a reference to the mutable factory of shapes.
bool geomtools::manager::has_plugin | ( | const std::string & | a_plugin_name | ) | const |
a_plugin_name | The name of the plugin to be checked |
bool geomtools::manager::has_plugin_type | ( | const std::string & | plugin_id | ) | const |
Check if some plugin type is known.
bool geomtools::manager::has_services | ( | ) | const |
Check if manager has services.
void geomtools::manager::init | ( | const datatools::properties & | config_ | ) |
Initialize the geometry manager from a container of properties.
void geomtools::manager::initialize | ( | const datatools::properties & | config_ | ) |
Initialize the geometry manager from a container of properties.
bool geomtools::manager::is_debug | ( | ) | const |
Check the debug flag.
bool geomtools::manager::is_initialized | ( | ) | const |
Check the initialization flag.
bool geomtools::manager::is_mapping_available | ( | ) | const |
Check if the mapping is built.
bool geomtools::manager::is_mapping_requested | ( | ) | const |
Check if the build of the mapping has been requested.
bool geomtools::manager::is_plugin_a | ( | const std::string & | a_plugin_name | ) | const |
a_plugin_name | The name of the plugin to be checked |
bool geomtools::manager::is_verbose | ( | ) | const |
Check the verbose flag.
void geomtools::manager::load_plugin | ( | const std::string & | plugin_name_, |
const std::string & | plugin_id_, | ||
const datatools::properties & | plugin_config_, | ||
bool | only_lock_ = false |
||
) |
void geomtools::manager::load_plugins | ( | const datatools::multi_properties & | plugin_config_, |
bool | only_lock_ = false |
||
) |
|
static |
Print the list of geometry identifiers (GIDs) from a manager and given specific rules.
void geomtools::manager::print_plugins | ( | std::ostream & | out = std::clog , |
const std::string & | title = "" , |
||
const std::string & | indent = "" |
||
) | const |
void geomtools::manager::register_plugin_type | ( | const std::string & | plugin_id | ) |
Register a plugin type.
void geomtools::manager::reset | ( | ) |
Reset the geometry manager.
void geomtools::manager::reset_services | ( | ) |
Reset the dictionary of services.
void geomtools::manager::set_logging_priority | ( | datatools::logger::priority | a_logging_priority | ) |
Set the logging priority threshold.
void geomtools::manager::set_mapping_requested | ( | bool | ) |
Request the build of the mapping.
void geomtools::manager::set_services | ( | datatools::service_dict_type & | services_ | ) |
Set the dictionary of services.
void geomtools::manager::set_setup_description | ( | const std::string & | ) |
Set the description of the setup.
void geomtools::manager::set_setup_label | ( | const std::string & | ) |
Set the label of the setup.
void geomtools::manager::set_setup_version | ( | const std::string & | ) |
Set the version of the setup.
void geomtools::manager::set_world_name | ( | const std::string & | ) |
Set the name of the world volume.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
void geomtools::manager::unregister_plugin_type | ( | const std::string & | plugin_id | ) |
Unregister a plugin type.
|
protected |
Logging priority threshold.