Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
cuts::cut_manager Class Reference

The cut manager class. More...

#include <bayeux/cuts/cut_manager.h>

Inheritance diagram for cuts::cut_manager:
datatools::i_tree_dumpable

Public Types

enum  ctor_flag_type { BLANK = 0, FACTORY_NOPRELOAD = datatools::bit_mask::bit00, FACTORY_INITIALIZATION_AT_LOAD = datatools::bit_mask::bit01 }
 Factory flags. 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

void set_logging_priority (datatools::logger::priority p)
 Set logging priority. More...
 
datatools::logger::priority get_logging_priority () const
 Returns logging priority. More...
 
bool is_no_preload () const
 Check the 'no-preload' flag. More...
 
bool is_initialization_at_load () const
 Check the 'initialization_at_load' flag. More...
 
bool has_print_report () const
 Check if print report is available. More...
 
bool has (const std::string &a_cut_name) const
 Check if cut with given name is defined. More...
 
void remove (const std::string &a_cut_name)
 Remove cut with given name. More...
 
i_cutgrab (const std::string &a_cut_name)
 Return a mutable reference to a cut given its name. More...
 
const i_cutget (const std::string &a_cut_name) const
 Return a non mutable reference to a cut given its name. More...
 
cut_handle_dict_typeget_cuts ()
 Return a mutable reference to the embedded dictionary of cuts. More...
 
const cut_handle_dict_typeget_cuts () const
 Return a non mutable reference to the embedded dictionary of cuts. More...
 
bool is_initialized () const
 Check initialization flag. More...
 
void initialize (const datatools::properties &a_setup)
 Initialization. More...
 
void reset ()
 Reset. More...
 
 cut_manager (uint32_t the_flags=BLANK)
 Default constructor. More...
 
virtual ~cut_manager ()
 Destructor. More...
 
bool has_service_manager () const
 Check availability of the service manager. More...
 
const datatools::service_managerget_service_manager () const
 Return a non mutable reference to the service manager. More...
 
datatools::service_managergrab_service_manager ()
 Return a mutable reference to the service manager. More...
 
void set_service_manager (datatools::service_manager &a_service_manager)
 Set service manager. More...
 
void install_service_manager (const datatools::properties &a_service_manager_configuration)
 Install an embedded service manager. More...
 
virtual void tree_dump (std::ostream &a_out=std::clog, const std::string &a_title="", const std::string &a_indent="", bool a_inherit=false) const
 Smart print. More...
 
void print_report (std::ostream &a_out=std::clog) const
 Print report. More...
 
void load_cut (const std::string &cut_name_, const std::string &cut_id_, const datatools::properties &cut_config_)
 Load a cut. More...
 
void load_cuts (const datatools::multi_properties &cuts_config_)
 Load several cuts. More...
 
bool has_cut_type (const std::string &cut_id_) const
 Check if a given cut factory is registered. More...
 
template<class CutClass >
void register_cut_type (const std::string &cut_id_)
 Register a cut factory. More...
 
void unregister_cut_type (const std::string &cut_id_)
 Unregister a cut factory. 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
 

Protected Member Functions

void _load_cut (const std::string &cut_name_, const std::string &cut_id_, const datatools::properties &cut_config_)
 
void _load_cuts (const datatools::multi_properties &cuts_config_)
 
void _create_cut (cut_entry_type &cut_entry_)
 
void _initialize_cut (cut_entry_type &cut_entry_)
 
void _reset_cut (cut_entry_type &cut_entry_)
 
void _preload_global_dict ()
 

Friends

class cut_entry_type
 

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_)
 

Detailed Description

The cut manager class.

Member Enumeration Documentation

◆ ctor_flag_type

Factory flags.

Enumerator
BLANK 
FACTORY_NOPRELOAD 
FACTORY_INITIALIZATION_AT_LOAD 

Constructor & Destructor Documentation

◆ cut_manager()

cuts::cut_manager::cut_manager ( uint32_t  the_flags = BLANK)

Default constructor.

◆ ~cut_manager()

virtual cuts::cut_manager::~cut_manager ( )
virtual

Destructor.

Member Function Documentation

◆ _create_cut()

void cuts::cut_manager::_create_cut ( cut_entry_type cut_entry_)
protected

◆ _initialize_cut()

