5#ifndef AthenaMonitoringKernel_HistogramFiller_LumiblockHistogramProvider_h
6#define AthenaMonitoringKernel_HistogramFiller_LumiblockHistogramProvider_h
35 std::shared_ptr<HistogramFactory> factory,
53 const unsigned lumiBlock =
m_gmTool->lumiBlock();
58 const auto it =
m_hists.lower_bound(lumiBlock);
59 if (it!=
m_hists.end() && it->second.second!=
nullptr) {
60 return it->second.second;
67 const int historyDepth =
m_histDef.kLBNHistoryDepth;
68 const unsigned lumiPage = lumiBlock/historyDepth;
71 auto minLumiBlock = [=](
unsigned lumiPage) {
return lumiPage * historyDepth; };
72 auto maxLumiBlock = [=](
unsigned lumiPage) {
return (lumiPage+1) * historyDepth - 1; };
76 def.
alias +=
"_LB" + std::to_string(minLumiBlock(lumiPage));
77 if (historyDepth > 1) {
78 def.
alias +=
"_" + std::to_string(maxLumiBlock(lumiPage));
82 m_hists.emplace(maxLumiBlock(lumiPage), std::make_pair(std::move(def), hist));
86 const unsigned maxLB = it->first;
117 std::map<unsigned, std::pair<HistogramDef, TNamed*>>
m_hists;
Interface of the source of ROOT objects for HistogramFillers.
std::map< unsigned, std::pair< HistogramDef, TNamed * > > m_hists
Map storing upper end of lumi page (or lumiblock if depth==1) with the corresponding histogram defini...
static const unsigned s_deregDelay
Number of lumiblocks before histogram gets deregistered/deleted.
std::shared_ptr< HistogramFactory > m_factory
const HistogramDef m_histDef
std::mutex m_mutex
! mutex for the map
TNamed * histogram() override
Getter of ROOT object.
GenericMonitoringTool *const m_gmTool
LumiblockHistogramProvider(GenericMonitoringTool *const gmTool, std::shared_ptr< HistogramFactory > factory, const HistogramDef &histDef)
Constructor.
Generic monitoring tool for athena components.
the internal class used to keep parsed Filler properties
std::string alias
unique alias for THistSvc
Represents error occurred during accessing histograms objects.