CbmRoot
|
#include <Histogram.h>
Public Member Functions | |
Prof1D (const std::string &name, const std::string &title, uint32_t nBinsX, double xMin, double xMax, double yMin=0., double yMax=0.) | |
Constructor for 2D-histogram. | |
Prof1D ()=default | |
Default constructor. | |
Prof1D (const Prof1D &)=default | |
Copy constructor. | |
Prof1D (Prof1D &&)=default | |
Move constructor. | |
Prof1D & | operator= (const Prof1D &)=default |
Copy assignment operator. | |
Prof1D & | operator= (Prof1D &&)=default |
Move assignment operator. | |
int | Fill (double x, double y, double w=1.) |
Fills histogram. | |
auto | GetBinAccumulator (uint32_t iBin) const |
Gets underlying bin accumulator. | |
double | GetBinContent (uint32_t iBin) const |
Gets bin content. | |
double | GetBinCount (uint32_t iBin) const |
Gets bin entries. | |
double | GetBinError (uint32_t iBin) const |
Gets bin error. | |
double | GetMinY () const |
Gets y-axis lower bound. | |
double | GetMaxY () const |
Gets y-axis lower bound. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
double | GetAxisMin () const |
Gets range lower bound of the selected axis. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
double | GetAxisMax () const |
Gets range upper bound of the selected axis. | |
template<EAxis A, unsigned IA = static_cast<unsigned>(A), std::enable_if_t<(IA< Rank), bool > = true> | |
uint32_t | GetAxisNbins () const |
Gets number of bins in axis. | |
double | GetEntries () const |
Gets number of entries. | |
bool | GetFlag (EHistFlag key) const |
Get flag. | |
const std::string & | GetName () const |
Gets name. | |
const HistogramMetadata & | GetMetadata () const |
Gets metadata instance. | |
std::string | GetMetadataString () const |
Gets metadata string. | |
uint32_t | GetNbinsX () const |
Gets number of bins for x axis. | |
double | GetMinX () const |
Gets x-axis lower bound. | |
double | GetMaxX () const |
Gets x-axis lower bound. | |
template<unsigned RankCheck = Rank, std::enable_if_t<(RankCheck > 1), bool > = true> | |
uint32_t | GetNbinsY () const |
Gets number of bins for y axis. | |
double | GetMaximum () const |
Gets maximum value. | |
double | GetMinimum () const |
Gets minimum value. | |
const std::string & | GetTitle () const |
Gets title. | |
void | Reset () |
Resets the histogram. | |
void | SetFlag (EHistFlag key, bool flag=true) |
Get flag. | |
void | SetName (const std::string &name) |
Sets name. | |
void | SetTitle (const std::string &title) |
Sets title. | |
Protected Types | |
using | Hist_t = bh::histogram<Axes, Storage> |
Static Protected Member Functions | |
static int | GetBinBH (uint32_t iBin) |
Gets bin index in underlying boost histogram. | |
Protected Attributes | |
Hist_t | fHistogram |
Underlying boost histogram. | |
std::string | fName = "" |
Name of the histogram. | |
std::string | fTitle = "" |
Title of the histogram. | |
int | fEntries = 0 |
Number of histogram entries. | |
HistogramMetadata | fMetadata |
Meta-data for histogram. | |
Static Protected Attributes | |
static constexpr unsigned | Rank = std::tuple_size_v<Axes> |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Private Attributes | |
double | fYmin = 0. |
Lower bound of the profile y-axis. | |
double | fYmax = 0. |
Upper bound of the profile y-axis. | |
Friends | |
class | boost::serialization::access |
Serialization rule. | |
Definition at line 603 of file Histogram.h.
|
protectedinherited |
Definition at line 252 of file Histogram.h.
|
inline |
Constructor for 2D-histogram.
name | Name of histogram |
title | Title of histogram |
nBinsX | Number of x bins |
xMin | Lower x bound |
xMax | Upper x bound |
yMin | Lower y bound (optional) |
yMax | Upper y bound (optional) |
Definition at line 616 of file Histogram.h.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
inline |
Fills histogram.
x | Value along x-axis |
y | Value along y-axis |
w | Weight |
Skip measurement, if it goes beyond the defined [fYmin, fYmax] range
Definition at line 644 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries, cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, fYmax, fYmin, cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsX(), x, and y.
|
inlineinherited |
Gets range upper bound of the selected axis.
AxisType | An axis |
Definition at line 270 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaxX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaxY().
|
inlineinherited |
Gets range lower bound of the selected axis.
AxisType | An axis |
Definition at line 262 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinY().
|
inlineinherited |
Gets number of bins in axis.
AxisT | An axis |
D |
Definition at line 279 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsX(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetNbinsY().
|
inline |
Gets underlying bin accumulator.
iBin | Bin index along x-axis |
Definition at line 664 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inlinestaticprotectedinherited |
Gets bin index in underlying boost histogram.
iBin | Bin in histogram |
Definition at line 410 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::GetBinAccumulator(), cbm::algo::qa::H2D::GetBinAccumulator(), GetBinAccumulator(), cbm::algo::qa::Prof2D::GetBinAccumulator(), cbm::algo::qa::H1D::GetBinContent(), cbm::algo::qa::H2D::GetBinContent(), GetBinContent(), cbm::algo::qa::Prof2D::GetBinContent(), GetBinCount(), cbm::algo::qa::Prof2D::GetBinCount(), cbm::algo::qa::H1D::GetBinError(), cbm::algo::qa::H2D::GetBinError(), GetBinError(), and cbm::algo::qa::Prof2D::GetBinError().
|
inline |
Gets bin content.
iBin | Bin index |
Definition at line 668 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inline |
Gets bin entries.
iBin | Bin index |
Definition at line 672 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inline |
Gets bin error.
iBin | Bin index |
Definition at line 676 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetBinBH().
|
inlineinherited |
Gets number of entries.
Definition at line 286 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries.
Referenced by CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Get flag.
key | Flag key from the EHistFlag enumeration |
Definition at line 294 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::GetFlag().
|
inlineinherited |
Gets maximum value.
Definition at line 336 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineinherited |
Gets x-axis lower bound.
Definition at line 312 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inline |
Gets y-axis lower bound.
Definition at line 682 of file Histogram.h.
References fYmax.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets metadata instance.
Definition at line 300 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata.
|
inlineinherited |
Gets metadata string.
Definition at line 303 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::ToString().
|
inlineinherited |
Gets minimum value.
Definition at line 342 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineinherited |
Gets x-axis lower bound.
Definition at line 309 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMin().
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inline |
Gets y-axis lower bound.
Definition at line 679 of file Histogram.h.
References fYmin.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets name.
Definition at line 297 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fName.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets number of bins for x axis.
Definition at line 306 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), Fill(), cbm::algo::qa::Prof2D::Fill(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and CbmTaskDigiEventQa::ToTH1D().
|
inlineinherited |
Gets number of bins for y axis.
Definition at line 316 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins().
Referenced by cbm::algo::qa::H2D::Fill(), cbm::algo::qa::Prof2D::Fill(), cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Gets title.
Definition at line 348 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fTitle.
Referenced by cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), cbm::qa::OnlineInterface::ROOTHistogram(), and cbm::qa::OnlineInterface::ROOTHistogram().
|
inlineinherited |
Resets the histogram.
Definition at line 351 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fEntries, and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fHistogram.
|
inlineprivate |
Definition at line 688 of file Histogram.h.
|
inlineinherited |
Get flag.
key | Flag key from the EHistFlag enumeration |
flag | Flag value |
Definition at line 361 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fMetadata, and cbm::algo::qa::HistogramMetadata::SetFlag().
|
inlineinherited |
Sets name.
name | Histogram name |
Definition at line 365 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fName.
|
inlineinherited |
Sets title.
title | Histogram title |
Definition at line 370 of file Histogram.h.
References cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::fTitle.
|
friend |
Serialization rule.
Definition at line 686 of file Histogram.h.
|
protectedinherited |
Number of histogram entries.
Definition at line 415 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), Fill(), cbm::algo::qa::Prof2D::Fill(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetEntries(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::Reset(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize().
|
protectedinherited |
Underlying boost histogram.
Definition at line 412 of file Histogram.h.
Referenced by cbm::algo::qa::H1D::Fill(), cbm::algo::qa::H2D::Fill(), Fill(), cbm::algo::qa::Prof2D::Fill(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMax(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisMin(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetAxisNbins(), cbm::algo::qa::H1D::GetBinAccumulator(), cbm::algo::qa::H2D::GetBinAccumulator(), GetBinAccumulator(), cbm::algo::qa::Prof2D::GetBinAccumulator(), cbm::algo::qa::H1D::GetBinContent(), cbm::algo::qa::H2D::GetBinContent(), GetBinContent(), cbm::algo::qa::Prof2D::GetBinContent(), GetBinCount(), cbm::algo::qa::Prof2D::GetBinCount(), cbm::algo::qa::H1D::GetBinError(), cbm::algo::qa::H2D::GetBinError(), GetBinError(), cbm::algo::qa::Prof2D::GetBinError(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMaximum(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMinimum(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::Reset(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize().
|
protectedinherited |
Meta-data for histogram.
Definition at line 416 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetFlag(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMetadata(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMetadataString(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetFlag().
|
protectedinherited |
Name of the histogram.
Definition at line 413 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetName(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetName().
|
protectedinherited |
Title of the histogram.
Definition at line 414 of file Histogram.h.
Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetTitle(), cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::serialize(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetTitle().
|
private |
Upper bound of the profile y-axis.
Definition at line 696 of file Histogram.h.
Referenced by Fill(), GetMaxY(), and serialize().
|
private |
Lower bound of the profile y-axis.
Definition at line 695 of file Histogram.h.
Referenced by Fill(), GetMinY(), and serialize().
|
staticconstexprprotectedinherited |
Definition at line 253 of file Histogram.h.