void cuts::cut_manager::_initialize_cut ( cut_entry_type cut_entry_)
protected

◆ _load_cut()

void cuts::cut_manager::_load_cut ( const std::string &  cut_name_,
const std::string &  cut_id_,
const datatools::properties cut_config_ 
)
protected

◆ _load_cuts()

void cuts::cut_manager::_load_cuts ( const datatools::multi_properties cuts_config_)
protected

◆ _preload_global_dict()

void cuts::cut_manager::_preload_global_dict ( )
protected

◆ _reset_cut()

void cuts::cut_manager::_reset_cut ( cut_entry_type cut_entry_)
protected

◆ get()

const i_cut& cuts::cut_manager::get ( const std::string &  a_cut_name) const

Return a non mutable reference to a cut given its name.

◆ get_cuts() [1/2]

cut_handle_dict_type& cuts::cut_manager::get_cuts ( )

Return a mutable reference to the embedded dictionary of cuts.

◆ get_cuts() [2/2]

const cut_handle_dict_type& cuts::cut_manager::get_cuts ( ) const

Return a non mutable reference to the embedded dictionary of cuts.

◆ get_logging_priority()

datatools::logger::priority cuts::cut_manager::get_logging_priority ( ) const

Returns logging priority.

◆ get_service_manager()

const datatools::service_manager& cuts::cut_manager::get_service_manager ( ) const

Return a non mutable reference to the service manager.

◆ grab()

i_cut& cuts::cut_manager::grab ( const std::string &  a_cut_name)

Return a mutable reference to a cut given its name.

◆ grab_service_manager()

datatools::service_manager& cuts::cut_manager::grab_service_manager ( )

Return a mutable reference to the service manager.

◆ has()

bool cuts::cut_manager::has ( const std::string &  a_cut_name) const

Check if cut with given name is defined.

◆ has_cut_type()

bool cuts::cut_manager::has_cut_type ( const std::string &  cut_id_) const

Check if a given cut factory is registered.

◆ has_print_report()

bool cuts::cut_manager::has_print_report ( ) const

Check if print report is available.

◆ has_service_manager()

bool cuts::cut_manager::has_service_manager ( ) const

Check availability of the service manager.

◆ initialize()

void cuts::cut_manager::initialize ( const datatools::properties a_setup)

Initialization.

◆ install_service_manager()

void cuts::cut_manager::install_service_manager ( const datatools::properties a_service_manager_configuration)

Install an embedded service manager.

◆ is_initialization_at_load()

bool cuts::cut_manager::is_initialization_at_load ( ) const

Check the 'initialization_at_load' flag.

◆ is_initialized()

bool cuts::cut_manager::is_initialized ( ) const

Check initialization flag.

◆ is_no_preload()

bool cuts::cut_manager::is_no_preload ( ) const

Check the 'no-preload' flag.

◆ load_cut()

void cuts::cut_manager::load_cut ( const std::string &  cut_name_,
const std::string &  cut_id_,
const datatools::properties cut_config_ 
)

Load a cut.

◆ load_cuts()

void cuts::cut_manager::load_cuts ( const datatools::multi_properties cuts_config_)

Load several cuts.

◆ print_report()

void cuts::cut_manager::print_report ( std::ostream &  a_out = std::clog) const

Print report.

◆ register_cut_type()

template<class CutClass >
void cuts::cut_manager::register_cut_type ( const std::string &  cut_id_)
inline

Register a cut factory.

◆ remove()

void cuts::cut_manager::remove ( const std::string &  a_cut_name)

Remove cut with given name.

◆ reset()

void cuts::cut_manager::reset ( )

Reset.

◆ set_logging_priority()

void cuts::cut_manager::set_logging_priority ( datatools::logger::priority  p)

Set logging priority.

◆ set_service_manager()

void cuts::cut_manager::set_service_manager ( datatools::service_manager a_service_manager)

Set service manager.

◆ tree_dump()

virtual void cuts::cut_manager::tree_dump ( std::ostream &  a_out = std::clog,
const std::string &  a_title = "",
const std::string &  a_indent = "",
bool  a_inherit = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.

◆ unregister_cut_type()

void cuts::cut_manager::unregister_cut_type ( const std::string &  cut_id_)

Unregister a cut factory.

Friends And Related Function Documentation

◆ cut_entry_type

friend class cut_entry_type
friend

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