16 #ifndef EMFIELD_ELECTROMAGNETIC_FIELD_MANAGER_H 17 #define EMFIELD_ELECTROMAGNETIC_FIELD_MANAGER_H 1 25 #include <boost/cstdint.hpp> 26 #include <boost/scoped_ptr.hpp> 36 class service_manager;
112 void load(
const std::string & field_definitions_filename_);
115 virtual void tree_dump(std::ostream & out_ = std::clog,
116 const std::string & title_ =
"",
117 const std::string & indent_ =
"",
118 bool inherit_ =
false)
const;
124 bool has_field(
const std::string & field_name_)
const;
158 bool _factory_verbose_;
159 bool _factory_preload_;
160 bool _build_geom_map_;
164 boost::scoped_ptr<emfield_factory_type> _factory_register_;
168 boost::scoped_ptr<geom_map> _geom_map_;
176 #endif // EMFIELD_ELECTROMAGNETIC_FIELD_MANAGER_H 1 bool has_field(const std::string &field_name_) const
CHeck if a field exists, given its name.
init_flags
Initialization flag.
Definition: electromagnetic_field_manager.h:55
electromagnetic_field_manager(uint32_t flags_=0)
Default constructor.
void _set_defaults()
Set default attributes' values.
bool is_initialized() const
Check initialization status.
virtual ~electromagnetic_field_manager()
Destructor.
Definition: electromagnetic_field_manager.h:56
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
void set_logging_priority(datatools::logger::priority priority_)
Set the logging priority.
bool has_service_manager() const
Check if a service manager is referenced.
base_electromagnetic_field & grab_field(const std::string &field_name_)
Return a mutable reference to an existing field.
std::map< std::string, handle_type > field_dict_type
Definition: base_electromagnetic_field.h:49
void reset()
Reset the manager.
void load(const std::string &field_definitions_filename_)
Load the definitions of some EM fields from a file, given its name.
const geom_map & get_geom_map() const
Return the dictionary of geometry/EM-field associations.
datatools::logger::priority get_logging_priority() const
Return the logging priority.
Abstract base class for all electromagnetic field.
Definition: base_electromagnetic_field.h:43
void set_geometry_manager(const geomtools::manager &)
Set the reference to a geometry manager.
const base_electromagnetic_field & get_field(const std::string &field_name_) const
Return a const reference to an existing field.
void set_service_manager(datatools::service_manager &)
Set the reference to a service manager.
void reset_service_manager()
Reset the reference to a service manager.
void set_factory_preload(bool)
Set the factory preload flag.
bool has_geom_map() const
Check if a geometry/EM-fields association map is defined.
const base_electromagnetic_field::field_dict_type & get_fields() const
Return the dictionary of created fields.
Electromagnetic field manager.
Definition: electromagnetic_field_manager.h:49
void set_factory_verbose(bool)
Set the factory verbose flag.
Top-level namespace of the Bayeux/emfield module library.
Definition: base_electromagnetic_field.h:40
void initialize(const datatools::properties &setup_)
Initialize the manager.
Mapping of electromagnetic fields with geometry volume.
Definition: geom_map.h:47
const geomtools::manager & get_geometry_manager() const
Return a const reference to a geometry manager.
Macros to automatically generate some parts of the electromagnetic fields interface.
Definition: electromagnetic_field_manager.h:57
void _set_initialized(bool initialized_)
Set the initialization flag.
bool has_geometry_manager() const
Check if a geometry manager is referenced.
base_electromagnetic_field::factory_register_type emfield_factory_type
Type alias for the factory.
Definition: electromagnetic_field_manager.h:61