|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef TRIGCOSTANALYSIS_COUNTERBASE_H
6 #define TRIGCOSTANALYSIS_COUNTERBASE_H 1
8 #include "GaudiKernel/StatusCode.h"
58 const std::string&
getName()
const;
137 const std::string&
title,
140 const float min = 0.1,
141 const float max = 1000000.,
142 const size_t bins = 70);
154 const std::string&
title,
157 const float min = 0.1,
158 const float max = 1000000.,
159 const size_t bins = 70);
175 const std::string&
title,
208 #endif // TRIGCOSTANALYSIS_COUNTERBASE_H
char data[hepevt_bytes_allocation_ATLAS]
virtual StatusCode newEvent(const CostData &data, size_t index, float weight=1.0)=0
Pure virtual interface called by Monitor to instruct this Counter to perform its analysis.
StatusCode setDenominator(const std::string &name, float value)
Optional for per-Event Variables.
void regHistogram(const std::string &name, const std::string &title, const VariableType type=VariableType::kPerCall, const LogType xaxis=kLog, const float min=0.1, const float max=1000000., const size_t bins=70)
Book a histogram for this Counter, to be filled in per-event monitoring.
StatusCode fill(const std::string &name, float value, float weight=1.0)
Fill (for per-Call) or accumulate in a buffer (for per-Event) a quantity histogrammed by a named Vari...
virtual StatusCode endEvent(float weight=1.0)
Called by the framework.
CounterBase()=delete
Forbid default constructor.
CounterBase(const CounterBase &)=delete
Forbid copy.
const std::string & getName() const
Getter for Counter's name.
VariableType
Behaviour of Variable.
@ kLog
Logarithmic x-binning.
TH1 * bookGetPointer(TH1 *hist, const std::string &tDir="") const
Appends Counter name (to histogram path) and forwards histogram book request to parent Monitor.
::StatusCode StatusCode
StatusCode definition for legacy code.
CounterBase & operator=(const CounterBase &)=delete
Forbid assignment.
const MonitorBase * m_parent
Counter's parent Monitor.
bool variableExists(const std::string &name) const
Check if a variable of a given name exists.
@ kPerCall
Variable should fill underlying histogram on each fill.
Variable & getVariable(const std::string &name)
Returns a mutable reference to a named Variable.
void regTProfile(const std::string &name, const std::string &title, const VariableType type=VariableType::kPerCall, const LogType xaxis=kLog, const float min=0.1, const float max=1000000., const size_t bins=70)
Book a TProfile for this Counter, to be filled in per-event monitoring.
const MonitorBase * getParent() const
Return cached non-owning const ptr to this Counter's parent Monitor.
virtual ~CounterBase()=default
Default destructor.
Wrapper around a histogram which allows for some additional filling patterns and data manipulation.
StatusCode increment(const std::string &name, float weight=1.0)
Convenience function.
LogType
Histogram x-axis type flag.
std::unordered_map< std::string, Variable > m_variables
Store of Counter's Variables.
float timeToMilliSec(const uint64_t start, const uint64_t stop) const
Helper function.
Caches and propagates event data to be used by monitoring algorithms.
const std::string m_name
Counter's name.