Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
The manager object for isotopes, elements and materials. More...
#include <bayeux/materials/manager.h>
Public Member Functions | |
manager () | |
Default constructor. More... | |
virtual | ~manager () |
Destructor. More... | |
bool | is_initialized () const |
Check initialization flag. More... | |
bool | is_debug () const |
Check debug flag. More... | |
void | set_debug (bool) |
Set debug flag. More... | |
bool | is_locked () const |
Check lock flag. More... | |
bool | is_alias_of_alias_allowed () const |
Check if alias of alias are allowed. More... | |
void | set_alias_of_alias_allowed (bool aoaa_) |
Set the alias of alias allow flag. More... | |
bool | is_alias_allow_overload () const |
Check if aliases can be overloaded by other aliases declared after them. More... | |
void | set_alias_allow_overload (bool aao_) |
Set the alias overloading flag. More... | |
bool | has_isotope (const std::string &entry_name_) const |
Check if a given isotope is defined. More... | |
const isotope & | get_isotope (const std::string &entry_name_) const |
Return a reference to a isotope, given its name. More... | |
bool | has_element (const std::string &entry_name_) const |
Check if a given element is defined. More... | |
const element & | get_element (const std::string &entry_name_) const |
Return a reference to a element, given its name. More... | |
bool | has_material (const std::string &entry_name_) const |
Check if a given material is defined. More... | |
const material & | get_material (const std::string &entry_name_) const |
Return a reference to a material, given its name. More... | |
bool | is_alias (const std::string &entry_name_) const |
Check if an alias with given name is defined. More... | |
std::string | alias_of (const std::string &entry_name_) const |
Return the material name of which an alias is associated. More... | |
const isotope_dict_type & | get_isotopes () const |
Return the dictionary of isotopes. More... | |
const element_dict_type & | get_elements () const |
Return the dictionary of elements. More... | |
const material_dict_type & | get_materials () const |
Return the dictionary of materials. More... | |
const std::list< std::string > & | get_ordered_materials () const |
Return the ordered list of materials. More... | |
void | load (const datatools::multi_properties &config_) |
Load a configuration file. More... | |
void | initialize (const datatools::properties &setup_) |
Initialize. More... | |
void | reset () |
Reset. More... | |
void | lock () |
Lock the manager. More... | |
void | unlock () |
Unlock the 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... | |
void | set_logging_priority (datatools::logger::priority) |
Set logging priority. More... | |
datatools::logger::priority | get_logging_priority () const |
Return the logging priority. More... | |
bool | is_load_isotope_mass_data () const |
Test the flag to load mass data for isotopes. More... | |
void | set_load_isotope_mass_data (bool) |
Set the flag to load mass data for isotopes. More... | |
bool | is_load_isotope_decay_data () const |
Test the flag to load decay data for isotopes. More... | |
void | set_load_isotope_decay_data (bool) |
Set the flag to load decay data for isotopes. More... | |
void | add_material_exported_prefix (const std::string &) |
Add an exported property prefix for materials. More... | |
const std::set< std::string > & | get_material_exported_prefixes () const |
Return the set of exported property prefixes for materials. 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 bool | validate_name_for_gdml (const std::string &candidate_) |
Validate a name for isotope, element or material with respect to forseen GDML export. 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 | |
void | _set_defaults () |
Set default values to attributes. 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... | |
The manager object for isotopes, elements and materials.
The material manager stores dictionaries for isotopes, elements and materials. Materials can be addressed through material aliases. The manager uses an embedded factory to instantiate isotopes, elements and materials objects.
materials::manager::manager | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
protected |
Set default values to attributes.
void materials::manager::add_material_exported_prefix | ( | const std::string & | ) |
Add an exported property prefix for materials.
2012-11-03 FM : support for various "Material Properties Tables" ala Geant4 or display properties:
std::string materials::manager::alias_of | ( | const std::string & | entry_name_ | ) | const |
Return the material name of which an alias is associated.
const element& materials::manager::get_element | ( | const std::string & | entry_name_ | ) | const |
Return a reference to a element, given its name.
const element_dict_type& materials::manager::get_elements | ( | ) | const |
Return the dictionary of elements.
const isotope& materials::manager::get_isotope | ( | const std::string & | entry_name_ | ) | const |
Return a reference to a isotope, given its name.
const isotope_dict_type& materials::manager::get_isotopes | ( | ) | const |
Return the dictionary of isotopes.
datatools::logger::priority materials::manager::get_logging_priority | ( | ) | const |
Return the logging priority.
const material& materials::manager::get_material | ( | const std::string & | entry_name_ | ) | const |
Return a reference to a material, given its name.
const std::set<std::string>& materials::manager::get_material_exported_prefixes | ( | ) | const |
Return the set of exported property prefixes for materials.
const material_dict_type& materials::manager::get_materials | ( | ) | const |
Return the dictionary of materials.
const std::list<std::string>& materials::manager::get_ordered_materials | ( | ) | const |
Return the ordered list of materials.
bool materials::manager::has_element | ( | const std::string & | entry_name_ | ) | const |
Check if a given element is defined.
bool materials::manager::has_isotope | ( | const std::string & | entry_name_ | ) | const |
Check if a given isotope is defined.
bool materials::manager::has_material | ( | const std::string & | entry_name_ | ) | const |
Check if a given material is defined.
void materials::manager::initialize | ( | const datatools::properties & | setup_ | ) |
Initialize.
bool materials::manager::is_alias | ( | const std::string & | entry_name_ | ) | const |
Check if an alias with given name is defined.
bool materials::manager::is_alias_allow_overload | ( | ) | const |
Check if aliases can be overloaded by other aliases declared after them.
bool materials::manager::is_alias_of_alias_allowed | ( | ) | const |
Check if alias of alias are allowed.
bool materials::manager::is_debug | ( | ) | const |
Check debug flag.
bool materials::manager::is_initialized | ( | ) | const |
Check initialization flag.
bool materials::manager::is_load_isotope_decay_data | ( | ) | const |
Test the flag to load decay data for isotopes.
bool materials::manager::is_load_isotope_mass_data | ( | ) | const |
Test the flag to load mass data for isotopes.
bool materials::manager::is_locked | ( | ) | const |
Check lock flag.
void materials::manager::load | ( | const datatools::multi_properties & | config_ | ) |
Load a configuration file.
void materials::manager::lock | ( | ) |
Lock the manager.
void materials::manager::reset | ( | ) |
Reset.
void materials::manager::set_alias_allow_overload | ( | bool | aao_ | ) |
Set the alias overloading flag.
void materials::manager::set_alias_of_alias_allowed | ( | bool | aoaa_ | ) |
Set the alias of alias allow flag.
void materials::manager::set_debug | ( | bool | ) |
Set debug flag.
void materials::manager::set_load_isotope_decay_data | ( | bool | ) |
Set the flag to load decay data for isotopes.
void materials::manager::set_load_isotope_mass_data | ( | bool | ) |
Set the flag to load mass data for isotopes.
void materials::manager::set_logging_priority | ( | datatools::logger::priority | ) |
Set logging priority.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
void materials::manager::unlock | ( | ) |
Unlock the manager.
|
static |
Validate a name for isotope, element or material with respect to forseen GDML export.