ATLAS Offline Software
Loading...
Searching...
No Matches
JetTrigTimer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGHLTJETHYPO_JETTRIGTIMER_H
6#define TRIGHLTJETHYPO_JETTRIGTIMER_H
7
8#include <chrono>
9#include <vector>
10#include <string>
11#include <tuple>
12
14 public:
15 JetTrigTimer(bool nanoseconds=false);
16
17 void start();
18 void update();
19 std::string read() const;
20 std::tuple<double, int, std::string> read_bare() const;
21 void reset() noexcept;
22 std::string readAndReset();
23 double elapsed_to_now();
24 double elapsed_to_update();
25 std::string units() const;
26
27 private:
28 std::size_t m_nCalls{0};
29 std::chrono::system_clock::time_point m_start;
30 std::chrono::system_clock::time_point m_stop;
31
32 double m_elapsedDelta{0.};
34 void accumulate();
35
36};
37#endif
38
void accumulate()
std::string readAndReset()
std::string units() const
double m_elapsedDelta
std::string read() const
JetTrigTimer(bool nanoseconds=false)
std::size_t m_nCalls
std::chrono::system_clock::time_point m_start
double elapsed_to_update()
std::chrono::system_clock::time_point m_stop
void reset() noexcept
double elapsed_to_now()
std::tuple< double, int, std::string > read_bare() const