|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef AthenaMonitoringKernel_HistogramFiller_HistogramFiller1D_h
6 #define AthenaMonitoringKernel_HistogramFiller_HistogramFiller1D_h
15 #include "GaudiKernel/MsgStream.h"
29 std::function<
bool(
size_t)> cutMaskAccessor;
33 if (cutMaskValuePair.first == 0) {
return 0; }
34 if (
ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != vars.
var[0]->size())) {
36 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
37 << cutMaskValuePair.first <<
" " << vars.
var[0]->size() <<
endmsg;
39 cutMaskAccessor = cutMaskValuePair.second;
43 auto weightAccessor = [&](
size_t i){
return vars.
weight->
get(
i); };
47 log << MSG::ERROR <<
"Weight does not match the size of plotted variable: "
51 if (not vars.
cut)
return HistogramFiller::fill<TH1>(weightAccessor,
detail::noCut, *vars.
var[0]);
52 else return HistogramFiller::fill<TH1>(weightAccessor, cutMaskAccessor, *vars.
var[0]);
virtual size_t size() const =0
gives size of vector representation
singleton-like access to IMessageSvc via open function and helper
Filler for plain 1D histograms.
const Monitored::IMonitoredVariable * cut
pointer to cut mask variable, typically absent
virtual unsigned fill(const HistogramFiller::VariablesPack &vars) const override
Method that actually fills the ROOT object.
the internal class used to keep parsed Filler properties
IMessageSvc * getMessageSvc(bool quiet=false)
const Monitored::IMonitoredVariable * weight
pointer to weight variable, typically absent
helper class to pass variables to fillers
auto noCut
no cut for filling
virtual double get(size_t) const =0
Generic monitoring tool for athena components.
Base class for all histogram fillers.
auto noWeight
no weight for filling
HistogramFiller1D(const HistogramDef &definition, std::shared_ptr< IHistogramProvider > provider)
std::vector< const Monitored::IMonitoredVariable * > var
storage for variables, default size of 4, serves all histograming uses
std::pair< size_t, std::function< bool(size_t)> > getCutMaskFunc(const Monitored::IMonitoredVariable *mask) const
setBGCode setTAP setLVL2ErrorBits bool