16 #ifndef MATERIALS_MANAGER_H 17 #define MATERIALS_MANAGER_H 1 27 #include <boost/scoped_ptr.hpp> 40 class multi_properties;
91 bool has_isotope(
const std::string & entry_name_)
const;
97 bool has_element(
const std::string & entry_name_)
const;
103 bool has_material(
const std::string & entry_name_)
const;
109 bool is_alias(
const std::string & entry_name_)
const;
112 std::string
alias_of(
const std::string & entry_name_)
const;
142 virtual void tree_dump(std::ostream & out_ = std::clog,
143 const std::string & title_ =
"",
144 const std::string & indent_ =
"",
145 bool inherit_ =
false)
const;
192 bool _load_isotope_mass_data_;
193 bool _load_isotope_decay_data_;
194 std::set<std::string> _material_exported_prefixes_;
195 bool _alias_allow_overload_;
196 bool _alias_of_alias_allowed_;
198 boost::scoped_ptr<factory> _creator_;
202 std::list<std::string> _ordered_materials_;
214 #endif // MATERIALS_MANAGER_H bool is_initialized() const
Check initialization flag.
bool has_material(const std::string &entry_name_) const
Check if a given material is defined.
std::map< std::string, smart_ref< element > > element_dict_type
Definition: tools.h:149
const element & get_element(const std::string &entry_name_) const
Return a reference to a element, given its name.
static bool validate_name_for_gdml(const std::string &candidate_)
Validate a name for isotope, element or material with respect to forseen GDML export.
bool is_load_isotope_mass_data() const
Test the flag to load mass data for isotopes.
const std::set< std::string > & get_material_exported_prefixes() const
Return the set of exported property prefixes for materials.
bool is_alias_of_alias_allowed() const
Check if alias of alias are allowed.
void set_alias_allow_overload(bool aao_)
Set the alias overloading flag.
bool has_element(const std::string &entry_name_) const
Check if a given element is defined.
const material_dict_type & get_materials() const
Return the dictionary of materials.
void set_alias_of_alias_allowed(bool aoaa_)
Set the alias of alias allow flag.
The manager object for isotopes, elements and materials.
Definition: manager.h:53
void _set_defaults()
Set default values to attributes.
manager()
Default constructor.
void lock()
Lock the manager.
std::map< std::string, smart_ref< isotope > > isotope_dict_type
Definition: tools.h:146
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
bool has_isotope(const std::string &entry_name_) const
Check if a given isotope is defined.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
bool is_alias(const std::string &entry_name_) const
Check if an alias with given name is defined.
virtual ~manager()
Destructor.
void set_logging_priority(datatools::logger::priority)
Set logging priority.
void load(const datatools::multi_properties &config_)
Load a configuration file.
void initialize(const datatools::properties &setup_)
Initialize.
std::map< std::string, smart_ref< material > > material_dict_type
Definition: tools.h:150
std::string alias_of(const std::string &entry_name_) const
Return the material name of which an alias is associated.
A simple class to handle known isotopes (ZAI) and their basic properties (mass & decays).
Definition: isotope.h:60
void unlock()
Unlock the manager.
const isotope_dict_type & get_isotopes() const
Return the dictionary of isotopes.
bool is_load_isotope_decay_data() const
Test the flag to load decay data for isotopes.
void set_debug(bool)
Set debug flag.
Utilities for logging information.
const isotope & get_isotope(const std::string &entry_name_) const
Return a reference to a isotope, given its name.
void set_load_isotope_mass_data(bool)
Set the flag to load mass data for isotopes.
void add_material_exported_prefix(const std::string &)
Add an exported property prefix for materials.
const element_dict_type & get_elements() const
Return the dictionary of elements.
const material & get_material(const std::string &entry_name_) const
Return a reference to a material, given its name.
bool is_alias_allow_overload() const
Check if aliases can be overloaded by other aliases declared after them.
void set_load_isotope_decay_data(bool)
Set the flag to load decay data for isotopes.
The description of a material.
Definition: material.h:116
const std::list< std::string > & get_ordered_materials() const
Return the ordered list of materials.
datatools::logger::priority get_logging_priority() const
Return the logging priority.
bool is_debug() const
Check debug flag.
The description of an element.
Definition: element.h:93
Top-level namespace of the Bayeux/materials module library.
Definition: geom_manager_utils.h:14
bool is_locked() const
Check lock flag.