Skip to content

AthenaMonitoring: New interface for Monitored classes

Frank Winklmeier requested to merge fwinkl/athena:monitored_namespace_bwc into master

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 Scope class was renamed to Group to better reflect the purpose of grouping several monitored variables when performing the histogram fills.
  • setAutoSave/save was renamed to setAutoFill/fill
  • A new Monitored.h header file is introduced that should be used by clients to get access to all relevant Monitored classes
  • 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-format was used to provide some coherent formatting of the code. Please review this by using Hide whitespace changes.

cc @tbold @pisarna @ponyisi

Edited by Frank Winklmeier

Merge request reports