5#ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFillerRebinable1D_h
6#define AthenaMonitoringKernel_HistogramFiller_HistogramFillerRebinable1D_h
23 template<
typename BASE, Monitored::Axis AXIS>
28 : BASE(definition,
std::move(provider)) {
30 m_rebinMode = RebinMode::AddBins;
32 m_rebinMode = RebinMode::ExtendAxes;
37 if (AXIS >= vars.
size() ) {
return 0; }
38 if (vars[AXIS]->size()==0) {
return 0; }
43 for(
size_t i=0; i<vars.
cut->
size(); i++) {
44 anyTrue |=
static_cast<bool>(vars.
cut->
get(i));
46 if(!anyTrue) {
return 0; }
49 double min = std::numeric_limits<double>::max();
50 double max = std::numeric_limits<double>::min();
52 for (
size_t i = 0; i < var.size(); i++) {
53 const double v = var.get(i);
69 if (
max >= axis->GetXmax()) hist->ExtendAxis(
max, axis);
72 return BASE::fill( vars );
OH histogram lock header file.
static std::mutex & globalROOTMutex()
Mixin class for rebinning of histogram axis.
HistogramFillerRebinableAxis(const HistogramDef &definition, std::shared_ptr< IHistogramProvider > provider)
virtual unsigned fill(const HistogramFiller::VariablesPack &vars) const override
virtual double get(size_t) const =0
virtual size_t size() const =0
gives size of vector representation
constexpr auto getAxis(H *hist)
Helper to get corresponding TAxis selected by Monitored::Axis.
constexpr std::array axis_bit
bool shouldRebinHistogram(const TAxis *axis, const double value)
Method checks if histogram should be rebinned.
void rebinHistogram(H *hist, const double value)
Method that rebins a histogram.
Generic monitoring tool for athena components.
HistogramFillerRebinableAxis< HistogramFillerRebinable2DX, Axis::Y > HistogramFillerRebinable2D
Rebinable 2D histogram (both axes)
HistogramFillerRebinableAxis< HistogramFiller2D, Axis::Y > HistogramFillerRebinable2DY
Rebinable 2D histogram (y-axis only)
HistogramFillerRebinableAxis< HistogramFiller2D, Axis::X > HistogramFillerRebinable2DX
Rebinable 2D histogram (x-axis only)
HistogramFillerRebinableAxis< HistogramFiller1D, Axis::X > HistogramFillerRebinable1D
Rebinable 1D histogram.
the internal class used to keep parsed Filler properties
bool kAddBinsDynamically
add new bins outside the existing range
helper class to pass variables to fillers
const Monitored::IMonitoredVariable * cut
pointer to cut mask variable, typically absent
size_t size() const
number of variables in the pack ( not counting the weight and mask )