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

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>

Inheritance diagram for geomtools::manager:
datatools::i_tree_dumpable

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_entryplugins_dict_type
 Dictionary of plugin entries. More...
 
typedef datatools::handle< base_pluginplugin_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_factoryget_shape_factory () const
 Return a reference to the non mutable factory of shapes. More...
 
geomtools::shape_factorygrab_shape_factory ()
 Return a reference to the mutable factory of shapes. More...
 
const geomtools::model_factoryget_factory () const
 Return a reference to the non mutable factory of geometry models. More...
 
geomtools::model_factorygrab_factory ()
 Return a reference to the mutable factory of geometry models. More...
 
const geomtools::id_mgrget_id_mgr () const
 Return a reference to the non mutable geometry ID manager. More...
 
geomtools::id_mgrgrab_id_mgr ()
 Return a reference to the mutable geometry ID manager. More...
 
const geomtools::mappingget_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_typeget_plugins () const
 
plugins_dict_typegrab_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...
 

Detailed Description

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.

Member Typedef Documentation

◆ plugin_handle_type

◆ plugins_dict_type

typedef std::map<std::string, plugin_entry> geomtools::manager::plugins_dict_type

Dictionary of plugin entries.

Constructor & Destructor Documentation

◆ manager()

geomtools::manager::manager ( )

Default constructor.

◆ ~manager()

virtual geomtools::manager::~manager ( )
virtual

Destructor.

Member Function Documentation

◆ _create_plugin()

void geomtools::manager::_create_plugin ( plugin_entry entry)
protected

◆ _initialize_plugin()

void geomtools::manager::_initialize_plugin ( plugin_entry entry)
protected

◆ _load_plugin()

void geomtools::manager::_load_plugin ( const std::string &  name,
const std::string &  id,
const datatools::properties config 
)
protected

◆ _post_init()

virtual void geomtools::manager::_post_init ( const datatools::properties config_)
protectedvirtual

◆ _pre_init()

virtual void geomtools::manager::_pre_init ( const datatools::properties config_)
protectedvirtual

◆ _preload_plugins_global_dict()

void geomtools::manager::_preload_plugins_global_dict ( )
protected

◆ _reset_plugin()

void geomtools::manager::_reset_plugin ( plugin_entry entry)
protected

◆ build_mapping()

void geomtools::manager::build_mapping ( const datatools::properties config_)

Build the mapping.

◆ can_drop_plugin()

bool geomtools::manager::can_drop_plugin ( const std::string &  plugin_name_)

◆ clear_plugins()

void geomtools::manager::clear_plugins ( )

Clear the plugins.

◆ drop_plugin()

void geomtools::manager::drop_plugin ( const std::string &  plugin_name_)

◆ fetch_setup_version_id()

void geomtools::manager::fetch_setup_version_id ( datatools::version_id vid_) const

Construct the version id associated to the setup.

◆ get_factory()

const geomtools::model_factory& geomtools::manager::get_factory ( ) const

Return a reference to the non mutable factory of geometry models.

◆ get_id_mgr()

const geomtools::id_mgr& geomtools::manager::get_id_mgr ( ) const

Return a reference to the non mutable geometry ID manager.

◆ get_logging_priority()

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

Return the logging priority threshold.

◆ get_mapping()

const geomtools::mapping& geomtools::manager::get_mapping ( const std::string &  mapping_name_ = "") const

Return a reference to the non mutable mapping with explicit name.

◆ get_plugin()

template<class T >
const T & geomtools::manager::get_plugin ( const std::string &  a_plugin_name) const
Parameters
a_plugin_nameThe name of the plugin to be grabbed
Returns
a non-mutable reference to the plugin instance requested by name and type

◆ get_plugins()

const plugins_dict_type& geomtools::manager::get_plugins ( ) const

◆ get_plugins_factory_register()

const base_plugin::factory_register_type& geomtools::manager::get_plugins_factory_register ( )

Return a reference to the plugin factory register.

◆ get_setup_description()

const std::string& geomtools::manager::get_setup_description ( ) const

Return the description of the setup.

◆ get_setup_label()

const std::string& geomtools::manager::get_setup_label ( ) const

Return the label of the setup.

◆ get_setup_version()

const std::string& geomtools::manager::get_setup_version ( ) const

Return the version of the setup.

◆ get_shape_factory()

const geomtools::shape_factory& geomtools::manager::get_shape_factory ( ) const

Return a reference to the non mutable factory of shapes.

◆ get_world_name()

const std::string& geomtools::manager::get_world_name ( ) const

Return the name of the world volume.

