31 #ifndef GENVTX_MANAGER_H 32 #define GENVTX_MANAGER_H 1 41 #include <boost/scoped_ptr.hpp> 58 class service_manager;
170 void load_vg(
const std::string & vg_name_,
171 const std::string & vg_id_,
203 virtual void tree_dump(std::ostream & out_ = std::clog,
204 const std::string & title_ =
"",
205 const std::string & indent_ =
"",
206 bool inherit_ =
false)
const;
216 void vg_names(std::vector<std::string> & names_,
217 std::vector<std::string> & descriptions_,
218 std::string & current_)
const;
222 void _load_vg(
const std::string & vg_name_,
223 const std::string & vg_id_,
243 genvtx::i_vertex_generator::factory_register_type _factory_register_;
244 bool _factory_preload_;
245 bool _factory_debug_;
247 std::string _rng_id_;
254 std::string _current_vg_name_;
269 #endif // GENVTX_MANAGER_H bool has_geometry_manager() const
Check the geometry manager.
bool is_initialized() const
Check initialization flag.
void _reset_vg(genvtx::vg_entry_type &vg_entry_)
bool is_debug() const
Check debug flag.
void set_geometry_manager(const geomtools::manager &)
Set the geometry manager.
void _create_vg(genvtx::vg_entry_type &vg_entry_)
Top-level namespace of the Bayeux/genvtx module library.
Definition: box_model_vg.h:32
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print method.
void _load_vg(const std::string &vg_name_, const std::string &vg_id_, const datatools::properties &vg_config_)
void set_logging_priority(datatools::logger::priority)
datatools::logger::priority get_logging_priority() const
bool has_external_random() const
Check the external PRNG.
void activate_current_vg(const std::string &vg_name_="")
Activate a given vertex generator as the current one.
virtual void create_vg(genvtx::vg_entry_type &vg_entry_)
datatools::service_manager & grab_service_manager()
Return mutable reference to the service manager.
void load_vgs(const datatools::multi_properties &vgs_config_)
Load definitions of many vertex generators.
bool is_time_generator() const
Check is manager can fire vertex and time.
Vertex generator manager.
Definition: manager.h:81
genvtx::vg_handle_type grab_generator(const std::string &vg_name_)
Return a mutable reference to a generator addressed by name.
bool has_generator(const std::string &) const
Check if a generator with given name is available.
bool has_random_seed() const
Check the seed for embedded PRNG.
void set_debug(bool)
Set debug flag.
void initialize(const datatools::properties &config_)
Main initialization method.
void desactivate_current_vg()
Deactivate the current vertex generator.
const std::string & get_generator_name() const
int get_random_seed() const
Return the seed for embedded PRNG.
bool has_generator_name() const
bool has_current_vg() const
Check if a current vertex generator is defined.
genvtx::i_vertex_generator & grab(const std::string &vg_name_)
const mygsl::rng & get_random() const
Return the non mutable reference to the embedded PRNG.
void set_rng_id(const std::string &rng_id_)
Set the embedded PRNG's id.
void load_vg(const std::string &vg_name_, const std::string &vg_id_, const datatools::properties &vg_config_)
mygsl::rng & grab_random()
Return the mutable reference to the embedded PRNG.
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
void shoot_vertex(geomtools::vector_3d &vertex_)
Main public method to randomize a 3D vertex point.
void set_random_seed(int)
Set the seed for embedded PRNG.
void set_generator_name(const std::string &vg_name_)
const geomtools::manager & get_geometry_manager() const
Return the non mutable reference to the geometry manager.
const std::string & get_rng_id() const
Return the embedded PRNG's id.
manager(datatools::logger::priority p_=datatools::logger::PRIO_WARNING)
Constructor.
virtual ~manager()
Destructor.
datatools::logger::priority _logging_priority
Logging priority threshold.
Definition: manager.h:236
void vg_names(std::vector< std::string > &names_, std::vector< std::string > &descriptions_, std::string ¤t_) const
const datatools::service_manager & get_service_manager() const
Return non mutable reference to the service manager.
Utilities for logging information.
void set_service_manager(datatools::service_manager &)
Set the service manager.
The base interface class for all vertex generator classes.
Definition: i_vertex_generator.h:59
const genvtx::i_vertex_generator & get(const std::string &vg_name_) const
void shoot_vertex_and_time(geomtools::vector_3d &vertex_, double &time_)
Main public method to randomize a 3D vertex point/time.
bool has_service_manager() const
Check the service manager.
void set_external_random(mygsl::rng &)
Set the external PRNG.
std::map< std::string, vg_entry_type > vg_dict_type
Definition: vg_tools.h:125
void _load_vgs(const datatools::multi_properties &vgs_config_)
virtual void initialize_vg(genvtx::vg_entry_type &vg_entry_)
void init(const datatools::properties &config_)
Main initialization method.
bool can_shoot_vertex() const
Check if manager can fire vertex :
void _initialize_vg(genvtx::vg_entry_type &vg_entry_)
Pseudo random number generator.
Definition: rng.h:53
Definition: vg_tools.h:45