ATLAS Offline Software
MonitoredRange.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGCOSTANALYSIS_MONITOREDRANGE_H
6 #define TRIGCOSTANALYSIS_MONITOREDRANGE_H 1
7 
8 #include "GaudiKernel/StatusCode.h"
10 
11 #include "CostData.h"
12 #include "MonitorBase.h"
13 
14 #include <string>
15 #include <set>
16 #include <memory>
17 
18 class TrigCostAnalysis; // Forward reference
19 class TH1; // Forward reference
20 
30  public:
34  MonitoredRange() = delete;
35 
43  MonitoredRange(const std::string& name, TrigCostAnalysis* parent);
44 
48  ~MonitoredRange() = default;
49 
54 
58  MonitoredRange(const MonitoredRange&) = delete;
59 
64  const std::string& getName() const;
65 
70  const TrigCostAnalysis* getParent() const;
71 
78  TH1* bookGetPointer(TH1* hist, const std::string& tDir = "") const;
79 
84  std::set< std::unique_ptr<MonitorBase> >& getMonitors();
85 
90  StatusCode addMonitor(std::unique_ptr<MonitorBase> monitor);
91 
97  StatusCode newEvent(const CostData& data, const float weight = 1., const bool skipMonitoringThisEvent = false);
98 
99  private:
100 
101  const std::string m_name;
104  std::set< std::unique_ptr<MonitorBase> > m_monitors;
105  std::set< uint32_t > m_seenLB;
106 
107 };
108 
109 #endif // TRIGCOSTANALYSIS_MONITOREDRANGE_H
MonitoredRange::m_parent
TrigCostAnalysis * m_parent
Cached ptr to the parent Athena algorithm.
Definition: MonitoredRange.h:102
MonitorBase.h
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
MonitoredRange::bookGetPointer
TH1 * bookGetPointer(TH1 *hist, const std::string &tDir="") const
Appends Range's name (to histogram path) and forwards histogram book request to parent Athena algorit...
Definition: MonitoredRange.cxx:34
AthCheckMacros.h
MonitoredRange::~MonitoredRange
~MonitoredRange()=default
Default destructor.
plotmaker.hist
hist
Definition: plotmaker.py:148
MonitoredRange::addMonitor
StatusCode addMonitor(std::unique_ptr< MonitorBase > monitor)
Adds a new Monitor into this Range.
Definition: MonitoredRange.cxx:49
MonitoredRange::m_monitors
std::set< std::unique_ptr< MonitorBase > > m_monitors
Storage of Range's Monitors.
Definition: MonitoredRange.h:104
MonitoredRange::m_seenLB
std::set< uint32_t > m_seenLB
Luminosity blocks for which we have seen at least one event.
Definition: MonitoredRange.h:105
MonitoredRange::getName
const std::string & getName() const
Getter for Range's name.
Definition: MonitoredRange.cxx:24
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
MonitoredRange::m_name
const std::string m_name
Name of the Monitored Range.
Definition: MonitoredRange.h:101
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
test_pyathena.parent
parent
Definition: test_pyathena.py:15
MonitoredRange::newEvent
StatusCode newEvent(const CostData &data, const float weight=1., const bool skipMonitoringThisEvent=false)
Interface called by TrigCostAnalysis algorithm to instruct this Range to trigger all its Monitors.
Definition: MonitoredRange.cxx:55
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
MonitoredRange::getMonitors
std::set< std::unique_ptr< MonitorBase > > & getMonitors()
Getter for Range's owned Monitors.
Definition: MonitoredRange.cxx:44
TrigCostAnalysis
Athena algorithm used to process Trigger cost monitoring data in Run 3 and above. Outputs histograms.
Definition: TrigCostAnalysis.h:36
CostData.h
MonitoredRange
Container which represents a time range and holds a collection of Monitors which monitor this range.
Definition: MonitoredRange.h:29
MonitoredRange::m_cachedLifetimeHistPtr
TH1 * m_cachedLifetimeHistPtr
Cached histogram ptr used to store normalisation quantities.
Definition: MonitoredRange.h:103
TH1
Definition: rootspy.cxx:268
MonitoredRange::MonitoredRange
MonitoredRange()=delete
Forbid default constructor.
MonitoredRange::operator=
MonitoredRange & operator=(const MonitoredRange &)=delete
Forbid assignment.
CostData
Caches and propagates event data to be used by monitoring algorithms.
Definition: CostData.h:26
MonitoredRange::MonitoredRange
MonitoredRange(const MonitoredRange &)=delete
Forbid copy.
MonitoredRange::getParent
const TrigCostAnalysis * getParent() const
Return cached non-owning ptr to this Monitor's parent TrigCostAnalysis Athena algorithm.
Definition: MonitoredRange.cxx:29