Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Static Public Member Functions | List of all members
genbb::pdg::particle_registry Class Reference

A registry for particle entries. More...

#include <bayeux/genbb_help/pdg_particle_tools.h>

Inheritance diagram for genbb::pdg::particle_registry:
datatools::i_tree_dumpable

Public Types

typedef std::map< int32_t, particleparticle_dict_type
 Type of dictionary of particle records. More...
 
- 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

 particle_registry (uint32_t flags_=0)
 Default constructor. More...
 
 ~particle_registry ()
 Destructor. More...
 
void clear ()
 Clear the registry. More...
 
particleregistration (const particle &part_)
 Registration of a particle record. More...
 
void unregistration (const std::string &name_)
 Unregistration of a particle record given its name. More...
 
void unregistration (int32_t pdg_code_)
 Unregistration of a particle record given its PDG code. More...
 
bool has_particle (int32_t pdg_code_) const
 Check particle. More...
 
const particleget_particle (int32_t pdg_code_) const
 Return a registered unit. More...
 
bool has_particle_by_name (const std::string &name_) const
 Check particle given its name. More...
 
const particleget_particle_by_name (const std::string &name_) const
 Return a registered particle given its name. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
void register_standard_particles ()
 Register standard particles. More...
 
- 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
 

Static Public Member Functions

static particle_registrysystem_registry ()
 Access to the mutable system singleton registry. More...
 
static const particle_registryconst_system_registry ()
 Access to the non mutable system singleton registry. More...
 
- 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_)
 

Detailed Description

A registry for particle entries.

Member Typedef Documentation

◆ particle_dict_type

Type of dictionary of particle records.

Constructor & Destructor Documentation

◆ particle_registry()

genbb::pdg::particle_registry::particle_registry ( uint32_t  flags_ = 0)

Default constructor.

◆ ~particle_registry()

genbb::pdg::particle_registry::~particle_registry ( )

Destructor.

Member Function Documentation

◆ clear()

void genbb::pdg::particle_registry::clear ( )

Clear the registry.

◆ const_system_registry()

static const particle_registry& genbb::pdg::particle_registry::const_system_registry ( )
static

Access to the non mutable system singleton registry.

◆ get_particle()

const particle& genbb::pdg::particle_registry::get_particle ( int32_t  pdg_code_) const

Return a registered unit.

◆ get_particle_by_name()

const particle& genbb::pdg::particle_registry::get_particle_by_name ( const std::string &  name_) const

Return a registered particle given its name.

◆ has_particle()

bool genbb::pdg::particle_registry::has_particle ( int32_t  pdg_code_) const

Check particle.

◆ has_particle_by_name()

bool genbb::pdg::particle_registry::has_particle_by_name ( const std::string &  name_) const

Check particle given its name.

◆ register_standard_particles()

void genbb::pdg::particle_registry::register_standard_particles ( )

Register standard particles.

◆ registration()

particle& genbb::pdg::particle_registry::registration ( const particle part_)

Registration of a particle record.

◆ system_registry()

static particle_registry& genbb::pdg::particle_registry::system_registry ( )
static

Access to the mutable system singleton registry.

◆ tree_dump()

virtual void genbb::pdg::particle_registry::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

◆ unregistration() [1/2]

void genbb::pdg::particle_registry::unregistration ( const std::string &  name_)

Unregistration of a particle record given its name.

◆ unregistration() [2/2]

void genbb::pdg::particle_registry::unregistration ( int32_t  pdg_code_)

Unregistration of a particle record given its PDG code.


The documentation for this class was generated from the following file: