29 const uint64_t start = alg->getDetail<uint64_t>(
"start");
30 const uint64_t stop = alg->getDetail<uint64_t>(
"stop");
38 if (firstTime_perEvent.
getCalls() == 0) {
43 ATH_CHECK(
fill(
"Time_perEventFractional", cpuTime, weight) );
48 ATH_CHECK(
fill(
"InEventView_perCall", (globalScope ? 0.0 : 1.0), weight) );
50 ATH_CHECK(
fill(
"RoIID_perCall", alg->getDetail<int32_t>(
"roi"), weight) );
52 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
@ kPerEvent
Variable should buffer fill calls in an accumulator and fill the underlying histogram once at the end...
@ kPerCall
Variable should fill underlying histogram on each fill.
@ kLinear
Linear x-binning.
@ kLog
Logarithmic x-binning.
Caches and propagates event data to be used by monitoring algorithms.
virtual StatusCode newEvent(const CostData &data, size_t index, const float weight=1.) override
Concrete implimentation.
CounterAlgorithm()=delete
Forbid default constructor.
float timeToMilliSec(const uint64_t start, const uint64_t stop) const
Helper function.
CounterBase()=delete
Forbid default constructor.
StatusCode increment(std::string_view name, float weight=1.0)
Convenience function.
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.
Variable & getVariable(std::string_view name)
Returns a mutable reference to a named Variable.
StatusCode fill(std::string_view 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...
StatusCode setDenominator(const std::string &name, float value)
Optional for per-Event Variables.
static const std::string hash2string(HLTHash, const std::string &category=s_defaultCategory)
hash function translating identifiers into names (via internal dictionary)
Wrapper around a histogram which allows for some additional filling patterns and data manipulation.
StatusCode fill(float value, float weight=1.0)
Fill histogram (per-Call Variable), or add value to internal accumulator (per-Event Variable) to be f...
size_t getCalls() const
Getter for how many times fill() has already been called on this Variable in this event.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.