Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | List of all members
geomtools::model_factory Class Reference

The factory of geometry models. More...

#include <bayeux/geomtools/model_factory.h>

Inheritance diagram for geomtools::model_factory:
datatools::i_tree_dumpable

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_propertiesget_mp () const
 Return a non mutable reference to the embedded multi-container of parameters. More...
 
datatools::multi_propertiesgrab_mp ()
 Return a mutable reference to the embedded multi-container of parameters. More...
 
const models_col_typeget_models () const
 Get a non-mutable collection of geometry models. More...
 
const logical_volume::dict_typeget_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_factorygrab_shape_factory ()
 Return a reference to an external shape factory. More...
 
const shape_factoryget_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...
 

Detailed Description

The factory of geometry models.

Constructor & Destructor Documentation

◆ model_factory() [1/2]

geomtools::model_factory::model_factory ( datatools::logger::priority  lp_ = datatools::logger::PRIO_FATAL)
explicit

Constructor.

◆ model_factory() [2/2]

geomtools::model_factory::model_factory ( bool  debug_,
bool  core_factory_verbose_ = false 
)

Constructor.

◆ ~model_factory()

virtual geomtools::model_factory::~model_factory ( )
virtual

Destructor.

Member Function Documentation

◆ add_property_prefix()

void geomtools::model_factory::add_property_prefix ( const std::string &  prefix_)

Add a property prefix to be preserved in logicals.

◆ default_world_label()

static const std::string& geomtools::model_factory::default_world_label ( )
static

Return the default world label used for the top-level logical volume.

◆ get_logging_priority()

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

Get the logging priority.

◆ get_logicals()

const logical_volume::dict_type& geomtools::model_factory::get_logicals ( ) const

Get a non-mutable collection of geometry logicals associated to models.

◆ get_models()

const models_col_type& geomtools::model_factory::get_models ( ) const

Get a non-mutable collection of geometry models.

◆ get_mp()

const datatools::multi_properties& geomtools::model_factory::get_mp ( ) const

Return a non mutable reference to the embedded multi-container of parameters.

◆ get_property_prefixes()

const std::vector<std::string>& geomtools::model_factory::get_property_prefixes ( ) const

Return the array of exported property prefixes.

◆ get_shape_factory()

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

Return a reference to an external shape factory.

◆ grab_mp()

datatools::multi_properties& geomtools::model_factory::grab_mp ( )

Return a mutable reference to the embedded multi-container of parameters.

◆ grab_shape_factory()

shape_factory& geomtools::model_factory::grab_shape_factory ( )

Return a reference to an external shape factory.

◆ has_shape_factory()

bool geomtools::model_factory::has_shape_factory ( ) const

Check if an external shape factory is referenced.

◆ is_debug()

bool geomtools::model_factory::is_debug ( ) const

Check the logging debug flag.

◆ is_locked()

bool geomtools::model_factory::is_locked ( ) const

Check if the factory is locked.

◆ is_trace()

bool geomtools::model_factory::is_trace ( ) const

Check the logging trace flag.

◆ load()

void geomtools::model_factory::load ( const std::string &  mprop_file_)

Load a geometry models definition file.

◆ load_geom_list()

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 :

◆ lock()

void geomtools::model_factory::lock ( )

Lock the geometry model factory.

◆ print_list_of_logicals()

static int geomtools::model_factory::print_list_of_logicals ( const geomtools::model_factory mf_,
const std::string &  command_,
const std::string &  argv_ = "",
std::ostream &  out_ = std::clog 
)
static

Print the list of geometry logical volumes.

◆ print_list_of_models()

static int geomtools::model_factory::print_list_of_models ( const geomtools::model_factory mf_,
const std::string &  command_,
const std::string &  argv_ = "",
std::ostream &  out_ = std::clog 
)
static

Print the list of geometry models.

◆ reset()

void geomtools::model_factory::reset ( )

Reset the factory.

◆ set_debug()

void geomtools::model_factory::set_debug ( bool  )

Set the logging debug flag.

◆ set_logging_priority()

void geomtools::model_factory::set_logging_priority ( datatools::logger::priority  )

Set the logging priority.

◆ set_shape_factory()

void geomtools::model_factory::set_shape_factory ( shape_factory )

Set a reference to an external shape factory.

◆ tree_dump()

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

◆ unlock()

void geomtools::model_factory::unlock ( )

Unlock the geometry model factory.

◆ validate_name_for_gdml()

static bool geomtools::model_factory::validate_name_for_gdml ( const std::string &  candidate_)
static

Validate a name for logical volume with respect to forseen GDML export.


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