32 #ifndef GENBB_HELP_MANAGER_H 33 #define GENBB_HELP_MANAGER_H 1 43 #include <boost/cstdint.hpp> 59 class multi_properties;
60 class service_manager;
151 template <
class PgClass>
160 bool has(
const std::string & name_)
const;
170 bool can_drop(
const std::string & name_)
const;
174 void drop(
const std::string & name_);
178 void reset(
const std::string & name_);
183 const std::string &
get_id(
const std::string & name_)
const;
188 const i_genbb &
get(
const std::string & name_)
const;
195 void load(
const std::string & name_,
196 const std::string & id_,
202 const std::string & title_ =
"",
203 const std::string & indent_ =
"")
const;
206 const std::string & title_ =
"",
207 const std::string & indent_ =
"",
208 const std::string & mode_ =
"")
const;
211 virtual void tree_dump(std::ostream & out_ = std::clog,
212 const std::string & title_ =
"",
213 const std::string & indent_ =
"",
214 bool inherit_ =
false)
const;
228 void _load_pg(
const std::string & name_,
229 const std::string & id_,
243 void _set_preload_(
bool preload_);
252 bool _force_initialization_at_load_;
253 std::string _default_generator_;
256 int _embedded_prng_seed_;
265 template <
class PgClass>
268 _factory_register_.registration(id_, boost::factory<PgClass*>());
279 #endif // GENBB_HELP_MANAGER_H bool has_pg_type(const std::string &id_) const
Check if the factory has a given type.
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(const std::string &name_) const
void load(const std::string &name_, const std::string &id_, const datatools::properties &config_)
const mygsl::rng & get_embedded_prng() const
Return a non-mutable reference to the embedded PRNG.
void drop(const std::string &name_)
void set_embedded_prng_seed(int seed_)
Set the seed of the embedded PRNG.
bool can_drop(const std::string &name_) const
GENBB particle generator abstract base class.
Definition: i_genbb.h:59
void dump_particle_generators(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="") const
const mygsl::rng & get_external_prng() const
Return a non-mutable reference to the external PRNG.
const mygsl::rng & get_prng() const
Return a non-mutable reference to the active PRNG.
void _load_pg(const std::string &name_, const std::string &id_, const datatools::properties &config_)
flag_type
Definition: manager.h:73
const std::string & get_id(const std::string &name_) const
const i_genbb & get(const std::string &name_) const
void _preload_global_dict()
void _initialize_pg(detail::pg_entry_type &entry_)
void register_pg_type(const std::string &id_)
Register a given type in the factory.
Definition: manager.h:266
bool is_debug() const
Check the debug flag.
mygsl::rng & grab_prng()
Return a mutable reference to the active PRNG.
void _reset_pg(detail::pg_entry_type &entry_)
i_genbb & grab(const std::string &name_)
datatools::logger::priority get_logging_priority() const
DOCD_CLASS_DECLARATION(my::algo)
Declaration of the OCD support for the my::algo class.
void initialize(const datatools::properties &config_)
Initialize the manager from a container of properties.
const std::string & get_default_generator() const
Return the default generator name.
void reset()
Reset the manager.
Definition: pg_tools.h:46
mygsl::rng & grab_external_prng()
Return a mutable reference to the external PRNG.
bool has_external_prng() const
Check the use of some external PRNG.
void reset_external_prng()
Reset the external PRNG.
void set_debug(bool debug_=true)
Set the debug flag.
Top-level namespace of the Bayeux/genbb_help module library.
Definition: alpha_decay.h:51
void set_external_prng(mygsl::rng &)
Set the external PRNG.
const datatools::factory_register< i_genbb > & get_factory_register() const
bool is_initialized() const
Check the initialization flag.
void print_particle_generators(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", const std::string &mode_="") const
bool has_default_generator() const
Check is a default generator is set.
datatools::factory_register< i_genbb > & grab_factory_register()
void _create_pg(detail::pg_entry_type &entry_)
Utilities for logging information.
mygsl::rng & grab_embedded_prng()
Return a mutable reference to the embedded PRNG.
void set_service_manager(datatools::service_manager &service_mgr_)
void set_logging_priority(datatools::logger::priority p_)
void set_default_generator(const std::string &)
Set the default generator name.
bool has_service_manager() const
manager(datatools::logger::priority p_=datatools::logger::PRIO_WARNING, int flags_=0)
Constructor.
std::map< std::string, pg_entry_type > pg_dict_type
Definition: pg_tools.h:134
void unregister_pg_type(const std::string &id_)
Unregister a given type from the factory.
GENBB particle manager management class.
Definition: manager.h:69
Pseudo random number generator.
Definition: rng.h:53