5#ifndef AthenaMonitoringKernel_HistogramFiller_VecHistogramFiller1D_h
6#define AthenaMonitoringKernel_HistogramFiller_VecHistogramFiller1D_h
21 const size_t maskSize = vars.
cut->
size();
23 if (maskSize == 0 || (maskSize == 1 && !vars.
cut->
get(0))) {
return 0; }
25 if (
ATH_UNLIKELY(maskSize > 1 && maskSize != vars[0]->size())) {
27 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
28 << maskSize <<
" " << vars[0]->
size() <<
endmsg;
36 log << MSG::WARNING <<
"Histogram " <<
histogram->GetName()
37 <<
" filled with kVec(UO) option with variable " << vars[0]->name()
38 <<
" have incompatible sizes (histogram) " <<
histogram->GetNbinsX()
39 <<
" (variable) " << vars[0]->
size()
40 <<
" They ought to match exactly for kVec option or n. hist. bins +2 == var. size fro kVecOU" <<
endmsg;
44 const unsigned offset =
m_histDef->kVecUO ? 0 : 1;
45 for (
unsigned i = 0; i < vars[0]->
size(); ++i) {
46 if (vars.
cut ==
nullptr or vars.
cut->
get(i)) {
47 const double value = vars[0]->get(i);
48 histogram->AddBinContent(i+offset, value);
53 return vars[0]->
size();
HistogramFiller1D(const HistogramDef &definition, std::shared_ptr< IHistogramProvider > provider)
std::shared_ptr< HistogramDef > m_histDef
virtual double get(size_t) const =0
virtual size_t size() const =0
gives size of vector representation
VecHistogramFiller1D(const HistogramDef &definition, std::shared_ptr< IHistogramProvider > provider)
virtual unsigned fill(const HistogramFiller::VariablesPack &vars) const override
Method that actually fills the ROOT object.
IMessageSvc * getMessageSvc(bool quiet=false)
Generic monitoring tool for athena components.
the internal class used to keep parsed Filler properties
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 )