ATLAS Offline Software
Loading...
Searching...
No Matches
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
18class TrigCostAnalysis; // Forward reference
19class TH1; // Forward reference
20
30 public:
34 MonitoredRange() = delete;
35
43 MonitoredRange(const std::string& name, TrigCostAnalysis* parent);
44
48 ~MonitoredRange() = default;
49
54
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
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
Caches and propagates event data to be used by monitoring algorithms.
Definition CostData.h:26
MonitoredRange(const MonitoredRange &)=delete
Forbid copy.
StatusCode addMonitor(std::unique_ptr< MonitorBase > monitor)
Adds a new Monitor into this Range.
const TrigCostAnalysis * getParent() const
Return cached non-owning ptr to this Monitor's parent TrigCostAnalysis Athena algorithm.
std::set< std::unique_ptr< MonitorBase > > m_monitors
Storage of Range's Monitors.
TrigCostAnalysis * m_parent
Cached ptr to the parent Athena algorithm.
const std::string m_name
Name of the Monitored Range.
std::set< std::unique_ptr< MonitorBase > > & getMonitors()
Getter for Range's owned Monitors.
std::set< uint32_t > m_seenLB
Luminosity blocks for which we have seen at least one event.
TH1 * m_cachedLifetimeHistPtr
Cached histogram ptr used to store normalisation quantities.
const std::string & getName() const
Getter for Range's name.
MonitoredRange()=delete
Forbid default constructor.
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...
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.
MonitoredRange & operator=(const MonitoredRange &)=delete
Forbid assignment.
~MonitoredRange()=default
Default destructor.
Athena algorithm used to process Trigger cost monitoring data in Run 3 and above.