#include <Histos.h>
Public Types | |
typedef std::map< std::string, TObject * >::const_iterator | HistoItr |
Public Member Functions | |
void | addObject (const std::string &name, TObject *obj) |
Add any object. More... | |
void | book (const std::string &name, int nx, float xmin, float xmax, int ny=0, float ymin=0., float ymax=0.) |
Book an histogram (1D or 2D) More... | |
void | book (const std::string &name, int nx, float xmin, float xmax, const std::string &option) |
void | bookByNumber (const std::string &name, int n1, int n2, int nx, float xmin, float xmax, int ny=0, float ymin=0., float ymax=0.) |
void | debug (std::string p="") const |
void | divide (const std::string &h1, const std::string &h2, const std::string &h3) |
Divide two histograms and put the result in the first. More... | |
void | fill (const std::string &name, float val1, float val2=1., float val3=1.) |
Fill an histogram. More... | |
void | fillByNumber (const std::string &name, int number, float val1, float val2=1., float val3=1.) |
void | put (const std::string &file, std::string name="") |
Write one or all histogram(s) in a file. More... | |
virtual | ~Histos () |
Destructor. More... | |
Static Public Member Functions | |
static Histos * | instance () |
Private Member Functions | |
Histos () | |
Private Attributes | |
TObject * | theHisto |
std::map< std::string, TObject * > | theHistos |
std::map< std::string, TObject * > | theObjects |
std::map< std::string, unsigned > | theTypes |
Static Private Attributes | |
static Histos * | myself = 0 |
typedef std::map<std::string,TObject*>::const_iterator Histos::HistoItr |
|
private |
void Histos::addObject | ( | const std::string & | name, |
TObject * | obj | ||
) |
Add any object.
Definition at line 152 of file Histos.cc.
References gather_cfg::cout, and theObjects.
void Histos::book | ( | const std::string & | name, |
int | nx, | ||
float | xmin, | ||
float | xmax, | ||
int | ny = 0 , |
||
float | ymin = 0. , |
||
float | ymax = 0. |
||
) |
Book an histogram (1D or 2D)
Definition at line 23 of file Histos.cc.
References gather_cfg::cout, mergeVDriftHistosByStation::name, theHistos, theTypes, SiStripMonitorClusterAlca_cfi::xmax, SiStripMonitorClusterAlca_cfi::xmin, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.
Referenced by bookByNumber().
void Histos::book | ( | const std::string & | name, |
int | nx, | ||
float | xmin, | ||
float | xmax, | ||
const std::string & | option | ||
) |
Book a TProfile option="S" -> spread "" -> error on mean (from Root documentation)
Definition at line 51 of file Histos.cc.
References gather_cfg::cout, mergeVDriftHistosByStation::name, theHistos, theTypes, SiStripMonitorClusterAlca_cfi::xmax, and SiStripMonitorClusterAlca_cfi::xmin.
void Histos::bookByNumber | ( | const std::string & | name, |
int | n1, | ||
int | n2, | ||
int | nx, | ||
float | xmin, | ||
float | xmax, | ||
int | ny = 0 , |
||
float | ymin = 0. , |
||
float | ymax = 0. |
||
) |
Definition at line 200 of file Histos.cc.
References book(), gather_cfg::cout, SiStripMonitorClusterAlca_cfi::xmax, SiStripMonitorClusterAlca_cfi::xmin, SiStripMonitorClusterAlca_cfi::ymax, and SiStripMonitorClusterAlca_cfi::ymin.
|
inline |
Definition at line 64 of file Histos.h.
References gather_cfg::cout, AlCaHLTBitMon_ParallelJobs::p, and theHistos.
void Histos::divide | ( | const std::string & | h1, |
const std::string & | h2, | ||
const std::string & | h3 | ||
) |
Divide two histograms and put the result in the first.
Definition at line 108 of file Histos.cc.
References gather_cfg::cout, theHistos, and theTypes.
Referenced by python.rootplot.utilities.Hist::__div__(), and cuy.FindIssue::__init__().
void Histos::fill | ( | const std::string & | name, |
float | val1, | ||
float | val2 = 1. , |
||
float | val3 = 1. |
||
) |
Fill an histogram.
Definition at line 168 of file Histos.cc.
References gather_cfg::cout, HcalObjRepresent::Fill(), theHistos, and theTypes.
Referenced by fillByNumber(), and CaloGeometryHelper::getClosestCell().
void Histos::fillByNumber | ( | const std::string & | name, |
int | number, | ||
float | val1, | ||
float | val2 = 1. , |
||
float | val3 = 1. |
||
) |
Definition at line 193 of file Histos.cc.
References fill(), contentValuesFiles::number, value::val1, value::val2, and value::val3.
|
static |
Definition at line 15 of file Histos.cc.
References Histos(), and myself.
Referenced by EcalHitMaker::EcalHitMaker(), and CaloGeometryHelper::getClosestCell().
void Histos::put | ( | const std::string & | file, |
std::string | name = "" |
||
) |
Write one or all histogram(s) in a file.
Definition at line 69 of file Histos.cc.
References gather_cfg::cout, f, theHistos, theObjects, and theTypes.
|
staticprivate |
Definition at line 73 of file Histos.h.
Referenced by instance().
|
private |
|
private |
Definition at line 79 of file Histos.h.
Referenced by addObject(), and put().