Bayeux  3.4.1
Core Foundation library for SuperNEMO
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
mctools::step_hit_processor_factory Class Reference

The factory responsible of the step hit processors. More...

#include <bayeux/mctools/step_hit_processor_factory.h>

Inheritance diagram for mctools::step_hit_processor_factory:
datatools::i_tree_dumpable

Classes

struct  processor_entry_type
 A processor entry in the factory's embedded dictionary. More...
 

Public Types

typedef datatools::handle< base_step_hit_processorprocessor_handle_type
 
typedef std::map< std::string, processor_entry_typeprocessor_entry_dict_type
 
typedef std::map< std::string, base_step_hit_processor * > processor_dict_type
 
- 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 is_initialized () const
 Check the initialization flag. More...
 
const std::string & get_description () const
 Returns the description. More...
 
void set_description (const std::string &description_)
 Set the description. More...
 
bool has_geometry_manager () const
 Check for an existing geometry manager. More...
 
void set_geometry_manager (const geomtools::manager &gmgr_)
 Set the geometry manager. More...
 
const geomtools::managerget_geometry_manager () const
 Return a non mutable reference to the geometry manager. More...
 
bool has_service_manager () const
 Check for an existing service manager. More...
 
void set_service_manager (datatools::service_manager &smgr_)
 Set the service manager. More...
 
datatools::service_managergrab_service_manager ()
 Return a mutable reference to the service manager. More...
 
const datatools::service_managerget_service_manager () const
 Return a non mutable reference to the service manager. More...
 
void set_instantiate_at_loading (bool)
 Set the flag for instantiation of processor at load stage. More...
 
bool has_external_prng () const
 Check for a PRNG. More...
 
void set_external_prng (mygsl::rng &prng_)
 Set the PRNG. More...
 
mygsl::rnggrab_external_prng ()
 Get a mutable reference to the PRNG. More...
 
void set_output_profiles (const std::set< std::string > &output_profiles_)
 Set output profiles. More...
 
void reset_output_profiles ()
 Reset output profiles. More...
 
void initialize ()
 Initialization method. More...
 
void initialize (const datatools::properties &config_)
 Initialization method from a list of parameters. More...
 
void reset ()
 Reset method. More...
 
 step_hit_processor_factory (datatools::logger::priority logging_=datatools::logger::PRIO_WARNING)
 Constructor. More...
 
virtual ~step_hit_processor_factory ()
 Destructor. More...
 
const processor_dict_typeget_processors () const
 
void fetch_processor_names (std::vector< std::string > &vprocs_, bool only_instantiated_=false) const
 Build the list of names of the processors managed by the factory. More...
 
bool create (const std::string &name_, const std::string &type_, const datatools::properties &config_)
 Create a processor object. More...
 
bool has_processor (const std::string &name_) const
 Check if a processor exists given its name. More...
 
bool is_processor_instantiated (const std::string &name_) const
 Check if a processor is instantiated. More...
 
bool is_processor_instantiable (const std::string &name_) const
 Check if a processor can be instantiated with respect to the setup (output profiles...) More...
 
base_step_hit_processorgrab_processor (const std::string &name_)
 Returns a mutable reference to a given processor addressed by its by name. More...
 
const base_step_hit_processorget_processor (const std::string &name_) const
 Returns a non mutable reference to a given processor addressed by its by name. More...
 
void dump (std::ostream &out_) const
 Default print. 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 load (const datatools::multi_properties &mprop_)
 Load a configuration object. More...
 
datatools::logger::priority get_logging_priority () const
 Return the logging priority threshold. More...
 
void set_logging_priority (datatools::logger::priority)
 Set the logging priority threshold. 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 const std::string & default_detailed_hit_collection ()
 Default name for the output collection of detailed hits (a.k.a. "visu tracks") More...
 
static const std::string & matching_output_profiles_key ()
 Property key for the set of output profiles a processor is associated to. 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_)
 

Protected Member Functions

base_step_hit_processor_create (const std::string &name_)
 Instantiate a processor object. More...
 
void _initialize ()
 Initialization method. More...
 

Detailed Description

The factory responsible of the step hit processors.

Member Typedef Documentation

◆ processor_dict_type

◆ processor_entry_dict_type

◆ processor_handle_type

Constructor & Destructor Documentation

◆ step_hit_processor_factory()

mctools::step_hit_processor_factory::step_hit_processor_factory ( datatools::logger::priority  logging_ = datatools::logger::PRIO_WARNING)

Constructor.

◆ ~step_hit_processor_factory()

virtual mctools::step_hit_processor_factory::~step_hit_processor_factory ( )
virtual

Destructor.

Member Function Documentation

◆ _create()

base_step_hit_processor* mctools::step_hit_processor_factory::_create ( const std::string &  name_)
protected

Instantiate a processor object.

◆ _initialize()

void mctools::step_hit_processor_factory::_initialize ( )
protected

Initialization method.

◆ create()

bool mctools::step_hit_processor_factory::create ( const std::string &  name_,
const std::string &  type_,
const datatools::properties config_ 
)

