![]() |
Project
|
A container class to summarize errors encountered during processing. More...
#include <ErrorMap.h>
Public Types | |
using | ErrorFunction = std::function< void(Error error)> |
Public Member Functions | |
void | add (ErrorType errorType, uint32_t id0, uint32_t id1, uint64_t n=1) |
void | add (Error error) |
void | add (gsl::span< const Error > errors) |
void | add (const ErrorMap &errors) |
void | clear () |
uint64_t | getNumberOfErrorTypes () const |
uint64_t | getNumberOfErrors () const |
uint64_t | getNumberOfErrors (ErrorType type) const |
uint64_t | getNumberOfErrors (ErrorGroup group) const |
void | forEach (ErrorFunction f) const |
void | forEach (ErrorType type, ErrorFunction f) const |
void | forEach (ErrorGroup group, ErrorFunction f) const |
A container class to summarize errors encountered during processing.
The main interface is : add(errorType, id0, id1[, count])
where errorType is the type of the error and id0 and id1 are additional descriptors, whose meaning depends on the error type (see Error.h/cxx)
additional interfaces are provided to add and access the errors, or execute a function on all or some of them
Definition at line 37 of file ErrorMap.h.
using o2::mch::ErrorMap::ErrorFunction = std::function<void(Error error)> |
Definition at line 40 of file ErrorMap.h.
add or increment these errors
Definition at line 56 of file ErrorMap.cxx.
add or increment this error
Definition at line 41 of file ErrorMap.cxx.
increment the count of the {errorType,id0,id1} triplet by n
Definition at line 33 of file ErrorMap.cxx.
add or increment these errors
Definition at line 49 of file ErrorMap.cxx.
|
inline |
erase all encountered errors
Definition at line 52 of file ErrorMap.h.
void o2::mch::ErrorMap::forEach | ( | ErrorFunction | f | ) | const |
execute function f on all encountered errors
Definition at line 90 of file ErrorMap.cxx.
void o2::mch::ErrorMap::forEach | ( | ErrorGroup | group, |
ErrorFunction | f | ||
) | const |
execute function f on all encountered errors of a given group
Definition at line 110 of file ErrorMap.cxx.
void o2::mch::ErrorMap::forEach | ( | ErrorType | type, |
ErrorFunction | f | ||
) | const |
execute function f on all encountered errors of a given type
Definition at line 99 of file ErrorMap.cxx.
uint64_t o2::mch::ErrorMap::getNumberOfErrors | ( | ) | const |
return the total number of encountered errors
Definition at line 63 of file ErrorMap.cxx.
uint64_t o2::mch::ErrorMap::getNumberOfErrors | ( | ErrorGroup | group | ) | const |
return the total number of encountered errors of a given group
Definition at line 81 of file ErrorMap.cxx.
uint64_t o2::mch::ErrorMap::getNumberOfErrors | ( | ErrorType | type | ) | const |
return the total number of encountered errors of a given type
Definition at line 72 of file ErrorMap.cxx.
|
inline |
return the number of encountered types of error
Definition at line 55 of file ErrorMap.h.