LDMX Software
|
Interface class between an EventProcessor and the HistogramPool. More...
#include <Histograms.h>
Public Member Functions | |
HistogramHelper (const std::string &name) | |
Constructor. | |
void | setWeight (double w) |
Set the weight for filling the histograms. | |
void | create (const std::string &name, const std::string &xLabel, const double &bins, const double &xmin, const double &xmax) |
Create a ROOT 1D histogram of type TH1F and pool it for later use. | |
void | create (const std::string &name, const std::string &xLabel, const std::vector< double > &bins) |
Create a ROOT 1D histogram of type TH1F and pool it for later use. | |
void | create (const std::string &name, const std::string &xLabel, const double &xbins, const double &xmin, const double &xmax, const std::string &yLabel, const double &ybins, const double &ymin, const double &ymax) |
Create a ROOT 2D histogram of type TH2F and pool it for later use. | |
void | create (const std::string &name, const std::string &xLabel, const std::vector< double > &xbins, const std::string &yLabel, const std::vector< double > &ybins) |
Create a ROOT 2D histogram of type TH2F and pool it for later use. | |
void | fill (const std::string &name, const double &val) |
Fill a 1D histogram. | |
void | fill (const std::string &name, const double &valx, const double &valy) |
Fill a 2D histogram. | |
TH1 * | get (const std::string &name) |
Get a pointer to a histogram by name. | |
Private Attributes | |
double | theWeight_ {1.} |
The weight to fill histograms with. | |
std::string | name_ |
The name of the processor that this helper is assigned to. | |
Interface class between an EventProcessor and the HistogramPool.
Definition at line 72 of file Histograms.h.
|
inline |
Constructor.
Sets the name
Definition at line 86 of file Histograms.h.
void framework::HistogramHelper::create | ( | const std::string & | name, |
const std::string & | xLabel, | ||
const double & | bins, | ||
const double & | xmin, | ||
const double & | xmax | ||
) |
Create a ROOT 1D histogram of type TH1F and pool it for later use.
name | Name of the histogram. This will also be used as a title. |
xLabel | Title of the x axis. |
bins | Total number of histogram bins. |
xmin | The lower histogram limit. |
xmax | The upper histogram limit. |
Definition at line 55 of file Histograms.cxx.
References framework::HistogramPool::getInstance(), framework::HistogramPool::insert(), and name_.
Referenced by dqm::SimObjects::createCalorimeterHists(), framework::EventProcessor::createHistograms(), dqm::SimObjects::createTrackerHists(), dqm::SimObjects::onProcessStart(), dqm::Trigger::onProcessStart(), dqm::TrigScintClusterDQM::onProcessStart(), dqm::TrigScintDQM::onProcessStart(), dqm::TrigScintHitDQM::onProcessStart(), dqm::TrigScintTrackDQM::onProcessStart(), and dqm::HCalRawDigi::onProcessStart().
void framework::HistogramHelper::create | ( | const std::string & | name, |
const std::string & | xLabel, | ||
const double & | xbins, | ||
const double & | xmin, | ||
const double & | xmax, | ||
const std::string & | yLabel, | ||
const double & | ybins, | ||
const double & | ymin, | ||
const double & | ymax | ||
) |
Create a ROOT 2D histogram of type TH2F and pool it for later use.
name | Name of the histogram. This will also be used as a title. |
xLabel | Title of the x axis. |
xbins | Total number of histogram bins in x. |
xmin | The lower histogram limit in x. |
xmax | The upper histogram limit in x. |
yLabel | Title of the x axis. |
ybins | Total number of histogram bins in y. |
ymin | The lower histogram limit in y. |
ymax | The upper histogram limit in y. |
Definition at line 99 of file Histograms.cxx.
References framework::HistogramPool::getInstance(), framework::HistogramPool::insert(), and name_.
void framework::HistogramHelper::create | ( | const std::string & | name, |
const std::string & | xLabel, | ||
const std::vector< double > & | bins | ||
) |
Create a ROOT 1D histogram of type TH1F and pool it for later use.
name | Name of the histogram. This will also be used as a title. |
xLabel | Title of the x axis. |
bins | vector of bin edges |
Definition at line 74 of file Histograms.cxx.
References framework::HistogramPool::getInstance(), framework::HistogramPool::insert(), and name_.
void framework::HistogramHelper::create | ( | const std::string & | name, |
const std::string & | xLabel, | ||
const std::vector< double > & | xbins, | ||
const std::string & | yLabel, | ||
const std::vector< double > & | ybins | ||
) |
Create a ROOT 2D histogram of type TH2F and pool it for later use.
name | Name of the histogram. This will also be used as a title. |
xLabel | Title of the x axis. |
xbins | Bin edges on x axis |
yLabel | Title of the y axis. |
ybins | Bin edges on y axis |
Definition at line 125 of file Histograms.cxx.
References framework::HistogramPool::getInstance(), framework::HistogramPool::insert(), and name_.
|
inline |
Fill a 1D histogram.
Uses the current setting of theWeight_.
name | name of the histogram to fill |
val | value to fill |
Definition at line 166 of file Histograms.h.
References get(), and theWeight_.
Referenced by dqm::EcalDigiVerifier::analyze(), dqm::EcalMipTrackingFeatures::analyze(), dqm::EcalShowerFeatures::analyze(), dqm::EcalVetoResults::analyze(), dqm::SimObjects::analyze(), dqm::Trigger::analyze(), dqm::TrigScintClusterDQM::analyze(), dqm::TrigScintDQM::analyze(), dqm::TrigScintHitDQM::analyze(), dqm::TrigScintTrackDQM::analyze(), dqm::HcalGeometryVerifier::analyze(), dqm::HcalInefficiencyAnalyzer::analyze(), dqm::HCalRawDigi::analyze(), dqm::PhotoNuclearDQM::analyze(), dqm::RecoilTrackerDQM::analyze(), dqm::SampleValidation::analyze(), tracking::dqm::TrackerDigiDQM::analyze(), tracking::dqm::TrackingRecoDQM::analyze(), dqm::PhotoNuclearDQM::findParticleKinematics(), dqm::PhotoNuclearDQM::findRecoilProperties(), dqm::PhotoNuclearDQM::findSubleadingKinematics(), dqm::DarkBremInteraction::produce(), and tracking::dqm::TrackingRecoDQM::TrackStateMonitoring().
|
inline |
Fill a 2D histogram.
Uses the current setting of theWeight_.
name | name of the histogram to fill |
valx | x value to fill |
valy | y value to fill |
Definition at line 182 of file Histograms.h.
References get(), and theWeight_.
|
inline |
Get a pointer to a histogram by name.
name | name of the histogram to get |
Definition at line 194 of file Histograms.h.
References framework::HistogramPool::get(), framework::HistogramPool::getInstance(), and name_.
Referenced by fill(), fill(), dqm::SimObjects::onProcessStart(), dqm::PhotoNuclearDQM::onProcessStart(), dqm::SampleValidation::onProcessStart(), and dqm::DarkBremInteraction::setHistLabels().
|
inline |
Set the weight for filling the histograms.
Definition at line 91 of file Histograms.h.
References theWeight_.
Referenced by dqm::DarkBremInteraction::produce().
|
private |
|
private |
The weight to fill histograms with.
Definition at line 75 of file Histograms.h.
Referenced by fill(), fill(), and setWeight().