24 uint64_t lowTimestamp = std::numeric_limits<uint64_t>::max();
25 uint64_t highTimestamp = 0;
26 const std::string stopStr{
"stop"};
27 const std::string startStr{
"start"};
28 const std::string slotStr{
"slot"};
30 const uint32_t slot =
tc->getDetail<uint32_t>(slotStr);
31 if (slot != data.onlineSlot()) {
35 const uint64_t start =
tc->getDetail<uint64_t>(startStr);
36 const uint64_t stop =
tc->getDetail<uint64_t>(stopStr);
41 lowTimestamp = std::min(lowTimestamp, start);
42 highTimestamp = std::max(highTimestamp, stop);
45 const float steeringTime =
timeToMilliSec(lowTimestamp, highTimestamp);
46 ATH_CHECK(
fill(
"SteeringTime_perEvent", steeringTime, weight) );
48 if (incrementWalltime == 1) {
54 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.
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.
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...
CounterGlobal()=delete
Forbid default constructor.
virtual StatusCode newEvent(const CostData &data, size_t incrementWalltime, const float weight=1.) override
Concrete implementation.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.