#include <VecHistogramFiller1D.h>
Definition at line 11 of file VecHistogramFiller1D.h.
◆ VecHistogramFiller1D()
◆ fill() [1/2]
Method that actually fills the ROOT object.
- Returns
- number of fills performed
Reimplemented from Monitored::HistogramFiller1D.
Definition at line 17 of file VecHistogramFiller1D.h.
18 if (
ATH_UNLIKELY(vars.size() == 0 or vars.var[0] ==
nullptr) ) {
return 0; }
20 std::function<
bool(
size_t)> cutMaskAccessor;
24 if (cutMaskValuePair.first == 0) {
return 0; }
25 if (
ATH_UNLIKELY(cutMaskValuePair.first > 1 && cutMaskValuePair.first != vars.var[0]->size())) {
27 log << MSG::ERROR <<
"CutMask does not match the size of plotted variable: "
28 << cutMaskValuePair.first <<
" " << vars.var[0]->size() <<
endmsg;
30 cutMaskAccessor = cutMaskValuePair.second;
36 log << MSG::WARNING <<
"Histogram " <<
histogram->GetName()
37 <<
" filled with kVec(UO) option with variable " << vars.var[0]->name()
38 <<
" have incompatible sizes (histogram) " <<
histogram->GetNbinsX()
39 <<
" (variable) " << vars.var[0]->size()
40 <<
" They ought to match exactly for kVec option or n. hist. bins +2 == var. size fro kVecOU" <<
endmsg;
45 for (
unsigned i = 0;
i < vars.var[0]->size(); ++
i) {
46 if (cutMaskAccessor ==
nullptr or cutMaskAccessor(
i)) {
47 const double value = vars.var[0]->get(
i);
53 return vars.var[0]->size();
◆ fill() [2/2]
template<class H , typename W , typename C , typename ... Ms>
unsigned Monitored::HistogramFiller::fill |
( |
W |
weight, |
|
|
C |
cut, |
|
|
const Ms &... |
m |
|
) |
| const |
|
inlineprotectedinherited |
Fill histogram from IMonitoredVariable.
Supports arbitrary dimensions and double/string representation.
- Template Parameters
-
H | histogram type (TH1, TH2, ...) |
- Parameters
-
Definition at line 184 of file HistogramFiller.h.
185 auto hist = this->histogram<H>();
◆ getCutMaskFunc()
Definition at line 155 of file HistogramFiller.h.
156 std::function<
bool(
size_t)> cutMaskValue = [] (size_t){
return true; };
158 if (
mask !=
nullptr ) {
163 return std::make_pair(0, [](
size_t){
return false; });
167 return std::make_pair(
maskSize, [
mask](
size_t i){
return static_cast<bool>(
mask->get(
i)); });
170 return std::make_pair(
maskSize, cutMaskValue);
◆ getLock()
const std::unique_lock<std::mutex> Monitored::HistogramFiller::getLock |
( |
| ) |
const |
|
inlineinherited |
◆ histogram()
template<class H >
H* Monitored::HistogramFiller::histogram |
( |
| ) |
const |
|
inlineprotectedinherited |
◆ histogramCutMaskName()
const std::string& Monitored::HistogramFiller::histogramCutMaskName |
( |
| ) |
const |
|
inlineinherited |
◆ histogramVariablesNames()
const std::vector<std::string>& Monitored::HistogramFiller::histogramVariablesNames |
( |
| ) |
const |
|
inlineinherited |
◆ histogramWeightName()
const std::string& Monitored::HistogramFiller::histogramWeightName |
( |
| ) |
const |
|
inlineinherited |
◆ touch()
void Monitored::HistogramFiller::touch |
( |
| ) |
const |
|
inlineinherited |
◆ m_histDef
std::shared_ptr<HistogramDef> Monitored::HistogramFiller::m_histDef |
|
protectedinherited |
◆ m_histogramProvider
◆ m_lock
std::mutex Monitored::HistogramFiller::m_lock |
|
mutableprotectedinherited |
The documentation for this class was generated from the following file:
void doFill(H *hist, W weight, size_t i, const M &m1, const Ms &... m)
Perform (arbitrary dimension) histogram fill with weight.