Project
Loading...
Searching...
No Matches
o2::mch::ErrorMap Class Reference

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
 

Detailed Description

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.

Member Typedef Documentation

◆ ErrorFunction

using o2::mch::ErrorMap::ErrorFunction = std::function<void(Error error)>

Definition at line 40 of file ErrorMap.h.

Member Function Documentation

◆ add() [1/4]

void o2::mch::ErrorMap::add ( const ErrorMap errors)

add or increment these errors

Definition at line 56 of file ErrorMap.cxx.

◆ add() [2/4]

void o2::mch::ErrorMap::add ( Error  error)

add or increment this error

Definition at line 41 of file ErrorMap.cxx.

◆ add() [3/4]

void o2::mch::ErrorMap::add ( ErrorType  errorType,
uint32_t  id0,
uint32_t  id1,
uint64_t  n = 1 
)

increment the count of the {errorType,id0,id1} triplet by n

Definition at line 33 of file ErrorMap.cxx.

◆ add() [4/4]

void o2::mch::ErrorMap::add ( gsl::span< const Error errors)

add or increment these errors

Definition at line 49 of file ErrorMap.cxx.

◆ clear()

void o2::mch::ErrorMap::clear ( )
inline

erase all encountered errors

Definition at line 52 of file ErrorMap.h.

◆ forEach() [1/3]

void o2::mch::ErrorMap::forEach ( ErrorFunction  f) const

execute function f on all encountered errors

Definition at line 90 of file ErrorMap.cxx.

◆ forEach() [2/3]

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.

◆ forEach() [3/3]

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.

◆ getNumberOfErrors() [1/3]

uint64_t o2::mch::ErrorMap::getNumberOfErrors ( ) const

return the total number of encountered errors

Definition at line 63 of file ErrorMap.cxx.

◆ getNumberOfErrors() [2/3]

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.

◆ getNumberOfErrors() [3/3]

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.

◆ getNumberOfErrorTypes()

uint64_t o2::mch::ErrorMap::getNumberOfErrorTypes ( ) const
inline

return the number of encountered types of error

Definition at line 55 of file ErrorMap.h.


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