Monitoring  3.3.4
O2 Monitoring library
o2::monitoring::VariantVisitorRate Class Reference

Subtracts boost variants in order to calculate rate. More...

#include <VariantVisitorRate.h>

Collaboration diagram for o2::monitoring::VariantVisitorRate:

Public Member Functions

 VariantVisitorRate (int count)
 
template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
double operator() (const T &a, const T &b) const
 
template<typename T , typename U >
double operator() (const T &, const U &) const
 

Detailed Description

Subtracts boost variants in order to calculate rate.

Constructor & Destructor Documentation

o2::monitoring::VariantVisitorRate::VariantVisitorRate ( int  count)
inline

Creates variant visitor functor

Parameters
counttimestamp difference in milliseconds

Member Function Documentation

template<typename T , typename = typename std::enable_if<std::is_arithmetic<T>::value, T>::type>
double o2::monitoring::VariantVisitorRate::operator() ( const T &  a,
const T &  b 
) const
inline

Calculates rate only when two arguments of the same type are passed

Returns
calculated rate in Hz
template<typename T , typename U >
double o2::monitoring::VariantVisitorRate::operator() ( const T &  ,
const U &   
) const
inline

If arguments have different type an exception is raised

Exceptions
MonitoringException

The documentation for this class was generated from the following file: