Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The factory of geometry models. More...
#include <bayeux/geomtools/model_factory.h>
Public Member Functions | |
bool | is_locked () const |
Check if the factory is locked. More... | |
datatools::logger::priority | get_logging_priority () const |
Get the logging priority. More... | |
void | set_logging_priority (datatools::logger::priority) |
Set the logging priority. More... | |
bool | is_debug () const |
Check the logging debug flag. More... | |
bool | is_trace () const |
Check the logging trace flag. More... | |
void | set_debug (bool) |
Set the logging debug flag. More... | |
const datatools::multi_properties & | get_mp () const |
Return a non mutable reference to the embedded multi-container of parameters. More... | |
datatools::multi_properties & | grab_mp () |
Return a mutable reference to the embedded multi-container of parameters. More... | |
const models_col_type & | get_models () const |
Get a non-mutable collection of geometry models. More... | |
const logical_volume::dict_type & | get_logicals () const |
Get a non-mutable collection of geometry logicals associated to models. More... | |
model_factory (datatools::logger::priority lp_=datatools::logger::PRIO_FATAL) | |
Constructor. More... | |
model_factory (bool debug_, bool core_factory_verbose_=false) | |
Constructor. More... | |
virtual | ~model_factory () |
Destructor. More... | |
void | load (const std::string &mprop_file_) |
Load a geometry models definition file. More... | |
void | load_geom_list (const std::string &geom_list_file_) |
Load a file that contains a list of geometry models definition filenames : More... | |
void | lock () |
Lock the geometry model factory. More... | |
void | unlock () |
Unlock the geometry model factory. More... | |
void | reset () |
Reset the factory. More... | |
void | add_property_prefix (const std::string &prefix_) |
Add a property prefix to be preserved in logicals. More... | |
const std::vector< std::string > & | get_property_prefixes () const |
Return the array of exported property prefixes. 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... | |
bool | has_shape_factory () const |
Check if an external shape factory is referenced. More... | |
void | set_shape_factory (shape_factory &) |
Set a reference to an external shape factory. More... | |
shape_factory & | grab_shape_factory () |
Return a reference to an external shape factory. More... | |
const shape_factory & | get_shape_factory () const |
Return a reference to an external shape factory. 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 const std::string & | default_world_label () |
Return the default world label used for the top-level logical volume. More... | |
static bool | validate_name_for_gdml (const std::string &candidate_) |
Validate a name for logical volume with respect to forseen GDML export. More... | |
static int | print_list_of_models (const geomtools::model_factory &mf_, const std::string &command_, const std::string &argv_="", std::ostream &out_=std::clog) |
Print the list of geometry models. More... | |
static int | print_list_of_logicals (const geomtools::model_factory &mf_, const std::string &command_, const std::string &argv_="", std::ostream &out_=std::clog) |
Print the list of geometry logical volumes. 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_) |
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... | |
The factory of geometry models.
|
explicit |
Constructor.
geomtools::model_factory::model_factory | ( | bool | debug_, |
bool | core_factory_verbose_ = false |
||
) |
Constructor.
|
virtual |
Destructor.
void geomtools::model_factory::add_property_prefix | ( | const std::string & | prefix_ | ) |
Add a property prefix to be preserved in logicals.
|
static |
Return the default world label used for the top-level logical volume.
datatools::logger::priority geomtools::model_factory::get_logging_priority | ( | ) | const |
Get the logging priority.
const logical_volume::dict_type& geomtools::model_factory::get_logicals | ( | ) | const |
Get a non-mutable collection of geometry logicals associated to models.
const models_col_type& geomtools::model_factory::get_models | ( | ) | const |
Get a non-mutable collection of geometry models.
const datatools::multi_properties& geomtools::model_factory::get_mp | ( | ) | const |
Return a non mutable reference to the embedded multi-container of parameters.
const std::vector<std::string>& geomtools::model_factory::get_property_prefixes | ( | ) | const |
Return the array of exported property prefixes.
const shape_factory& geomtools::model_factory::get_shape_factory | ( | ) | const |
Return a reference to an external shape factory.
datatools::multi_properties& geomtools::model_factory::grab_mp | ( | ) |
Return a mutable reference to the embedded multi-container of parameters.
shape_factory& geomtools::model_factory::grab_shape_factory | ( | ) |
Return a reference to an external shape factory.
bool geomtools::model_factory::has_shape_factory | ( | ) | const |
Check if an external shape factory is referenced.
bool geomtools::model_factory::is_debug | ( | ) | const |
Check the logging debug flag.
bool geomtools::model_factory::is_locked | ( | ) | const |
Check if the factory is locked.
bool geomtools::model_factory::is_trace | ( | ) | const |
Check the logging trace flag.
void geomtools::model_factory::load | ( | const std::string & | mprop_file_ | ) |
Load a geometry models definition file.
void geomtools::model_factory::load_geom_list | ( | const std::string & | geom_list_file_ | ) |
Load a file that contains a list of geometry models definition filenames :
void geomtools::model_factory::lock | ( | ) |
Lock the geometry model factory.
|
static |
Print the list of geometry logical volumes.
|
static |
Print the list of geometry models.
void geomtools::model_factory::reset | ( | ) |
Reset the factory.
void geomtools::model_factory::set_debug | ( | bool | ) |
Set the logging debug flag.
void geomtools::model_factory::set_logging_priority | ( | datatools::logger::priority | ) |
Set the logging priority.
void geomtools::model_factory::set_shape_factory | ( | shape_factory & | ) |
Set a reference to an external shape factory.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
void geomtools::model_factory::unlock | ( | ) |
Unlock the geometry model factory.
|
static |
Validate a name for logical volume with respect to forseen GDML export.