Create a processor object.

◆ default_detailed_hit_collection()

static const std::string& mctools::step_hit_processor_factory::default_detailed_hit_collection ( )
static

Default name for the output collection of detailed hits (a.k.a. "visu tracks")

◆ dump()

void mctools::step_hit_processor_factory::dump ( std::ostream &  out_) const

Default print.

◆ fetch_processor_names()

void mctools::step_hit_processor_factory::fetch_processor_names ( std::vector< std::string > &  vprocs_,
bool  only_instantiated_ = false 
) const

Build the list of names of the processors managed by the factory.

◆ get_description()

const std::string& mctools::step_hit_processor_factory::get_description ( ) const

Returns the description.

◆ get_geometry_manager()

const geomtools::manager& mctools::step_hit_processor_factory::get_geometry_manager ( ) const

Return a non mutable reference to the geometry manager.

◆ get_logging_priority()

datatools::logger::priority mctools::step_hit_processor_factory::get_logging_priority ( ) const

Return the logging priority threshold.

◆ get_processor()

const base_step_hit_processor& mctools::step_hit_processor_factory::get_processor ( const std::string &  name_) const

Returns a non mutable reference to a given processor addressed by its by name.

◆ get_processors()

const processor_dict_type& mctools::step_hit_processor_factory::get_processors ( ) const

Returns the non mutable dictionary of instantiated processors. The factory must be initialized.

◆ get_service_manager()

const datatools::service_manager& mctools::step_hit_processor_factory::get_service_manager ( ) const

Return a non mutable reference to the service manager.

◆ grab_external_prng()

mygsl::rng& mctools::step_hit_processor_factory::grab_external_prng ( )

Get a mutable reference to the PRNG.

◆ grab_processor()

base_step_hit_processor& mctools::step_hit_processor_factory::grab_processor ( const std::string &  name_)

Returns a mutable reference to a given processor addressed by its by name.

◆ grab_service_manager()

datatools::service_manager& mctools::step_hit_processor_factory::grab_service_manager ( )

Return a mutable reference to the service manager.

◆ has_external_prng()

bool mctools::step_hit_processor_factory::has_external_prng ( ) const

Check for a PRNG.

◆ has_geometry_manager()

bool mctools::step_hit_processor_factory::has_geometry_manager ( ) const

Check for an existing geometry manager.

◆ has_processor()

bool mctools::step_hit_processor_factory::has_processor ( const std::string &  name_) const

Check if a processor exists given its name.

◆ has_service_manager()

bool mctools::step_hit_processor_factory::has_service_manager ( ) const

Check for an existing service manager.

◆ initialize() [1/2]

void mctools::step_hit_processor_factory::initialize ( )

Initialization method.

◆ initialize() [2/2]

void mctools::step_hit_processor_factory::initialize ( const datatools::properties config_)

Initialization method from a list of parameters.

◆ is_initialized()

bool mctools::step_hit_processor_factory::is_initialized ( ) const

Check the initialization flag.

◆ is_processor_instantiable()

bool mctools::step_hit_processor_factory::is_processor_instantiable ( const std::string &  name_) const

Check if a processor can be instantiated with respect to the setup (output profiles...)

◆ is_processor_instantiated()

bool mctools::step_hit_processor_factory::is_processor_instantiated ( const std::string &  name_) const

Check if a processor is instantiated.

◆ load()

void mctools::step_hit_processor_factory::load ( const datatools::multi_properties mprop_)

Load a configuration object.

◆ matching_output_profiles_key()

static const std::string& mctools::step_hit_processor_factory::matching_output_profiles_key ( )
static

Property key for the set of output profiles a processor is associated to.

◆ reset()

void mctools::step_hit_processor_factory::reset ( )

Reset method.

◆ reset_output_profiles()

void mctools::step_hit_processor_factory::reset_output_profiles ( )

Reset output profiles.

◆ set_description()

void mctools::step_hit_processor_factory::set_description ( const std::string &  description_)

Set the description.

◆ set_external_prng()

void mctools::step_hit_processor_factory::set_external_prng ( mygsl::rng prng_)

Set the PRNG.

◆ set_geometry_manager()

void mctools::step_hit_processor_factory::set_geometry_manager ( const geomtools::manager gmgr_)

Set the geometry manager.

◆ set_instantiate_at_loading()

void mctools::step_hit_processor_factory::set_instantiate_at_loading ( bool  )

Set the flag for instantiation of processor at load stage.

◆ set_logging_priority()

void mctools::step_hit_processor_factory::set_logging_priority ( datatools::logger::priority  )

Set the logging priority threshold.

◆ set_output_profiles()

void mctools::step_hit_processor_factory::set_output_profiles ( const std::set< std::string > &  output_profiles_)

Set output profiles.

◆ set_service_manager()

void mctools::step_hit_processor_factory::set_service_manager ( datatools::service_manager smgr_)

Set the service manager.

◆ tree_dump()

virtual void mctools::step_hit_processor_factory::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.


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