Filler for profile 2D histogram.
More...
#include <HistogramFiller2DProfile.h>
Filler for profile 2D histogram.
Definition at line 17 of file HistogramFiller2DProfile.h.
◆ HistogramFiller2DProfile()
◆ fill() [1/2]
Method that actually fills the ROOT object.
- Returns
- number of fills performed
Implements Monitored::HistogramFiller.
Definition at line 23 of file HistogramFiller2DProfile.h.
24 if ( vars.size() != 3) {
29 const size_t maskSize = vars.cut->size();
35 auto cutMaskAccessor = [&](
size_t i) {
return static_cast<bool>(vars.cut->get(
i)); };
39 auto weightAccessor = [&](
size_t i){
return vars.weight->get(
i); };
40 const size_t size0 = vars[0]->size();
41 const size_t size1 = vars[1]->size();
42 const size_t size2 = vars[2]->size();
43 const size_t sizeWeight = vars.weight->size();
45 sizeWeight > 1 && size0 != sizeWeight)) {
47 log << MSG::ERROR <<
"Weight does not match the size of plotted variable: "
48 << vars.weight->size() <<
" " << size0 <<
endmsg;
52 if (not vars.cut)
return HistogramFiller::fill<TProfile2D>(weightAccessor,
detail::noCut, *vars[0], *vars[1], *vars[2]);
53 else return HistogramFiller::fill<TProfile2D>(weightAccessor, cutMaskAccessor, *vars[0], *vars[1], *vars[2]);
57 else return HistogramFiller::fill<TProfile2D>(
detail::noWeight, cutMaskAccessor, *vars[0], *vars[1], *vars[2]);
◆ 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 168 of file HistogramFiller.h.
169 auto hist = this->histogram<H>();
◆ 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.