LDMX Software
|
Singleton class used to create and pool histograms. More...
#include <Histograms.h>
Public Member Functions | |
HistogramPool (HistogramPool const &)=delete | |
Hide copy constructor. | |
void | operator= (HistogramPool const &)=delete |
Hide assignment operator. | |
void | insert (const std::string &name, TH1 *hist) |
Insert a histogram into the pool. | |
TH1 * | get (const std::string &name) |
Get a histogram using its name. | |
Static Public Member Functions | |
static HistogramPool & | getInstance () |
Access the single instance of HistogramPool by reference. | |
Private Member Functions | |
HistogramPool () | |
Private constructor to prevent instantiation. | |
Private Attributes | |
std::unordered_map< std::string, TH1 * > | histograms_ |
Container for all histograms. | |
Singleton class used to create and pool histograms.
Helpful for managing all those TH1 pointers by name instead of using variables.
Definition at line 27 of file Histograms.h.
|
private |
Private constructor to prevent instantiation.
Sets some style options as well.
Definition at line 19 of file Histograms.cxx.
TH1 * framework::HistogramPool::get | ( | const std::string & | name | ) |
Get a histogram using its name.
Checks if histogram exists.
Definition at line 46 of file Histograms.cxx.
References histograms_.
Referenced by framework::HistogramHelper::get().
|
static |
Access the single instance of HistogramPool by reference.
Definition at line 38 of file Histograms.cxx.
Referenced by framework::HistogramHelper::create(), framework::HistogramHelper::create(), framework::HistogramHelper::create(), framework::HistogramHelper::create(), and framework::HistogramHelper::get().
|
inline |
Insert a histogram into the pool.
Definition at line 54 of file Histograms.h.
References histograms_.
Referenced by framework::HistogramHelper::create(), framework::HistogramHelper::create(), framework::HistogramHelper::create(), and framework::HistogramHelper::create().
|
private |
Container for all histograms.
Definition at line 30 of file Histograms.h.