◆ grab_factory()

geomtools::model_factory& geomtools::manager::grab_factory ( )

Return a reference to the mutable factory of geometry models.

◆ grab_id_mgr()

geomtools::id_mgr& geomtools::manager::grab_id_mgr ( )

Return a reference to the mutable geometry ID manager.

◆ grab_plugin()

template<class T >
T & geomtools::manager::grab_plugin ( const std::string &  a_plugin_name)
Parameters
a_plugin_nameThe name of the plugin to be grabbed
Returns
a mutable reference to the plugin instance requested by name and type

◆ grab_plugins()

plugins_dict_type& geomtools::manager::grab_plugins ( )

◆ grab_shape_factory()

geomtools::shape_factory& geomtools::manager::grab_shape_factory ( )

Return a reference to the mutable factory of shapes.

◆ has_plugin()

bool geomtools::manager::has_plugin ( const std::string &  a_plugin_name) const
Parameters
a_plugin_nameThe name of the plugin to be checked
Returns
true if the manager hosts the plugin requested by name

◆ has_plugin_type()

bool geomtools::manager::has_plugin_type ( const std::string &  plugin_id) const

Check if some plugin type is known.

◆ has_services()

bool geomtools::manager::has_services ( ) const

Check if manager has services.

◆ init()

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

Initialize the geometry manager from a container of properties.

◆ initialize()

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

Initialize the geometry manager from a container of properties.

◆ is_debug()

bool geomtools::manager::is_debug ( ) const

Check the debug flag.

◆ is_initialized()

bool geomtools::manager::is_initialized ( ) const

Check the initialization flag.

◆ is_mapping_available()

bool geomtools::manager::is_mapping_available ( ) const

Check if the mapping is built.

◆ is_mapping_requested()

bool geomtools::manager::is_mapping_requested ( ) const

Check if the build of the mapping has been requested.

◆ is_plugin_a()

template<class T >
bool geomtools::manager::is_plugin_a ( const std::string &  a_plugin_name) const
Parameters
a_plugin_nameThe name of the plugin to be checked
Returns
true if the plugin is of the requested type

◆ is_verbose()

bool geomtools::manager::is_verbose ( ) const

Check the verbose flag.

◆ load_plugin()

void geomtools::manager::load_plugin ( const std::string &  plugin_name_,
const std::string &  plugin_id_,
const datatools::properties plugin_config_,
bool  only_lock_ = false 
)

◆ load_plugins()

void geomtools::manager::load_plugins ( const datatools::multi_properties plugin_config_,
bool  only_lock_ = false 
)

◆ print_list_of_gids()

static int geomtools::manager::print_list_of_gids ( const geomtools::manager mgr_,
const std::string &  command_,
const std::string &  rules_ = "",
std::ostream &  out_ = std::clog 
)
static

Print the list of geometry identifiers (GIDs) from a manager and given specific rules.

◆ print_plugins()

void geomtools::manager::print_plugins ( std::ostream &  out = std::clog,
const std::string &  title = "",
const std::string &  indent = "" 
) const

◆ register_plugin_type()

template<class PluginClass >
void geomtools::manager::register_plugin_type ( const std::string &  plugin_id)

Register a plugin type.

◆ reset()

void geomtools::manager::reset ( )

Reset the geometry manager.

◆ reset_services()

void geomtools::manager::reset_services ( )

Reset the dictionary of services.

◆ set_logging_priority()

void geomtools::manager::set_logging_priority ( datatools::logger::priority  a_logging_priority)

Set the logging priority threshold.

◆ set_mapping_requested()

void geomtools::manager::set_mapping_requested ( bool  )

Request the build of the mapping.

◆ set_services()

void geomtools::manager::set_services ( datatools::service_dict_type services_)

Set the dictionary of services.

◆ set_setup_description()

void geomtools::manager::set_setup_description ( const std::string &  )

Set the description of the setup.

◆ set_setup_label()

void geomtools::manager::set_setup_label ( const std::string &  )

Set the label of the setup.

◆ set_setup_version()

void geomtools::manager::set_setup_version ( const std::string &  )

Set the version of the setup.

◆ set_world_name()

void geomtools::manager::set_world_name ( const std::string &  )

Set the name of the world volume.

◆ tree_dump()

virtual void geomtools::manager::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.

◆ unregister_plugin_type()

void geomtools::manager::unregister_plugin_type ( const std::string &  plugin_id)

Unregister a plugin type.

Member Data Documentation

◆ _logging

datatools::logger::priority geomtools::manager::_logging
protected

Logging priority threshold.


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