Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
GENBB particle manager management class. More...
#include <bayeux/genbb_help/manager.h>
Public Types | |
enum | flag_type { BLANK = 0, NO_PRELOAD = datatools::bit_mask::bit00, FORCE_INITIALIZATION_AT_LOAD = datatools::bit_mask::bit01 } |
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... | |
Public Member Functions | |
bool | has_service_manager () const |
void | set_service_manager (datatools::service_manager &service_mgr_) |
void | reset_service () |
manager (datatools::logger::priority p_=datatools::logger::PRIO_WARNING, int flags_=0) | |
Constructor. More... | |
~manager () | |
Destructor. More... | |
bool | is_debug () const |
Check the debug flag. More... | |
void | set_debug (bool debug_=true) |
Set the debug flag. More... | |
bool | has_external_prng () const |
Check the use of some external PRNG. More... | |
void | set_external_prng (mygsl::rng &) |
Set the external PRNG. More... | |
void | reset_external_prng () |
Reset the external PRNG. More... | |
mygsl::rng & | grab_external_prng () |
Return a mutable reference to the external PRNG. More... | |
const mygsl::rng & | get_external_prng () const |
Return a non-mutable reference to the external PRNG. More... | |
mygsl::rng & | grab_embedded_prng () |
Return a mutable reference to the embedded PRNG. More... | |
const mygsl::rng & | get_embedded_prng () const |
Return a non-mutable reference to the embedded PRNG. More... | |
void | set_embedded_prng_seed (int seed_) |
Set the seed of the embedded PRNG. More... | |
mygsl::rng & | grab_prng () |
Return a mutable reference to the active PRNG. More... | |
const mygsl::rng & | get_prng () const |
Return a non-mutable reference to the active PRNG. More... | |
bool | has_default_generator () const |
Check is a default generator is set. More... | |
void | set_default_generator (const std::string &) |
Set the default generator name. More... | |
const std::string & | get_default_generator () const |
Return the default generator name. More... | |
bool | is_initialized () const |
Check the initialization flag. More... | |
void | initialize (const datatools::properties &config_) |
Initialize the manager from a container of properties. More... | |
void | reset () |
Reset the manager. More... | |
bool | has_pg_type (const std::string &id_) const |
Check if the factory has a given type. More... | |
template<class PgClass > | |
void | register_pg_type (const std::string &id_) |
Register a given type in the factory. More... | |
void | unregister_pg_type (const std::string &id_) |
Unregister a given type from the factory. More... | |
bool | has (const std::string &name_) const |
bool | is_initialized (const std::string &name_) const |
bool | can_drop (const std::string &name_) const |
void | drop (const std::string &name_) |
void | reset (const std::string &name_) |
const std::string & | get_id (const std::string &name_) const |
const i_genbb & | get (const std::string &name_) const |
i_genbb & | grab (const std::string &name_) |
void | load (const std::string &name_, const std::string &id_, const datatools::properties &config_) |
void | load (const datatools::multi_properties &config_) |
void | dump_particle_generators (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="") const |
void | print_particle_generators (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", const std::string &mode_="") const |
virtual void | tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const |
Smart print. More... | |
const datatools::factory_register< i_genbb > & | get_factory_register () const |
datatools::factory_register< i_genbb > & | grab_factory_register () |
datatools::logger::priority | get_logging_priority () const |
void | set_logging_priority (datatools::logger::priority p_) |
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 |
Protected Member Functions | |
void | _load_pg (const std::string &name_, const std::string &id_, const datatools::properties &config_) |
void | _preload_global_dict () |
void | _create_pg (detail::pg_entry_type &entry_) |
void | _initialize_pg (detail::pg_entry_type &entry_) |
void | _reset_pg (detail::pg_entry_type &entry_) |
Additional Inherited Members | |
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_) |
GENBB particle manager management class.
genbb::manager::manager | ( | datatools::logger::priority | p_ = datatools::logger::PRIO_WARNING , |
int | flags_ = 0 |
||
) |
Constructor.
genbb::manager::~manager | ( | ) |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool genbb::manager::can_drop | ( | const std::string & | name_ | ) | const |
Check if a given PG can be removed
name_ | The name of the PG to be completely removed |
void genbb::manager::drop | ( | const std::string & | name_ | ) |
name_ | The name of the PG to be completely removed |
void genbb::manager::dump_particle_generators | ( | std::ostream & | out_ = std::clog , |
const std::string & | title_ = "" , |
||
const std::string & | indent_ = "" |
||
) | const |
const i_genbb& genbb::manager::get | ( | const std::string & | name_ | ) | const |
name_ | The name of the PG to be returned |
const std::string& genbb::manager::get_default_generator | ( | ) | const |
Return the default generator name.
const mygsl::rng& genbb::manager::get_embedded_prng | ( | ) | const |
Return a non-mutable reference to the embedded PRNG.
const mygsl::rng& genbb::manager::get_external_prng | ( | ) | const |
Return a non-mutable reference to the external PRNG.
const datatools::factory_register<i_genbb>& genbb::manager::get_factory_register | ( | ) | const |
const std::string& genbb::manager::get_id | ( | const std::string & | name_ | ) | const |
name_ | The name of the PG to be reset |
datatools::logger::priority genbb::manager::get_logging_priority | ( | ) | const |
const mygsl::rng& genbb::manager::get_prng | ( | ) | const |
Return a non-mutable reference to the active PRNG.
i_genbb& genbb::manager::grab | ( | const std::string & | name_ | ) |
name_ | The name of the PG to be returned |
mygsl::rng& genbb::manager::grab_embedded_prng | ( | ) |
Return a mutable reference to the embedded PRNG.
mygsl::rng& genbb::manager::grab_external_prng | ( | ) |
Return a mutable reference to the external PRNG.
datatools::factory_register<i_genbb>& genbb::manager::grab_factory_register | ( | ) |
mygsl::rng& genbb::manager::grab_prng | ( | ) |
Return a mutable reference to the active PRNG.
bool genbb::manager::has | ( | const std::string & | name_ | ) | const |
name_ | The name of the PG to be checked |
bool genbb::manager::has_default_generator | ( | ) | const |
Check is a default generator is set.
bool genbb::manager::has_external_prng | ( | ) | const |
Check the use of some external PRNG.
bool genbb::manager::has_pg_type | ( | const std::string & | id_ | ) | const |
Check if the factory has a given type.
bool genbb::manager::has_service_manager | ( | ) | const |
void genbb::manager::initialize | ( | const datatools::properties & | config_ | ) |
Initialize the manager from a container of properties.
bool genbb::manager::is_debug | ( | ) | const |
Check the debug flag.
bool genbb::manager::is_initialized | ( | ) | const |
Check the initialization flag.
bool genbb::manager::is_initialized | ( | const std::string & | name_ | ) | const |
name_ | The name of the PG to be checked |
void genbb::manager::load | ( | const std::string & | name_, |
const std::string & | id_, | ||
const datatools::properties & | config_ | ||
) |
void genbb::manager::load | ( | const datatools::multi_properties & | config_ | ) |
void genbb::manager::print_particle_generators | ( | std::ostream & | out_ = std::clog , |
const std::string & | title_ = "" , |
||
const std::string & | indent_ = "" , |
||
const std::string & | mode_ = "" |
||
) | const |
void genbb::manager::register_pg_type | ( | const std::string & | id_ | ) |
Register a given type in the factory.
void genbb::manager::reset | ( | ) |
Reset the manager.
void genbb::manager::reset | ( | const std::string & | name_ | ) |
name_ | The name of the PG to be reset |
void genbb::manager::reset_external_prng | ( | ) |
Reset the external PRNG.
void genbb::manager::reset_service | ( | ) |
void genbb::manager::set_debug | ( | bool | debug_ = true | ) |
Set the debug flag.
void genbb::manager::set_default_generator | ( | const std::string & | ) |
Set the default generator name.
void genbb::manager::set_embedded_prng_seed | ( | int | seed_ | ) |
Set the seed of the embedded PRNG.
void genbb::manager::set_external_prng | ( | mygsl::rng & | ) |
Set the external PRNG.
void genbb::manager::set_logging_priority | ( | datatools::logger::priority | p_ | ) |
void genbb::manager::set_service_manager | ( | datatools::service_manager & | service_mgr_ | ) |
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.
void genbb::manager::unregister_pg_type | ( | const std::string & | id_ | ) |
Unregister a given type from the factory.