5 #ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFiller2D_h
6 #define AthenaMonitoringKernel_HistogramFiller_HistogramFiller2D_h
13 #include "GaudiKernel/MsgStream.h"
29 if (
ATH_UNLIKELY(vars.
size()!=2 or vars[0] ==
nullptr or vars[1] ==
nullptr ))
return 0;
31 const size_t size0 = vars[0]->
size();
32 const size_t size1 = vars[1]->
size();
39 if (
ATH_UNLIKELY(size0 > 1 && size1 > 1 && size0 != size1)) {
41 log << MSG::ERROR <<
"Mismatch of provided vector sizes "
53 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
60 auto cutMaskAccessor = [&](
size_t i) {
return static_cast<bool>(vars.
cut->
get(
i)); };
63 auto weightAccessor = [&](
size_t i){
return vars.
weight->
get(
i); };
67 log << MSG::ERROR <<
"Weight does not match the size of plotted variable: "
72 if (not vars.
cut)
return HistogramFiller::fill<H>(weightAccessor,
detail::noCut, *vars[0], *vars[1]);
73 else return HistogramFiller::fill<H>(weightAccessor, cutMaskAccessor, *vars[0], *vars[1]);
77 else return HistogramFiller::fill<H>(
detail::noWeight, cutMaskAccessor, *vars[0], *vars[1]);