ATLAS Offline Software
Loading...
Searching...
No Matches
HistogramFillerFactory.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5
10
11#include "HistogramFiller1D.h"
17#include "HistogramFiller2D.h"
19#include "HistogramFillerTree.h"
20
22
23using namespace Monitored;
24
26 std::shared_ptr<IHistogramProvider> histogramProvider = createHistogramProvider(def);
27
28 if (def.type.starts_with( "TH1")) {
29 if (def.kCumulative) {
30 return new CumulativeHistogramFiller1D(def, std::move(histogramProvider));
31 } else if (def.kAddBinsDynamically || def.kRebinAxes) {
32 return new HistogramFillerRebinable1D(def, std::move(histogramProvider));
33 } else if (def.kVec || def.kVecUO) {
34 return new VecHistogramFiller1D(def, std::move(histogramProvider));
35 } else {
36 return new HistogramFiller1D(def, std::move(histogramProvider));
37 }
38 } else if (def.type.starts_with( "TH2")) {
39 if (def.kAddBinsDynamically || def.kRebinAxes) {
40 return new HistogramFillerRebinable2D(def, std::move(histogramProvider));
41 } else {
42 return new HistogramFiller2D(def, std::move(histogramProvider));
43 }
44 } else if (def.type == "TProfile") {
45 if (def.kAddBinsDynamically || def.kRebinAxes) {
46 return new HistogramFillerProfileRebinable(def, std::move(histogramProvider));
47 } else {
48 return new HistogramFillerProfile(def, std::move(histogramProvider));
49 }
50 } else if (def.type == "TProfile2D") {
51 if (def.kAddBinsDynamically || def.kRebinAxes) {
52 return new HistogramFiller2DProfileRebinable(def, std::move(histogramProvider));
53 } else {
54 return new HistogramFiller2DProfile(def, std::move(histogramProvider));
55 }
56 } else if (def.type == "TEfficiency") {
57 return new HistogramFillerEfficiency(def, std::move(histogramProvider));
58 } else if (def.type == "TTree") {
59 return new HistogramFillerTree(def, std::move(histogramProvider));
60 }
61
62 return nullptr;
63}
64
65std::shared_ptr<IHistogramProvider> HistogramFillerFactory::createHistogramProvider(const HistogramDef& def) {
66 std::shared_ptr<IHistogramProvider> result;
67
70 } else if (def.kLBNHistoryDepth) {
72 } else if (def.kLive) {
74 } else {
76 }
77
78 return result;
79}
Filler for 1D histograms filled in cummulative mode.
Filler for plain 1D histograms.
Filler for profile 2D histogram.
std::shared_ptr< IHistogramProvider > createHistogramProvider(const HistogramDef &def)
std::shared_ptr< HistogramFactory > m_factory
HistogramFiller * create(const HistogramDef &def)
Creates HistogramFiller instance for given definition.
Base class for all histogram fillers.
Provides latest-N-lumiblock histograms to be filled.
Implementation of IHistogramProvider for lumi block based histograms.
Implementation of IHistogramProvider for offline histograms.
Default implementation of IHistogramProvider interface.
Generic monitoring tool for athena components.
HistogramFillerRebinableAxis< HistogramFillerRebinable2DX, Axis::Y > HistogramFillerRebinable2D
Rebinable 2D histogram (both axes)
HistogramFillerRebinableAxis< HistogramFiller2DProfile, Axis::X > HistogramFiller2DProfileRebinable
TProfile2D filler with rebinable x-axis.
HistogramFillerRebinableAxis< HistogramFiller1D, Axis::X > HistogramFillerRebinable1D
Rebinable 1D histogram.
HistogramFiller2DGeneric< TProfile > HistogramFillerProfile
TProfile filler.
HistogramFillerRebinableAxis< HistogramFillerProfile, Axis::X > HistogramFillerProfileRebinable
TProfile filler with rebinable x-axis.
HistogramFiller2DGeneric< TH2 > HistogramFiller2D
the internal class used to keep parsed Filler properties
@ Offline
monitoring data offline
int kLBNHistoryDepth
length of lb history
std::string type
class name
bool kVec
add content to each bin from each element of a vector
bool kCumulative
fill bin of monitored object's value, and every bin below it
bool kRebinAxes
increase the axis range without adding new bins
int kLive
fill only the last N lumiblocks in y_vs_lb plots
bool kAddBinsDynamically
add new bins outside the existing range
RunMode runmode
online or offline
bool kVecUO
add content to each bin from vector, including overflow/underflow