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

The manager object for isotopes, elements and materials. More...

#include <bayeux/materials/manager.h>

Inheritance diagram for materials::manager:
datatools::i_tree_dumpable

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 isotopeget_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 elementget_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 materialget_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_typeget_isotopes () const
 Return the dictionary of isotopes. More...
 
const element_dict_typeget_elements () const
 Return the dictionary of elements. More...
 
const material_dict_typeget_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ manager()

materials::manager::manager ( )

Default constructor.

◆ ~manager()

virtual materials::manager::~manager ( )
virtual

Destructor.

Member Function Documentation

◆ _set_defaults()

void materials::manager::_set_defaults ( )
protected

Set default values to attributes.

◆ add_material_exported_prefix()

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:

◆ alias_of()

std::string materials::manager::alias_of ( const std::string &  entry_name_) const

Return the material name of which an alias is associated.

◆ get_element()

const element& materials::manager::get_element ( const std::string &  entry_name_) const

Return a reference to a element, given its name.

◆ get_elements()

const element_dict_type& materials::manager::get_elements ( ) const

Return the dictionary of elements.

◆ get_isotope()

const isotope& materials::manager::get_isotope ( const std::string &  entry_name_) const

Return a reference to a isotope, given its name.

◆ get_isotopes()

const isotope_dict_type& materials::manager::get_isotopes ( ) const

Return the dictionary of isotopes.

◆ get_logging_priority()

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

Return the logging priority.

◆ get_material()

const material& materials::manager::get_material ( const std::string &  entry_name_) const

Return a reference to a material, given its name.

◆ get_material_exported_prefixes()

const std::set<std::string>& materials::manager::get_material_exported_prefixes ( ) const

Return the set of exported property prefixes for materials.

◆ get_materials()

const material_dict_type& materials::manager::get_materials ( ) const

Return the dictionary of materials.

◆ get_ordered_materials()

const std::list<std::string>& materials::manager::get_ordered_materials ( ) const

Return the ordered list of materials.

◆ has_element()

bool materials::manager::has_element ( const std::string &  entry_name_) const

Check if a given element is defined.

◆ has_isotope()

bool materials::manager::has_isotope ( const std::string &  entry_name_) const

Check if a given isotope is defined.

◆ has_material()

bool materials::manager::has_material ( const std::string &  entry_name_) const

Check if a given material is defined.

◆ initialize()

void materials::manager::initialize ( const datatools::properties setup_)

Initialize.

◆ is_alias()

bool materials::manager::is_alias ( const std::string &  entry_name_) const

Check if an alias with given name is defined.

◆ is_alias_allow_overload()

bool materials::manager::is_alias_allow_overload ( ) const

Check if aliases can be overloaded by other aliases declared after them.

◆ is_alias_of_alias_allowed()

bool materials::manager::is_alias_of_alias_allowed ( ) const

Check if alias of alias are allowed.

◆ is_debug()

bool materials::manager::is_debug ( ) const

Check debug flag.

◆ is_initialized()

bool materials::manager::is_initialized ( ) const

Check initialization flag.

◆ is_load_isotope_decay_data()

bool materials::manager::is_load_isotope_decay_data ( ) const

Test the flag to load decay data for isotopes.

◆ is_load_isotope_mass_data()

bool materials::manager::is_load_isotope_mass_data ( ) const

Test the flag to load mass data for isotopes.

◆ is_locked()

bool materials::manager::is_locked ( ) const

Check lock flag.

◆ load()

void materials::manager::load ( const datatools::multi_properties config_)

Load a configuration file.

◆ lock()

void materials::manager::lock ( )

Lock the manager.

◆ reset()

void materials::manager::reset ( )

Reset.

◆ set_alias_allow_overload()

void materials::manager::set_alias_allow_overload ( bool  aao_)

Set the alias overloading flag.

◆ set_alias_of_alias_allowed()

void materials::manager::set_alias_of_alias_allowed ( bool  aoaa_)

Set the alias of alias allow flag.

◆ set_debug()

void materials::manager::set_debug ( bool  )

Set debug flag.

◆ set_load_isotope_decay_data()

void materials::manager::set_load_isotope_decay_data ( bool  )

Set the flag to load decay data for isotopes.

◆ set_load_isotope_mass_data()

void materials::manager::set_load_isotope_mass_data ( bool  )

Set the flag to load mass data for isotopes.

◆ set_logging_priority()

void materials::manager::set_logging_priority ( datatools::logger::priority  )

Set logging priority.

◆ tree_dump()

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

◆ unlock()

void materials::manager::unlock ( )

Unlock the manager.

◆ validate_name_for_gdml()

static bool materials::manager::validate_name_for_gdml ( const std::string &  candidate_)
static

Validate a name for isotope, element or material with respect to forseen GDML export.


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