Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A pool of histograms. More...
#include <bayeux/mygsl/histogram_pool.h>
Classes | |
struct | histogram_entry_type |
Simple structure related to histogram attributes. More... | |
Public Types | |
enum | histogram_dim_type { HISTOGRAM_DIM_UNDEFINED = 0, HISTOGRAM_DIM_1D = 1, HISTOGRAM_DIM_2D = 2 } |
Histogram dimensionality. More... | |
typedef datatools::handle< histogram_1d > | hh1d_type |
Typedef to handle of 1D histogram. More... | |
typedef datatools::handle< histogram_2d > | hh2d_type |
Typedef to handle of 2D histogram. More... | |
typedef std::map< std::string, histogram_entry_type > | dict_type |
Alias to histogram dictionnary. 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 | |
const std::string & | get_description () const |
Return histogram pool description. More... | |
void | set_description (const std::string &desc_) |
Set histogram poool description. More... | |
const datatools::properties & | get_auxiliaries () const |
Get a non-mutable reference to auxiliaries. More... | |
datatools::properties & | grab_auxiliaries () |
Get a mutable reference to auxiliaries. More... | |
histogram_pool () | |
Constructor. More... | |
histogram_pool (const std::string &desc_) | |
Constructor with description inside. More... | |
virtual | ~histogram_pool () |
Destructor. More... | |
void | load (const std::string &histo_setups_filename_) |
Load histograms given a setup filename. More... | |
void | load (const datatools::multi_properties &histo_setups_) |
Load histograms given properties. More... | |
bool | is_initialized () const |
Check histogram pool initialization. More... | |
void | initialize (const datatools::properties &setup_) |
Initialization. More... | |
void | reset () |
Reset. More... | |
void | remove_all () |
Clen histogram dictionnary. More... | |
bool | empty () const |
Check dictionnary emptiness. More... | |
size_t | size () const |
Return the number of histrogrmas stored. More... | |
void | clear_auxiliaries () |
Clear auxiliairies. More... | |
bool | has (const std::string &name_, int dim_=0) const |
Check histogram presence given an histogram name. More... | |
bool | has_1d (const std::string &name_) const |
Check for 1D histogram given its name. More... | |
bool | has_2d (const std::string &name_) const |
Check for 2D histogram given its name. More... | |
histogram_1d & | grab_1d (const std::string &name_) |
Get a mutable reference to 1D histogram given its name. More... | |
const histogram_1d & | get_1d (const std::string &name_) const |
Get a non-mutable reference to 1D histogram given its name. More... | |
histogram_2d & | grab_2d (const std::string &name_) |
Get a mutable reference to 2D histogram given its name. More... | |
const histogram_2d & | get_2d (const std::string &name_) const |
Get a non-mutable reference to 2D histogram given its name. More... | |
void | remove (const std::string &name_) |
Remove an histogram given its name. More... | |
void | rename (const std::string &name_, const std::string &new_name_) |
Rename an histogram. More... | |
void | set_title (const std::string &name_, const std::string &title_) |
Set histogram title. More... | |
const std::string & | get_title (const std::string &name_) const |
Get histogram title. More... | |
void | set_group (const std::string &name_, const std::string &group_) |
Assign a group to an histogram. More... | |
const std::string & | get_group (const std::string &name_) const |
Get group of an histogram. More... | |
void | names (std::vector< std::string > &names_, const std::string &filter_="", bool reverse_=false) const |
Build an array containing the names of the histograms stored in the pool : More... | |
histogram_1d & | add_1d (const std::string &name_, const std::string &title_="", const std::string &group_="") |
Add 1D histogram. More... | |
histogram_2d & | add_2d (const std::string &name_, const std::string &title_="", const std::string &group_="") |
Add 2D histogram. 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 | set_logging_priority (datatools::logger::priority) |
Set logging priority. More... | |
datatools::logger::priority | get_logging_priority () const |
Get logging priority. More... | |
Public Member Functions inherited from datatools::i_serializable | |
i_serializable () | |
Default constructor. More... | |
virtual | ~i_serializable () |
Destructor. More... | |
virtual const std::string & | get_serial_tag () const =0 |
Return the serialization string identifier of the class. 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 void | init_histo_1d (histogram_1d &h1_, const datatools::properties &h1_setups_, const histogram_pool *histo_pool_=0) |
Static method to initialize 1D histogram. More... | |
static void | init_histo_2d (histogram_2d &h2_, const datatools::properties &h2_setups_, const histogram_pool *histo_pool_=0) |
Static method to initialize 2D histogram. 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_) |
A pool of histograms.
typedef std::map<std::string, histogram_entry_type> mygsl::histogram_pool::dict_type |
Alias to histogram dictionnary.
Typedef to handle of 1D histogram.
Typedef to handle of 2D histogram.
mygsl::histogram_pool::histogram_pool | ( | ) |
Constructor.
mygsl::histogram_pool::histogram_pool | ( | const std::string & | desc_ | ) |
Constructor with description inside.
|
virtual |
Destructor.
histogram_1d& mygsl::histogram_pool::add_1d | ( | const std::string & | name_, |
const std::string & | title_ = "" , |
||
const std::string & | group_ = "" |
||
) |
Add 1D histogram.
histogram_2d& mygsl::histogram_pool::add_2d | ( | const std::string & | name_, |
const std::string & | title_ = "" , |
||
const std::string & | group_ = "" |
||
) |
Add 2D histogram.
void mygsl::histogram_pool::clear_auxiliaries | ( | ) |
Clear auxiliairies.
bool mygsl::histogram_pool::empty | ( | ) | const |
Check dictionnary emptiness.
const histogram_1d& mygsl::histogram_pool::get_1d | ( | const std::string & | name_ | ) | const |
Get a non-mutable reference to 1D histogram given its name.
const histogram_2d& mygsl::histogram_pool::get_2d | ( | const std::string & | name_ | ) | const |
Get a non-mutable reference to 2D histogram given its name.
const datatools::properties& mygsl::histogram_pool::get_auxiliaries | ( | ) | const |
Get a non-mutable reference to auxiliaries.
const std::string& mygsl::histogram_pool::get_description | ( | ) | const |
Return histogram pool description.
const std::string& mygsl::histogram_pool::get_group | ( | const std::string & | name_ | ) | const |
Get group of an histogram.
datatools::logger::priority mygsl::histogram_pool::get_logging_priority | ( | ) | const |
Get logging priority.
const std::string& mygsl::histogram_pool::get_title | ( | const std::string & | name_ | ) | const |
Get histogram title.
histogram_1d& mygsl::histogram_pool::grab_1d | ( | const std::string & | name_ | ) |
Get a mutable reference to 1D histogram given its name.
histogram_2d& mygsl::histogram_pool::grab_2d | ( | const std::string & | name_ | ) |
Get a mutable reference to 2D histogram given its name.
datatools::properties& mygsl::histogram_pool::grab_auxiliaries | ( | ) |
Get a mutable reference to auxiliaries.
bool mygsl::histogram_pool::has | ( | const std::string & | name_, |
int | dim_ = 0 |
||
) | const |
Check histogram presence given an histogram name.
bool mygsl::histogram_pool::has_1d | ( | const std::string & | name_ | ) | const |
Check for 1D histogram given its name.
bool mygsl::histogram_pool::has_2d | ( | const std::string & | name_ | ) | const |
Check for 2D histogram given its name.
|
static |
Static method to initialize 1D histogram.
|
static |
Static method to initialize 2D histogram.
void mygsl::histogram_pool::initialize | ( | const datatools::properties & | setup_ | ) |
Initialization.
bool mygsl::histogram_pool::is_initialized | ( | ) | const |
Check histogram pool initialization.
void mygsl::histogram_pool::load | ( | const std::string & | histo_setups_filename_ | ) |
Load histograms given a setup filename.
void mygsl::histogram_pool::load | ( | const datatools::multi_properties & | histo_setups_ | ) |
Load histograms given properties.
void mygsl::histogram_pool::names | ( | std::vector< std::string > & | names_, |
const std::string & | filter_ = "" , |
||
bool | reverse_ = false |
||
) | const |
Build an array containing the names of the histograms stored in the pool :
void mygsl::histogram_pool::remove | ( | const std::string & | name_ | ) |
Remove an histogram given its name.
void mygsl::histogram_pool::remove_all | ( | ) |
Clen histogram dictionnary.
void mygsl::histogram_pool::rename | ( | const std::string & | name_, |
const std::string & | new_name_ | ||
) |
Rename an histogram.
void mygsl::histogram_pool::reset | ( | ) |
Reset.
void mygsl::histogram_pool::set_description | ( | const std::string & | desc_ | ) |
Set histogram poool description.
void mygsl::histogram_pool::set_group | ( | const std::string & | name_, |
const std::string & | group_ | ||
) |
Assign a group to an histogram.
void mygsl::histogram_pool::set_logging_priority | ( | datatools::logger::priority | ) |
Set logging priority.
void mygsl::histogram_pool::set_title | ( | const std::string & | name_, |
const std::string & | title_ | ||
) |
Set histogram title.
size_t mygsl::histogram_pool::size | ( | ) | const |
Return the number of histrogrmas stored.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.