#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, const std::string &option) |
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 | 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 = nullptr |
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 115 of file Histos.cc.
References gather_cfg::cout, hh, Skims_PA_cff::name, getGTfromDQMFile::obj, and theObjects.
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 39 of file Histos.cc.
References gather_cfg::cout, Skims_PA_cff::name, fileinputsource_cfi::option, theHistos, theTypes, TrackerOfflineValidation_Dqm_cff::xmax, and TrackerOfflineValidation_Dqm_cff::xmin.
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, Skims_PA_cff::name, theHistos, theTypes, TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.
Referenced by bookByNumber().
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 151 of file Histos.cc.
References book(), gather_cfg::cout, callgraph::n2, Skims_PA_cff::name, TrackerOfflineValidation_Dqm_cff::xmax, TrackerOfflineValidation_Dqm_cff::xmin, L1TOccupancyClient_cfi::ymax, and L1TOccupancyClient_cfi::ymin.
|
inline |
Definition at line 63 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 85 of file Histos.cc.
References gather_cfg::cout, theHistos, and theTypes.
Referenced by python.rootplot.utilities.Hist::__div__().
void Histos::fill | ( | const std::string & | name, |
float | val1, | ||
float | val2 = 1. , |
||
float | val3 = 1. |
||
) |
Fill an histogram.
Definition at line 125 of file Histos.cc.
References gather_cfg::cout, HcalObjRepresent::Fill(), hh, Skims_PA_cff::name, 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 145 of file Histos.cc.
References fill(), Skims_PA_cff::name, and contentValuesFiles::number.
|
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 49 of file Histos.cc.
References gather_cfg::cout, f, geometryDiff::file, hh, photonIsolationHIProducer_cfi::ho, Skims_PA_cff::name, theHistos, theObjects, and theTypes.
|
staticprivate |
Definition at line 71 of file Histos.h.
Referenced by instance().
|
private |
|
private |
Definition at line 77 of file Histos.h.
Referenced by addObject(), and put().