33 mContainer =
src.mContainer;
34 init(gsl::span<const T>(mContainer.data(), mContainer.size()));
43 if (!rhs.canFill() && rhs.getNBins()) {
44 throw std::runtime_error(
"trying to copy read-only histogram");
47 mContainer = rhs.mContainer;
48 init(gsl::span<const T>(mContainer.data(), mContainer.size()));
56 assert(ext.size() > NServiceSlots);
65 if (!(getNBins() ==
other.getNBins() && getXMin() ==
other.getXMin() && getXMax() ==
other.getXMax() && canFill())) {
66 throw std::runtime_error(
"adding incompatible histos or destination histo is const");
68 for (uint32_t
i = getNBins();
i--;) {
69 mDataPtr[
i] +=
other.mDataPtr[
i];
76 if (!(getNBins() ==
other.getNBins() && getXMin() ==
other.getXMin() && getXMax() ==
other.getXMax() && canFill())) {
77 throw std::runtime_error(
"subtracting incompatible histos or destination histo is const");
79 for (uint32_t
i = getNBins();
i--;) {
80 mDataPtr[
i] -=
other.mDataPtr[
i];
88 for (uint32_t
i = getNBins();
i--;) {
89 sum += getBinContent(
i);
97 assert(ext.size() > NServiceSlots);
99 mDataPtr =
const_cast<T*
>(&ext[NServiceSlots]);
100 mNBins = (uint32_t)ext[NBins];
103 mBinSize = ext[BinSize];
104 mBinSizeInv = 1. / mBinSize;
109 assert(nb > 0 && xmin < xmax);
110 mContainer.resize(nb + NServiceSlots, 0.);
111 mContainer[NBins] = nb;
112 mContainer[XMin] = xmin;
113 mContainer[XMax] = xmax;
114 mContainer[BinSize] = (xmax - xmin) / nb;
115 init(gsl::span<const T>(mContainer.data(), mContainer.size()));
121 auto h = std::make_unique<TH1F>(
name.c_str(),
name.c_str(), getNBins(), getXMin(), getXMax());
122 for (uint32_t
i = getNBins();
i--;) {
123 auto w = getBinContent(
i);
125 h->SetBinContent(
i + 1,
w);
1D messeageable histo class
Class for time synchronization of RawReader instances.
float sum(float s, o2::dcs::DataPointValue v)
GLuint const GLchar * name
GLubyte GLubyte GLubyte GLubyte w
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
VectorOfTObjectPtrs other