AthenaMonitoring: New interface for Monitored classes
This MR simplifies the user-interface of the Monitored classes after we gained some experience with them.
The following renames were done in order to follow our coding guidelines (namespace or prefix, but not both):
-
Monitored::MonitoredScalar->Monitored::Scalar -
Monitored::MonitoredCollection->Monitored::Collection -
Monitored::MonitoredTimer->Monitored::Timer -
Monitored::MonitoredScope->Monitored::Group
In addition the declare method is dropped in favor of
constructor-style declarations.
This changes the recommended usage pattern on the client side from:
{
using namespace Monitored;
auto v = MonitoredScalar::declare(...);
auto mon = MonitoredScope::declare(m_monTool, v);
}
to
{
auto v = Monitored::Scalar(...);
auto mon = Monitored::Group(m_monTool, v);
}
Further changes:
- Note that the
Scopeclass was renamed toGroupto better reflect the purpose of grouping several monitored variables when performing the histogram fills. -
setAutoSave/savewas renamed tosetAutoFill/fill - A new
Monitored.hheader file is introduced that should be used by clients to get access to all relevantMonitoredclasses - This MR is backwards-compatible as it contains code to emulate the old interface. A separate MR will be made to migrate all clients and then that code will be removed.
- Since class template argument deduction requires C++17, the interface is emulated via static functions for C++14. This will be removed as soon as we drop our gcc6 builds.
Comments:
-
clang-formatwas used to provide some coherent formatting of the code. Please review this by using Hide whitespace changes.
Edited by Frank Winklmeier