5 #ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFiller2D_h
6 #define AthenaMonitoringKernel_HistogramFiller_HistogramFiller2D_h
13 #include "GaudiKernel/MsgStream.h"
31 const size_t size0 = vars.
var[0]->size();
32 const size_t size1 = vars.
var[1]->size();
39 if (
ATH_UNLIKELY(size0 > 1 && size1 > 1 && size0 != size1)) {
41 log << MSG::ERROR <<
"Mismatch of provided vector sizes "
46 std::function<
bool(
size_t)> cutMaskAccessor;
50 if (cutMaskValuePair.first == 0) {
return 0; }
52 cutMaskValuePair.first > 1 && size0 != cutMaskValuePair.first)) {
54 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
55 << cutMaskValuePair.first <<
" " << size0 <<
endmsg;
58 cutMaskAccessor = cutMaskValuePair.second;
62 auto weightAccessor = [&](
size_t i){
return vars.
weight->
get(
i); };
66 log << MSG::ERROR <<
"Weight does not match the size of plotted variable: "
71 if (not vars.
cut)
return HistogramFiller::fill<H>(weightAccessor,
detail::noCut, *vars.
var[0], *vars.
var[1]);
72 else return HistogramFiller::fill<H>(weightAccessor, cutMaskAccessor, *vars.
var[0], *vars.
var[1]);