20 regHistogram(
"FrameworkTime_perEventFractional_vs_TotalTime_perEvent",
"Framework Fractional Time vs Total Time/Event;Framework Time/Event CPU Time Fractional;Total Time/Event CPU Time Fractional;Events",
VariableType::kPerEvent,
kLinear, 0., 1., 70,
kLog, 0.1, 1000000., 70);
21 regHistogram(
"AlgTime_perEventFractional_vs_TotalTime_perEvent",
"Algorithm Fractional Time vs Total Time/Event;Algorithm Time/Event CPU Time Fractional;Total Time/Event CPU Time Fractional;Events",
VariableType::kPerEvent,
kLinear, 0., 1., 70,
kLog, 0.1, 1000000., 70);
35 const uint64_t start = alg->getDetail<uint64_t>(
"start");
36 const uint64_t stop = alg->getDetail<uint64_t>(
"stop");
37 const uint32_t slot = alg->getDetail<uint32_t>(
"slot");
40 ATH_CHECK(
fill(
"AlgTime_perEventFractional", cpuTime, weight) );
51 return StatusCode::SUCCESS;
60 float unmonitoredTime = 0;
64 unmonitoredTime = unmonitoredStart + unmonitoredEnd;
71 ATH_CHECK(
fill(
"UnmonitoredTime_perEvent", unmonitoredTime, weight) );
72 ATH_CHECK(
fill(
"UnmonitoredTime_perEventFractional", unmonitoredTime, weight) );
74 ATH_CHECK(
fill(
"FrameworkTime_perEvent", frameworkTime, weight) );
75 ATH_CHECK(
fill(
"FrameworkTime_perEventFractional", frameworkTime, weight) );
83 ATH_CHECK(
fill(
"FrameworkTime_perEventFractional_vs_TotalTime_perEvent", frameworkTime, eventTime, weight) );
84 ATH_CHECK(
fill(
"AlgTime_perEventFractional_vs_TotalTime_perEvent",
getVariable(
"AlgTime_perEvent").getAccumulator(), eventTime, weight) );
93 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
char data[hepevt_bytes_allocation_ATLAS]
@ 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.
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...
float timeToMilliSec(const uint64_t start, const uint64_t stop) const
Helper function.
CounterBase()=delete
Forbid default constructor.
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(const std::string &name)
Returns a mutable reference to a named Variable.
StatusCode setDenominator(const std::string &name, float value)
Optional for per-Event Variables.
StatusCode increment(const std::string &name, float weight=1.0)
Convenience function.
StatusCode postProcess(float weight=1.0)
Apply post-processing to the Counter, before endEvent is called.
uint64_t m_globalLowTimestamp
Records the lowest timestamp seen over all threads in an event.
CounterThread()=delete
Forbid default constructor.
uint64_t getLowTimestamp() const
Get the lowest timestamp of this single thread.
uint64_t getHighTimestamp() const
Get the highest timestamp of this single thread.
virtual StatusCode newEvent(const CostData &data, size_t index, const float weight=1.0) override
Concrete implementation.
uint64_t m_highTimestamp
Records the highest timestamp seen on this single thread in an event.
uint64_t m_lowTimestamp
Records the lowest timestamp seen on this single thread in an event.
uint64_t m_globalHighTimestamp
Records the highest timestamp seen over all threads in an event.
void setAllThreadsTimestamps(uint64_t low, uint64_t high)
Set the low and high timestamps over all threads.
float getAccumulator() const
Getter for accumulated value of a kPerEvent Variable.
TrigComposite_v1 TrigComposite
Declare the latest version of the class.